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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener p)AbstractAutomatonget(int i)AbstractAutomatonget(java.lang.String name)Provide a convenience method to look up a managed object by its name.java.util.ArrayList<AbstractAutomaton>getAutomats()intindexOf(AbstractAutomaton a)static AutomatSummaryinstance()intlength()voidloop(AbstractAutomaton a)An AbstractAutomaton instance uses this method to notify interested parties that it's gone around its handle loop again.(package private) voidnotify(java.lang.String property, java.lang.Object arg1, java.lang.Object arg2)voidregister(AbstractAutomaton a)A newly-created AbstractAutomaton instance uses this method to notify interested parties of its existence.voidremove(AbstractAutomaton a)Just before exiting, an AbstractAutomaton instance uses this method to notify interested parties of its departure.voidremovePropertyChangeListener(java.beans.PropertyChangeListener p)
-
-
-
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)
-
-