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.

Version:
1.0
Author:
Douglas Brown

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<java.lang.Object> 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

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

Returns:
a name

getPropertyType

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

Returns:
the type

getPropertyClass

java.lang.Class<?> getPropertyClass()
Gets the property class.

Returns:
the class

getParentProperty

XMLProperty getParentProperty()
Gets the immediate parent property.

Returns:
the type

getLevel

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

Returns:
the non-negative integer level

getPropertyContent

java.util.List<java.lang.Object> getPropertyContent()
Gets the property content of this property.

Returns:
a list of strings and XMLProperties

getChildControl

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

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

Returns:
an array of XMLControls

setValue

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