Package org.opensourcephysics.display
Class DrawableShapeLoader
java.lang.Object
org.opensourcephysics.controls.XMLLoader
org.opensourcephysics.display.DrawableShapeLoader
- All Implemented Interfaces:
XML.ObjectLoader
A class to save and load DrawableShapes in an XMLControl.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateObject
(XMLControl control) Creates the DrawableShape containing a GeneralPath.loadObject
(XMLControl control, Object obj) Loads the DrawableShape using the path stored in the control.void
saveObject
(XMLControl control, Object obj) Saves a DrawableShape by saving the general path.
-
Constructor Details
-
DrawableShapeLoader
public DrawableShapeLoader()
-
-
Method Details
-
saveObject
Saves a DrawableShape by saving the general path.- Specified by:
saveObject
in interfaceXML.ObjectLoader
- Overrides:
saveObject
in classXMLLoader
- Parameters:
control
- XMLControlobj
- Object
-
createObject
Creates the DrawableShape containing a GeneralPath.- Specified by:
createObject
in interfaceXML.ObjectLoader
- Overrides:
createObject
in classXMLLoader
- Parameters:
control
- XMLControl- Returns:
- Object
-
loadObject
Loads the DrawableShape using the path stored in the control.- Specified by:
loadObject
in interfaceXML.ObjectLoader
- Overrides:
loadObject
in classXMLLoader
- Parameters:
control
- XMLControlobj
- Object- Returns:
- Object
-