|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.TurnoutOperationManager
public class TurnoutOperationManager
class to look after the collection of TurnoutOperation subclasses Unlike the other xxxManager, this does not inherit from AbstractManager since the resources it deals with are not DCC system resources but rather purely internal state
| Constructor Summary | |
|---|---|
TurnoutOperationManager()
|
|
| Method Summary | |
|---|---|
protected void |
addOperation(TurnoutOperation op)
add a new operation Silently replaces any existing operation with the same name |
void |
addPropertyChangeListener(PropertyChangeListener l)
|
static String[] |
concatenateTypeLists(String[] types)
Proxy support. |
void |
dispose()
|
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
boolean |
getDoOperations()
|
static TurnoutOperationManager |
getInstance()
get the one-and-only instance of this class, if necessary creating it first. |
TurnoutOperation |
getMatchingOperation(Turnout t,
int apparentMode)
find the correct operation for this turnout. |
TurnoutOperation |
getMatchingOperationAlways(Turnout t)
|
TurnoutOperation |
getMatchingOperationAlways(Turnout t,
int apparentMode)
Find a suitable operation for this turnout, based on its feedback type. |
TurnoutOperation |
getOperation(String name)
find a TurnoutOperation by its name |
TurnoutOperation[] |
getTurnoutOperations()
|
void |
loadOperationTypes()
Load the operation types given by the current TurnoutManager instance, in the order given. |
protected void |
removeOperation(TurnoutOperation op)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
setDoOperations(boolean b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TurnoutOperationManager()
| Method Detail |
|---|
public void dispose()
public TurnoutOperation[] getTurnoutOperations()
protected void addOperation(TurnoutOperation op)
op - protected void removeOperation(TurnoutOperation op)
public TurnoutOperation getOperation(String name)
name -
public static TurnoutOperationManager getInstance()
public void loadOperationTypes()
The order is important because the acceptable feedback modes may overlap. All we do is instantiate the classes. The constructors take care of putting everything in the right places. We allow multiple occurrences of the same name without complaining so the Proxy stuff works. There's a threading problem here, because this invokes gets the current turnout manager, often the proxy manager, which in turn invokes loadOperationTypes again. This is bad. It's not clear why it even works.
public TurnoutOperation getMatchingOperationAlways(Turnout t,
int apparentMode)
t - turnoutapparentMode - mode(s) to be used when finding a matching operation
public TurnoutOperation getMatchingOperation(Turnout t,
int apparentMode)
t - turnoutapparentMode - mode(s) to be used when finding a matching operation
public TurnoutOperation getMatchingOperationAlways(Turnout t)
public boolean getDoOperations()
public void setDoOperations(boolean b)
public static String[] concatenateTypeLists(String[] types)
types - list of types possibly containing dupliactes
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
protected void firePropertyChange(String p,
Object old,
Object n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||