Package org.opensourcephysics.controls
Interface XMLProperty
- All Known Subinterfaces:
XMLControl
- All Known Implementing Classes:
XMLControlElement
,XMLNode
,XMLPropertyElement
public interface XMLProperty
This defines methods for storing data in an xml property element.
- Version:
- 1.0
- Author:
- Douglas Brown
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String[]
-
Method Summary
Modifier and TypeMethodDescriptiongetChildControl
(String name) Gets the named XMLControl child of this property.Gets the XMLControl children of this property.static int
getDataType
(Object obj) Gets the XMLProperty type for a Java object.int
getLevel()
Gets the level of this property relative to root.Gets the immediate parent property.Class<?>
Gets the property class.Clone the property content of this property.Gets the property name.int
Gets the property type.static int
getTypeCode
(String type) static String
getTypeName
(int type) void
Sets the value of this property if property type is primitive or string.
-
Field Details
-
TYPE_UNKNOWN
static final int TYPE_UNKNOWN- See Also:
-
TYPE_INT
static final int TYPE_INT- See Also:
-
TYPE_DOUBLE
static final int TYPE_DOUBLE- See Also:
-
TYPE_BOOLEAN
static final int TYPE_BOOLEAN- See Also:
-
TYPE_STRING
static final int TYPE_STRING- See Also:
-
TYPE_ARRAY
static final int TYPE_ARRAY- See Also:
-
TYPE_COLLECTION
static final int TYPE_COLLECTION- See Also:
-
TYPE_OBJECT
static final int TYPE_OBJECT- See Also:
-
TYPE_WRAPPED_ARRAY
static final int TYPE_WRAPPED_ARRAY- See Also:
-
types
-
-
Method Details
-
getTypeName
-
getTypeCode
-
getDataType
Gets the XMLProperty type for a Java object.- Parameters:
obj
- the object- Returns:
- the type
-
getPropertyName
String getPropertyName()Gets the property name.- Returns:
- a name
-
getPropertyType
int getPropertyType()Gets the property type.- Returns:
- the type
-
getPropertyClass
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
Clone the property content of this property.- Returns:
- a list of strings and XMLProperties
-
getChildControl
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
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
-