use of jmri.jmrit.display.controlPanelEditor.shape.PositionableShape in project JMRI by JMRI.
the class PositionableShapeXml method store.
/**
* Default implementation for storing the contents of a PositionableShape
*
* @param o Object to store, of type PositionableShape
* @return Element containing the complete info
*/
@Override
public Element store(Object o) {
PositionableShape p = (PositionableShape) o;
if (!p.isActive()) {
// if flagged as inactive, don't store
return null;
}
Element element = new Element("PositionableShape");
storeCommonAttributes(p, element);
element.setAttribute("class", "jmri.jmrit.display.controlPanelEditor.shape.configurexml.PositionableShapeXml");
return element;
}
use of jmri.jmrit.display.controlPanelEditor.shape.PositionableShape in project JMRI by JMRI.
the class PositionableShapeXml method load.
/**
* Create a PositionableShape, then add to a target JLayeredPane
*
* @param element Top level Element to unpack.
* @param o Editor as an Object
*/
@Override
public void load(Element element, Object o) {
// create the objects
Editor ed = (Editor) o;
PositionableShape ps = new PositionableShape(ed);
ed.putItem(ps);
// load individual item's option settings after editor has set its global settings
loadCommonAttributes(ps, Editor.MARKERS, element);
}
Aggregations