|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
jmri.managers.configurexml.AbstractSignalHeadManagerXml
public class AbstractSignalHeadManagerXml
Provides the abstract base and store functionality for configuring SignalHeadManagers, working with AbstractSignalHeadManagers.
Typically, a subclass will just implement the load(Element turnouts) class, relying on implementation here to load the individual turnouts. Note that these are stored explicitly, so the resolution mechanism doesn't need to see *Xml classes for each specific SignalHead or AbstractSignalHead subclass at store time.
Based on AbstractTurnoutManagerConfigXML
| Constructor Summary | |
|---|---|
AbstractSignalHeadManagerXml()
|
|
| Method Summary | |
|---|---|
boolean |
load(Element signalheads)
Create a SignalHeadManager object of the correct class, then register and fill it. |
void |
load(Element element,
Object o)
Create a set of configured objects from their XML description, using an auxiliary object. |
void |
loadSignalHeads(Element signalheads)
Utility method to load the individual SignalHead objects. |
protected void |
replaceSignalHeadManager()
Replace the current signal head manager, if there is one, with one newly created during a load operation. |
void |
setStoreElementClass(Element turnouts)
Subclass provides implementation to create the correct top element, including the type information. |
Element |
store(Object o)
Default implementation for storing the contents of a SignalHeadManager. |
| Methods inherited from class jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML |
|---|
loadCommon, storeCommon |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractSignalHeadManagerXml()
| Method Detail |
|---|
public Element store(Object o)
Unlike most other managers, the individual SignalHead objects are stored separately via the configuration system so they can have separate type information.
o - Object to store, of type SignalHeadManager
public void setStoreElementClass(Element turnouts)
turnouts - The top-level element being createdpublic boolean load(Element signalheads)
signalheads - Top level Element to unpack.
public void load(Element element,
Object o)
XmlAdapterFor example, the auxilary object o might be a manager or GUI of some type that needs to be informed as each object is created.
element - Top-level XML element containing the descriptiono - Implementation-specific Object needed for the conversionpublic void loadSignalHeads(Element signalheads)
signalheads - Element containing the SignalHead elements to load.protected void replaceSignalHeadManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||