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.voidsaveObject(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:
saveObjectin interfaceXML.ObjectLoader- Overrides:
saveObjectin classXMLLoader- Parameters:
control- XMLControlobj- Object
-
createObject
Creates the DrawableShape containing a GeneralPath.- Specified by:
createObjectin interfaceXML.ObjectLoader- Overrides:
createObjectin classXMLLoader- Parameters:
control- XMLControl- Returns:
- Object
-
loadObject
Loads the DrawableShape using the path stored in the control.- Specified by:
loadObjectin interfaceXML.ObjectLoader- Overrides:
loadObjectin classXMLLoader- Parameters:
control- XMLControlobj- Object- Returns:
- Object
-