jmri.jmrit.automat
Class AutomatSummary

java.lang.Object
  extended by jmri.jmrit.automat.AutomatSummary

public class AutomatSummary
extends 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 it's own listeners.

Author:
Bob Jacobsen Copyright (C) 2004, 2007

Method Summary
 void addPropertyChangeListener(PropertyChangeListener p)
           
 AbstractAutomaton get(int i)
           
 AbstractAutomaton get(String name)
          Provide a convenience method to look up a managed object by it's name.
 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 it's handle loop again.
 void register(AbstractAutomaton a)
          A newly-created AbstractAutomaton instance uses this method to notify interested parties of it's existance.
 void remove(AbstractAutomaton a)
          Just before exiting, an AbstractAutomaton instance uses this method to notify interested parties of it's departure.
 void removePropertyChangeListener(PropertyChangeListener p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static AutomatSummary instance()

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener p)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener p)

register

public void register(AbstractAutomaton a)
A newly-created AbstractAutomaton instance uses this method to notify interested parties of it's existance.


remove

public void remove(AbstractAutomaton a)
Just before exiting, an AbstractAutomaton instance uses this method to notify interested parties of it's departure.


length

public int length()

get

public AbstractAutomaton get(int i)

get

public AbstractAutomaton get(String name)
Provide a convenience method to look up a managed object by it's 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 it's handle loop again.



Copyright © 1997 - 2009 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads