|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectDefaultMutableTreeNode
DefaultMutableTreeNode
NamedTreeNode
MetadataTreeNode
public final class MetadataTreeNode
A node in the tree produced by MetadataTreeTable. The value returned by the
toString() method is the programmatic name of the element or attribute
represented by this node. The values returned by the getValueAt(int) method are
the values for the columns documented in the MetadataTreeTable javadoc. Those
values are also accessible by specific getter methods:
getLabel()getDescription()getValueType()getOccurrences()getUserObject() (this column may be omitted - see MetadataTreeTable)getDefaultValue()getValueRestriction()
By default the value returned by getAllowsChildren() is:
true if the node is an element.false if the node is an attribute.
| coverage/geotk-coverageio (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from class DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Method Summary | |
|---|---|
Class<?> |
getColumnClass(int column)
Returns the most specific superclass of values that can be stored in the given column. |
int |
getColumnCount()
Returns the number of columns supported by this TreeTableNode. |
Object |
getDefaultValue()
Returns the default value, or null if none. |
String |
getDescription()
Returns the description, or null if none. |
String |
getLabel()
Returns the display label. |
String |
getName()
Returns the programmatic name of this node. |
NumberRange<Integer> |
getOccurrences()
Returns the range of occurrences that are valid for this node. |
MetadataTreeNode |
getParent()
Returns the parent of this node. |
Object |
getUserObject()
Returns the value of this node, or null if none. |
Object |
getValueAt(int column)
Gets the value for this node that corresponds to a particular tabular column. |
ValueRestriction |
getValueRestriction()
Returns the range or the enumeration of valid values. |
Class<?> |
getValueType()
Returns the type of user object that can be associated to the element or attribute. |
boolean |
isEditable(int column)
Determines whether the specified column is editable. |
void |
setUserObject(Object value)
Sets the value of this node. |
void |
setValueAt(Object value,
int column)
Sets the value for the given column. |
| Methods inherited from class NamedTreeNode |
|---|
setName, toString |
| Methods inherited from class DefaultMutableTreeNode |
|---|
children, getLocale |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface TreeNode |
|---|
children, toString |
| Methods inherited from interface TreeNode |
|---|
getAllowsChildren, getChildAt, getChildCount, getIndex, isLeaf |
| Methods inherited from interface MutableTreeNode |
|---|
insert, remove, remove, removeFromParent, setParent |
| Method Detail |
|---|
public final MetadataTreeNode getParent()
getParent in interface TreeNodegetParent in class DefaultMutableTreeNodenull if none.public final String getName()
getName in class NamedTreeNodepublic String getLabel()
public String getDescription()
null if none. The description will be localized
in the Tree Table locale, if possible.
null if none.public NumberRange<Integer> getOccurrences()
null since the minimum value of occurrences
is at least 0.
public Class<?> getValueType()
Collection types are converted to array types. If the node is not
allowed to store any object, then this method returns null.
null if this node does not allow value.public ValueRestriction getValueRestriction()
null.
null if none.public Object getDefaultValue()
null if none.
null if none.public Object getUserObject()
null if none. This property is the only one
which can be modified by a setter method. If the
MetadataTreeTable contains an IIOMetadata instance, then the user object
is initialized to the value extracted from the IIOMetadata.
getUserObject in class DefaultMutableTreeNodenull.
public void setUserObject(Object value)
throws IllegalArgumentException
getValueType() and getValueRestriction().
setUserObject in interface MutableTreeNodesetUserObject in class DefaultMutableTreeNodevalue - The value to give to this node (can be null).
IllegalArgumentException - if the given value is not an instance of the
expected type or violates a
value restriction.setValueAt(Object, int)public int getColumnCount()
TreeTableNode. This method returns
7 if the tree table
contains the data of an IIOMetadata object, or the above value minus one otherwise.
getColumnCount in interface TreeTableNodepublic Class<?> getColumnClass(int column)
getColumnCount() exclusive. They
are the same numbers than the ones used for the getValueAt(int) method.
getColumnClass in interface TreeTableNodecolumn - The column to query.
public Object getValueAt(int column)
getColumnCount() exclusive.
Each column maps to a getter methods of this class, in this order:
getLabel()getDescription()getValueType()getOccurrences()getUserObject() (this column may be omitted - see below)getDefaultValue()getValueRestriction()
Note that if the tree table does not map a IIOMetadata object, then there is
no column for getUserObject() and the number of all following columns are
shifted by one.
Note:
If the behavior of this method is changed, then IIOMetadataTreeTable
implementation needs to be modified accordingly.
getValueAt in interface TreeTableNodecolumn - The column to query.
public void setValueAt(Object value,
int column)
VALUE_COLUMN and
that column exists (i.e. an instance of IIOMetadata has been specified
to MetadataTreeTable).IIOMetadataFormat.VALUE_NONE).Otherwise this method does nothing.
setValueAt in interface TreeTableNodevalue - The value to set.column - The column to set the value on.public boolean isEditable(int column)
MetadataTreeTable.VALUE_COLUMN is editable, and only if that column exists.
This column does not exist if no IIOMetadata instance was specified
to MetadataTreeTable.
isEditable in interface TreeTableNodecolumn - The column to query.
true if the column is editable, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||