Package jmri.jmrit.automat
Class AutomatSummary
- java.lang.Object
-
- jmri.jmrit.automat.AutomatSummary
-
public class AutomatSummary extends java.lang.Object
A singlet providing access to information about existing Automat instances.It might not always be a singlet, however, so for now we're going through an explicit instance() reference.
This can be invoked from various threads, so switches to the Swing thread to notify its own listeners.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.beans.PropertyChangeSupport
prop
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener p)
AbstractAutomaton
get(int i)
AbstractAutomaton
get(java.lang.String name)
Provide a convenience method to look up a managed object by its name.java.util.ArrayList<AbstractAutomaton>
getAutomats()
int
indexOf(AbstractAutomaton a)
static AutomatSummary
instance()
int
length()
void
loop(AbstractAutomaton a)
An AbstractAutomaton instance uses this method to notify interested parties that it's gone around its handle loop again.(package private) void
notify(java.lang.String property, java.lang.Object arg1, java.lang.Object arg2)
void
register(AbstractAutomaton a)
A newly-created AbstractAutomaton instance uses this method to notify interested parties of its existence.void
remove(AbstractAutomaton a)
Just before exiting, an AbstractAutomaton instance uses this method to notify interested parties of its departure.void
removePropertyChangeListener(java.beans.PropertyChangeListener p)
-
-
-
Field Detail
-
prop
java.beans.PropertyChangeSupport prop
-
-
Method Detail
-
instance
public static AutomatSummary instance()
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener p)
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener p)
-
register
public void register(AbstractAutomaton a)
A newly-created AbstractAutomaton instance uses this method to notify interested parties of its existence.- Parameters:
a
- the automaton to register
-
remove
public void remove(AbstractAutomaton a)
Just before exiting, an AbstractAutomaton instance uses this method to notify interested parties of its departure.- Parameters:
a
- the automaton to remove
-
getAutomats
public java.util.ArrayList<AbstractAutomaton> getAutomats()
-
length
public int length()
-
get
public AbstractAutomaton get(int i)
-
get
public AbstractAutomaton get(java.lang.String name)
Provide a convenience method to look up a managed object by its name.- Parameters:
name
- Name of the automat to be located- Returns:
- null if name not found
- Since:
- 1.7.3
-
indexOf
public int indexOf(AbstractAutomaton a)
-
loop
public void loop(AbstractAutomaton a)
An AbstractAutomaton instance uses this method to notify interested parties that it's gone around its handle loop again.- Parameters:
a
- the looping automaton
-
notify
void notify(java.lang.String property, java.lang.Object arg1, java.lang.Object arg2)
-
-