Class PositionableShapeXml
java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.jmrit.display.controlPanelEditor.shape.configurexml.PositionableShapeXml
- All Implemented Interfaces:
XmlAdapter
- Direct Known Subclasses:
PositionableCircleXml,PositionableEllipseXml,PositionablePolygonXml,PositionableRectangleXml,PositionableRoundRectXml
Handle configuration for display.PositionableShape objects
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.configurexml.AbstractXmlAdapter
AbstractXmlAdapter.EnumIO<T extends Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends Enum<T>> -
Field Summary
Fields inherited from class jmri.configurexml.AbstractXmlAdapter
STR_FALSE, STR_NO, STR_TRUE, STR_YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatintbooleanload(org.jdom2.Element shared, org.jdom2.Element perNode) Create a set of configured objects from their XML description.voidloadCommonAttributes(PositionableShape ps, int defaultLevel, org.jdom2.Element element) org.jdom2.ElementDefault implementation for storing the contents of a PositionableShapeorg.jdom2.ElementstoreColor(String name, Color c) voidstoreCommonAttributes(PositionableShape p, org.jdom2.Element element) Default implementation for storing the common contents.Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, load, loadDeferred, loadOrder, setExceptionHandler, store
-
Constructor Details
-
PositionableShapeXml
public PositionableShapeXml()
-
-
Method Details
-
store
Default implementation for storing the contents of a PositionableShape- Parameters:
o- Object to store, of type PositionableShape- Returns:
- Element containing the complete info
-
storeCommonAttributes
Default implementation for storing the common contents.- Parameters:
p- the shape to storeelement- Element in which contents are stored
-
storeColor
-
load
Description copied from class:AbstractXmlAdapterCreate a set of configured objects from their XML description.- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin 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
-
loadCommonAttributes
-
getColor
-
getInt
-
getFloat
-