org.opensourcephysics.controls
Interface XMLProperty

All Known Subinterfaces:
XMLControl
All Known Implementing Classes:
XMLControlElement, XMLPropertyElement

public interface XMLProperty

This defines methods for storing data in an xml property element.


Method Summary
 XMLControl getChildControl(java.lang.String name)
          Gets the named XMLControl child of this property.
 XMLControl[] getChildControls()
          Gets the XMLControl children of this property.
 int getLevel()
          Gets the level of this property relative to root.
 XMLProperty getParentProperty()
          Gets the immediate parent property.
 java.lang.Class getPropertyClass()
          Gets the property class.
 java.util.List getPropertyContent()
          Gets the property content of this property.
 java.lang.String getPropertyName()
          Gets the property name.
 java.lang.String getPropertyType()
          Gets the property type.
 void setValue(java.lang.String stringValue)
          Sets the value of this property if property type is primitive or string.
 

Method Detail

getPropertyName

public java.lang.String getPropertyName()
Gets the property name.

Returns:
a name

getPropertyType

public java.lang.String getPropertyType()
Gets the property type.

Returns:
the type

getPropertyClass

public java.lang.Class getPropertyClass()
Gets the property class.

Returns:
the class

getParentProperty

public XMLProperty getParentProperty()
Gets the immediate parent property.

Returns:
the type

getLevel

public int getLevel()
Gets the level of this property relative to root.

Returns:
the non-negative integer level

getPropertyContent

public java.util.List getPropertyContent()
Gets the property content of this property.

Returns:
a list of strings and XMLProperties

getChildControl

public XMLControl getChildControl(java.lang.String name)
Gets the named XMLControl child of this property. May return null.

Parameters:
name - the property name
Returns:
the XMLControl

getChildControls

public XMLControl[] getChildControls()
Gets the XMLControl children of this property.

Returns:
an array of XMLControls

setValue

public void setValue(java.lang.String stringValue)
Sets the value of this property if property type is primitive or string. This does nothing for other property types.

Parameters:
stringValue - the string value of a primitive or string property