Package org.opensourcephysics.controls
Class XMLLoader
java.lang.Object
org.opensourcephysics.controls.XMLLoader
- All Implemented Interfaces:
XML.ObjectLoader
- Direct Known Subclasses:
ArrowLoader
,CircleLoader
,DataColumn.Loader
,DataFunction.Loader
,Dataset.Loader
,DrawableShapeLoader
,DrawableTextLine.DrawableTextLineLoader
,GeneralPathLoader
,Histogram.HistogramLoader
,InteractiveArrow.InteractiveArrowLoader
,InteractiveCenteredArrow.InteractiveCenteredArrowLoader
,InteractiveShape.InteractiveShapeLoader
,InteractiveTextLine.InteractiveTextLineLoader
,Matrix2DTransformation.Matrix2DTransformationLoader
,Matrix3DTransformation.Affine3DTransformationLoader
,Plot2DLoader
,Quaternion.QuaternionLoader
,Resolution.ResolutionLoader
,Style.Loader
,UserFunction.Loader
,VisualizationHints.Loader
This is an ObjectLoader implementation that attempts to create a new object
of class element.getObjectClass() but takes no other action. It is used as
the default loader and can be extended for use by particular classes.
- Version:
- 1.0
- Author:
- Douglas Brown
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateObject
(XMLControl control) Creates a new object if the class type has a no-arg constructor.loadObject
(XMLControl control, Object obj) Loads the object with xml data.void
saveObject
(XMLControl control, Object obj) Empty method.
-
Constructor Details
-
XMLLoader
public XMLLoader()
-
-
Method Details
-
saveObject
Empty method.- Specified by:
saveObject
in interfaceXML.ObjectLoader
- Parameters:
control
- the controlobj
- the object
-
createObject
Creates a new object if the class type has a no-arg constructor.- Specified by:
createObject
in interfaceXML.ObjectLoader
- Parameters:
control
- the control- Returns:
- the new object
-
loadObject
Loads the object with xml data. Calculations and Animations should reinitialize after they are loaded.- Specified by:
loadObject
in interfaceXML.ObjectLoader
- Parameters:
control
- the controlobj
- the object- Returns:
- the loaded object
-