Package jmri.jmrix.configurexml
Class JmrixConfigPaneXml
- java.lang.Object
-
- jmri.configurexml.AbstractXmlAdapter
-
- jmri.jmrix.configurexml.JmrixConfigPaneXml
-
- All Implemented Interfaces:
XmlAdapter
public class JmrixConfigPaneXml extends AbstractXmlAdapter
Handle XML persistance of layout connections.This class is named as being the persistant form of the JmrixConfigPane class, but there's no object of that form created or used. Instead, this interacts forwards to a similar class in one of the protocol-specific packages, e.g. jmrix.easydcc.serialdriver.configurexml
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.configurexml.AbstractXmlAdapter
AbstractXmlAdapter.EnumIO<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends java.lang.Enum<T>>
-
-
Constructor Summary
Constructors Constructor Description JmrixConfigPaneXml()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
load(org.jdom2.Element element, java.lang.Object o)
Update static data from XML fileboolean
load(org.jdom2.Element shared, org.jdom2.Element perNode)
Create a set of configured objects from their XML description.org.jdom2.Element
store(java.lang.Object o)
Forward to the configurexml class for the specific object type.org.jdom2.Element
store(java.lang.Object o, boolean shared)
Store the object in XMLvoid
updateLookAndFeel(java.lang.String name, java.lang.String className)
Change the look-and-feel to the specified class.-
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, loadDeferred, loadOrder, setExceptionHandler
-
-
-
-
Constructor Detail
-
JmrixConfigPaneXml
public JmrixConfigPaneXml()
-
-
Method Detail
-
store
public org.jdom2.Element store(java.lang.Object o)
Forward to the configurexml class for the specific object type.- Parameters:
o
- The object to be recorded. Specific XmlAdapter implementations will require this to be of a specific type; that binding is done in ConfigXmlManager.- Returns:
- The XML representation Element
-
store
public org.jdom2.Element store(java.lang.Object o, boolean shared)
Description copied from class:AbstractXmlAdapter
Store the object in XML- Specified by:
store
in interfaceXmlAdapter
- Overrides:
store
in classAbstractXmlAdapter
- Parameters:
o
- The object to be recorded. Specific XmlAdapter implementations will require this to be of a specific type; that binding is done in ConfigXmlManager.shared
- true if the returned element should be the common XML and false if the returned element should be per-node.- Returns:
- The XML representation Element
-
load
public boolean load(org.jdom2.Element shared, org.jdom2.Element perNode)
Description copied from class:AbstractXmlAdapter
Create a set of configured objects from their XML description.- Specified by:
load
in interfaceXmlAdapter
- Overrides:
load
in classAbstractXmlAdapter
- Parameters:
shared
- Top-level XML element containing the common, multi-node elements of the descriptionperNode
- Top-level XML element containing the private, single-node elements of the description- Returns:
- true if successful
-
updateLookAndFeel
public void updateLookAndFeel(java.lang.String name, java.lang.String className)
Change the look-and-feel to the specified class. Alert the user if there were problems loading the PLAF.- Parameters:
name
- (String) the presentable name for the classclassName
- (String) the className to be fed to the UIManager
-
load
public void load(org.jdom2.Element element, java.lang.Object o)
Update static data from XML file- Specified by:
load
in interfaceXmlAdapter
- Overrides:
load
in classAbstractXmlAdapter
- Parameters:
element
- Top level Element to unpack.o
- ignored
-
-