|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The AttributeEditor interface defines a GUI
component which is used to display the AttributeSet of an
AttributableOnSet.
There are basically two different subtypes of AttributeEditor,
which can be determined at runtime by calling the method isTree(). See
AttributeTree and
AttributeTable for more details.
Use method setAttributableOnSet() to assign an AttributableOnSet
instance to this AttributeEditor. Once the AttributableOnSet is
assigned, its attributes are displayed in the AttributeEditor gui component.
To update the values of the AttributeEditor invoke its method
rehash().
An AttributeEditor edits any AttributeSet
retrieved from an AttributableOnSet. To access the currently assigned
instance you can use the following methods:
AttributableOnSet getAttributableOnSet()void setAttributableOnSet(AttributableOnSet)AttributeSet getCurrentAttributeSet()
The AttributeEditor can be configured by using the
AttributeEditorProperties that contain sort modes, visibility
settings and generic properties that can be defined by the specific
implementation.
AttributeEditorProperties getEditorProperties()void propertiesChanged()void hideAttribute(String)void showAttribute(String)In addition to the above there are these methods that control the edit and update behavior:
void cancelEditing()boolean stopEditing()void rehash()boolean isTree()
| Field Summary | |
static java.lang.String |
hiddenPrefix
Prefix for attributes which should not be shown in the table. |
static int |
SORT_ASCENDING
Deprecated. use AttributeEditorProperties.SORTMODE_ASCENDING ! |
static int |
SORT_DESCENDING
Deprecated. use AttributeEditorProperties.SORTMODE_DESCENDING ! |
static int |
SORT_NONE
Deprecated. use AttributeEditorProperties.SORTMODE_NONE ! |
| Method Summary | |
void |
cancelEditing()
Cancels editing and discards changes. |
AttributableOnSet |
getAttributableOnSet()
Returns the current AttributableOnSet. |
AttributeSet |
getCurrentAttributeSet()
Returns the currently active AttributeSet. |
AttributeEditorProperties |
getEditorProperties()
This method returns an instance of the currently used AttributeTableProperties instance. |
void |
hideAttribute(java.lang.String name)
Hides the attribute identified by the given name. |
boolean |
isTree()
Returns true, if this editor is displaying an AttributeTree and will
call get/setAttributesTree() instead of get/setAttributes(). |
void |
propertiesChanged()
Called from the AttributeEditorProperties when a setting
changed. |
void |
rehash()
Reloads the AttributeSet from the
AttributableOnSet and refreshes the view. |
void |
setAttributableOnSet(AttributableOnSet attributable)
Sets the AttributableOnSet that should be shown in the
editor. |
AttributeEditorProperties |
setEditorProperties(AttributeEditorProperties editorProperties)
This method sets an instance of the AttributeTableProperties to be used. |
void |
showAttribute(java.lang.String name)
Toggles the hidden flag for an attribute identified by the given name. |
boolean |
stopEditing()
Stops the editing of an Attribute and saves the current value. |
| Field Detail |
public static final int SORT_NONE
AttributeEditorProperties.SORTMODE_NONE !
public static final int SORT_ASCENDING
AttributeEditorProperties.SORTMODE_ASCENDING !
public static final int SORT_DESCENDING
AttributeEditorProperties.SORTMODE_DESCENDING !
public static final java.lang.String hiddenPrefix
| Method Detail |
public void setAttributableOnSet(AttributableOnSet attributable)
AttributableOnSet that should be shown in the
editor. The parameter may be null in which case the editor will be empty.
attributable - the AttributableOnSet to set.public AttributableOnSet getAttributableOnSet()
AttributableOnSet. This might be null.
AttributableOnSet or null, if the editor
is empty.public AttributeSet getCurrentAttributeSet()
AttributeSet. This set is the
instance that is currently shown in the editor, while retrieving the
AttributableOnSet and calling
AttributableOnSet.getAttributes() or
AttributableOnSet.getAttributesTree() might return a clone of
the AttributeSet.
Note: Changes to the AttributeSet will not have an effect
on the AttributableOnSet and changes in the structure will
not be visible in the editor. Changes will be discarded when an event
occurrs that requires reloading the AttributeSet from the
AttributableOnSet.
AttributeSet that is currently
shown in the editor.public void hideAttribute(java.lang.String name)
GEOMETRY.X or COMPOSITE.name.
This method will just forward the call to
AttributeEditorProperties.setVisible(String, boolean)
name - the full name of the attribute.public void showAttribute(java.lang.String name)
hideAttribute(String), this
name describes the full path to the attribute.
This method will just forward the call to
AttributeEditorProperties.setVisible(String, boolean)
name - the full name of the attribute.public AttributeEditorProperties getEditorProperties()
AttributeTableProperties instance.
public AttributeEditorProperties setEditorProperties(AttributeEditorProperties editorProperties)
AttributeTableProperties to be used.
editorProperties - The properties instance that should
be used by this editor
public void propertiesChanged()
AttributeEditorProperties when a setting
changed. The editor implementation should rehash the attributes whenever
this method is called.
public boolean stopEditing()
Attribute and saves the current value.
public void cancelEditing()
public void rehash()
AttributeSet from the
AttributableOnSet and refreshes the view.
public boolean isTree()
AttributeTree and will
call get/setAttributesTree() instead of get/setAttributes().
AttributeTree
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||