|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.controls.XMLPropertyElement
public class XMLPropertyElement
This defines methods for storing data in an xml property element.
Field Summary | |
---|---|
protected java.lang.String |
className
|
protected java.util.List<java.lang.Object> |
content
|
protected java.lang.String |
name
|
protected XMLProperty |
parent
|
protected java.lang.String |
type
|
Constructor Summary | |
---|---|
XMLPropertyElement(XMLProperty mother)
Constructs an empty property element. |
|
XMLPropertyElement(XMLProperty mother,
java.lang.String propertyName,
java.lang.String propertyType,
java.lang.Object value)
Constructs a property element with the specified value. |
Method Summary | |
---|---|
protected java.lang.String |
getArrayString(java.lang.Object array)
Returns a string representation of a primitive array. |
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 xml content for this property. |
java.lang.String |
getPropertyName()
Gets the property name. |
java.lang.String |
getPropertyType()
Gets the property type. |
protected java.lang.String |
indent(int level)
Returns a space for indentation. |
void |
setValue(java.lang.String stringValue)
Sets the value of this property if property type is primitive or string. |
java.lang.String |
toString()
Returns the xml string representation of this property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected XMLProperty parent
protected java.lang.String name
protected java.lang.String type
protected java.lang.String className
protected java.util.List<java.lang.Object> content
Constructor Detail |
---|
public XMLPropertyElement(XMLProperty mother)
mother
- the parentpublic XMLPropertyElement(XMLProperty mother, java.lang.String propertyName, java.lang.String propertyType, java.lang.Object value)
mother
- the parentpropertyName
- the namepropertyType
- the typevalue
- the valueMethod Detail |
---|
public java.lang.String getPropertyName()
getPropertyName
in interface XMLProperty
public java.lang.String getPropertyType()
getPropertyType
in interface XMLProperty
public java.lang.Class<?> getPropertyClass()
getPropertyClass
in interface XMLProperty
public XMLProperty getParentProperty()
getParentProperty
in interface XMLProperty
public int getLevel()
getLevel
in interface XMLProperty
public java.util.List<java.lang.Object> getPropertyContent()
getPropertyContent
in interface XMLProperty
public XMLControl getChildControl(java.lang.String name)
getChildControl
in interface XMLProperty
name
- the property name
public XMLControl[] getChildControls()
getChildControls
in interface XMLProperty
public void setValue(java.lang.String stringValue)
setValue
in interface XMLProperty
stringValue
- the string value of a primitive or string propertypublic java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String indent(int level)
level
- the indent level
protected java.lang.String getArrayString(java.lang.Object array)
array
- the array
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |