|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLControl
This defines methods for storing data in an xml control element.
Field Summary |
---|
Fields inherited from interface org.opensourcephysics.controls.Control |
---|
NOT_EDITABLE_BACKGROUND |
Method Summary | |
---|---|
boolean |
failedToRead()
Returns true if the most recent read operation failed. |
java.lang.Class<?> |
getObjectClass()
Gets the class for which this stores data. |
java.lang.String |
getObjectClassName()
Gets the name of the object class for which this element stores data. |
java.lang.String |
getPropertyType(java.lang.String name)
Gets the type of the specified property. |
java.lang.Object |
loadObject(java.lang.Object obj)
Loads an object with data from this XMLControl. |
void |
read(java.io.Reader reader)
Reads the control from a Reader. |
java.lang.String |
read(java.lang.String name)
Reads the control from an xml document with the specified name. |
void |
readXML(java.lang.String xml)
Reads the control from an xml string. |
void |
saveObject(java.lang.Object obj)
Saves an object's data in this XMLControl. |
java.lang.String |
toXML()
Returns this control as an xml string. |
java.lang.String |
write(java.lang.String fileName)
Writes the control as an xml document with the specified name. |
void |
write(java.io.Writer writer)
Writes the control to a Writer. |
Methods inherited from interface org.opensourcephysics.controls.Control |
---|
calculationDone, clearMessages, clearValues, getBoolean, getDouble, getInt, getObject, getPropertyNames, getString, print, println, println, setLockValues, setValue, setValue, setValue, setValue |
Methods inherited from interface org.opensourcephysics.controls.XMLProperty |
---|
getChildControl, getChildControls, getLevel, getParentProperty, getPropertyClass, getPropertyContent, getPropertyName, getPropertyType, setValue |
Method Detail |
---|
java.lang.String getPropertyType(java.lang.String name)
name
- the property name
java.lang.String getObjectClassName()
java.lang.Class<?> getObjectClass()
void saveObject(java.lang.Object obj)
obj
- the object to save.java.lang.Object loadObject(java.lang.Object obj)
obj
- the object to load
java.lang.String read(java.lang.String name)
name
- the name
void read(java.io.Reader reader)
reader
- the Readervoid readXML(java.lang.String xml)
xml
- the xml stringboolean failedToRead()
true
if the most recent read operation failedjava.lang.String write(java.lang.String fileName)
fileName
- the file name
void write(java.io.Writer writer)
writer
- the Writerjava.lang.String toXML()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |