org.opensourcephysics.display
Class DrawableShapeLoader

java.lang.Object
  extended by org.opensourcephysics.controls.XMLLoader
      extended by org.opensourcephysics.display.DrawableShapeLoader
All Implemented Interfaces:
XML.ObjectLoader

public class DrawableShapeLoader
extends XMLLoader

A class to save and load DrawableShapes in an XMLControl.


Constructor Summary
DrawableShapeLoader()
           
 
Method Summary
 java.lang.Object createObject(XMLControl control)
          Creates the DrawableShape containing a GeneralPath.
 java.lang.Object loadObject(XMLControl control, java.lang.Object obj)
          Loads the DrawableShape using the path stored in the control.
 void saveObject(XMLControl control, java.lang.Object obj)
          Saves a DrawableShape by saving the general path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableShapeLoader

public DrawableShapeLoader()
Method Detail

saveObject

public void saveObject(XMLControl control,
                       java.lang.Object obj)
Saves a DrawableShape by saving the general path.

Specified by:
saveObject in interface XML.ObjectLoader
Overrides:
saveObject in class XMLLoader
Parameters:
control - XMLControl
obj - Object

createObject

public java.lang.Object createObject(XMLControl control)
Creates the DrawableShape containing a GeneralPath.

Specified by:
createObject in interface XML.ObjectLoader
Overrides:
createObject in class XMLLoader
Parameters:
control - XMLControl
Returns:
Object

loadObject

public java.lang.Object loadObject(XMLControl control,
                                   java.lang.Object obj)
Loads the DrawableShape using the path stored in the control.

Specified by:
loadObject in interface XML.ObjectLoader
Overrides:
loadObject in class XMLLoader
Parameters:
control - XMLControl
obj - Object
Returns:
Object