com.tensegrity.gui.component
Interface AttributeTree

All Superinterfaces:
AttributeEditor, BasicComponent, Evaluable
All Known Implementing Classes:
SwingAttributeTree, SwtAttributeTree

public interface AttributeTree
extends AttributeEditor, BasicComponent

This interface specifies the responsibilities of user interface components which render and edit Attribute instances in a treelike fashion. An AttributeTree is divided into categories, each displaying a collection of attributes, and provides a component to display and edit the value for each known AttributeType.

This is the structure of an AttributeSet that can be displayed by an AttributeTree:

 AttributeSet         (MainAttributeSet)
 |
 |--"Node"            AttributeSet 
 |  |                 (CategoryAttributeSet)
 |  |--"Name"         Attribute 
 |  |                 (an Attribute with a simple value)
 |  |--"Format"       Attribute 
 |  |                 (an Attribute with a complex value)
 |  |--"FormatSubSet" AttributeSet 
 |  |  |              (an AttributeSet with subattributes of the complex value)
 |  |  |--"Style"     Attribute 
 |  |  |              (an subattribute which is part of the "Format" attribute)
 |  |  \--"Color"     Attribute 
 |  |                 (an subattribute which is part of the "Format" attribute)
 |  |--"Format"       Attribute 
 |  |                 (an Attribute with a complex value)
 |  |--...
 |
 |--...
 

REVIEWJAVADOC The text below is identical to the text in class AttributeTable. Should they not be merged into a use tag in class AttributeEditor?

Because an AttributeSet cannot be added to a parent AttributeSet directly, it is added as value of an Attribute. The name of that Attribute is then used as name for the category.

In comparison to the AttributeTable, an AttributeTree can display structures with a depth of more than two levels. Thus every AttributeCollection may contain another collection in order to create a hierarchical structure.

Implementations of this class must use the methods getAttributesTree() and setAttributesTree() of the AttributableOnSet instance passed in the AttributeEditor.setAttributableOnSet(AttributableOnSet) method. Attributes are shown in a hierarchical manner such that complex attributes, such as PaintFormat, are further divided into child attributes (color, style etc.).

When editing attributes, the changed attributes must be stored back into the AttributableOnSet by calling the setAttributesTree() method and passing only the changed attributes but embedded in the same structure retrieved by calling getAttributesTree().

All AttributeTree implementations should support the use of an AttributeEditorStateManager that manages the state of the editor e.g. the selection, expanded tree nodes and scroll position. These methods can be used to retrieve or register the used manager implementation:

Version:
$Id: AttributeTree.java,v 1.23 2005/12/02 17:04:54 BurkhardWick Exp $
Author:
Burkhard Wick

Field Summary
static java.lang.String PROPERTYNAME_ENABLE_WRITEPROTECTION
          Deprecated. use AttributeEditorProperties.PROPERTYNAME_ENABLE_WRITEPROTECTION
static java.lang.String PROPERTYNAME_MERGEELEMENTTYPES
          Deprecated. use AttributeEditorProperties.PROPERTYNAME_MERGEELEMENTTYPES
static java.lang.String PROPERTYNAME_RENAMINGALLOWED
          Deprecated. use AttributeEditorProperties.PROPERTYNAME_RENAMINGALLOWED
static java.lang.String PROPERTYNAME_SHOWCATEGORIES
          Deprecated. use AttributeEditorProperties.PROPERTYNAME_SHOWCATEGORIES
 
Fields inherited from interface com.tensegrity.gui.component.AttributeEditor
hiddenPrefix, SORT_ASCENDING, SORT_DESCENDING, SORT_NONE
 
Method Summary
 AttributeEditorStateManager getAttributeEditorStateManager()
          Returns the currently set state manager
 void setAttributeEditorStateManager(AttributeEditorStateManager manager)
          Sets the manager that is used to store and restore the state of the editor depending on the selected item.
 
Methods inherited from interface com.tensegrity.gui.component.AttributeEditor
cancelEditing, getAttributableOnSet, getCurrentAttributeSet, getEditorProperties, hideAttribute, isTree, propertiesChanged, rehash, setAttributableOnSet, setEditorProperties, showAttribute, stopEditing
 
Methods inherited from interface com.tensegrity.gui.component.BasicComponent
getHeight, getParentComponent, getWidth, repaint
 
Methods inherited from interface com.tensegrity.gui.Evaluable
applyEvList, installEvList
 

Field Detail

PROPERTYNAME_SHOWCATEGORIES

public static final java.lang.String PROPERTYNAME_SHOWCATEGORIES
Deprecated. use AttributeEditorProperties.PROPERTYNAME_SHOWCATEGORIES

AttributeEditorProperties.PROPERTYNAME_SHOWCATEGORIES

See Also:
Constant Field Values

PROPERTYNAME_MERGEELEMENTTYPES

public static final java.lang.String PROPERTYNAME_MERGEELEMENTTYPES
Deprecated. use AttributeEditorProperties.PROPERTYNAME_MERGEELEMENTTYPES

AttributeEditorProperties.PROPERTYNAME_MERGEELEMENTTYPES

See Also:
Constant Field Values

PROPERTYNAME_RENAMINGALLOWED

public static final java.lang.String PROPERTYNAME_RENAMINGALLOWED
Deprecated. use AttributeEditorProperties.PROPERTYNAME_RENAMINGALLOWED

AttributeEditorProperties.PROPERTYNAME_RENAMINGALLOWED

See Also:
Constant Field Values

PROPERTYNAME_ENABLE_WRITEPROTECTION

public static final java.lang.String PROPERTYNAME_ENABLE_WRITEPROTECTION
Deprecated. use AttributeEditorProperties.PROPERTYNAME_ENABLE_WRITEPROTECTION

AttributeEditorProperties.PROPERTYNAME_ENABLE_WRITEPROTECTION

See Also:
Constant Field Values
Method Detail

setAttributeEditorStateManager

public void setAttributeEditorStateManager(AttributeEditorStateManager manager)
Sets the manager that is used to store and restore the state of the editor depending on the selected item.

Parameters:
manager - The manager to set

Find more information in the class documentation


getAttributeEditorStateManager

public AttributeEditorStateManager getAttributeEditorStateManager()
Returns the currently set state manager

Returns:
the currently set state manager

Find more information in the class documentation



Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.