|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.configurexml.AbstractXmlAdapter
jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML
jmri.managers.configurexml.AbstractAudioManagerConfigXML
public abstract class AbstractAudioManagerConfigXML
Provides the abstract base and store functionality for configuring AudioManagers, working with AbstractAudioManagers.
Typically, a subclass will just implement the load(Element audio) class, relying on implementation here to load the individual Audio objects. Note that these are stored explicitly, so the resolution mechanism doesn't need to see *Xml classes for each specific Audio or AbstractAudio subclass at store time.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Constructor Summary | |
|---|---|
AbstractAudioManagerConfigXML()
Default constructor |
|
| Method Summary | |
|---|---|
abstract boolean |
load(Element audio)
Create a AudioManager 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 |
loadAudio(Element audio)
Utility method to load the individual Audio objects. |
int |
loadOrder()
Used for determining which order to load items from XML files in. |
abstract void |
setStoreElementClass(Element audio)
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 AudioManager |
| Methods inherited from class jmri.managers.configurexml.AbstractNamedBeanManagerConfigXML |
|---|
getSystemName, getUserName, getUserName, loadCommon, storeCommon |
| Methods inherited from class jmri.configurexml.AbstractXmlAdapter |
|---|
creationErrorEncountered, getConfigXmlManager, loadDeferred, setConfigXmlManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractAudioManagerConfigXML()
| Method Detail |
|---|
public Element store(Object o)
o - Object to store, of type AudioManager
public abstract void setStoreElementClass(Element audio)
audio - The top-level element being created
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 abstract boolean load(Element audio)
audio - Top level Element to unpack.
public void loadAudio(Element audio)
audio - Element containing the Audio elements to load.public int loadOrder()
AbstractXmlAdapter
loadOrder in interface XmlAdapterloadOrder in class AbstractXmlAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||