com.tensegrity.gui.swing.control.attributetree
Class DefaultSwingAttributeTreeStateManager

java.lang.Object
  extended bycom.tensegrity.gui.swing.control.attributetree.DefaultSwingAttributeTreeStateManager
All Implemented Interfaces:
AttributeEditorStateManager

public class DefaultSwingAttributeTreeStateManager
extends java.lang.Object
implements AttributeEditorStateManager

This implementation of the AttributeEditorStateManager. It will store the expanded nodes and the selection to restore it when the item is selected in the SwingAttributeTree again.

Author:
BurkhardWick

Constructor Summary
DefaultSwingAttributeTreeStateManager(SwingAttributeTree tree)
          Constructor
 
Method Summary
 boolean isAutoExpandNewPaths()
          Returns true if new paths in the AttributeSets of the Attributables should be expanded automatically.
 boolean isAutoExpandSelectedRow()
          Returns true, if the selected row will be automatically expanded
 boolean isUsingExactMatching()
          Returns true, if states are stored for each specific instance of an AttributableOnSet.
 void restoreEditorState(AttributableOnSet attributable)
          Restores the state for the given AttributableOnSet when it is assigned to the AttributeEditor.
 void setAutoExpandNewPaths(boolean autoExpandNewPaths)
          Enables/disables the automatic expansion of newly added attribute paths.
 void setAutoExpandSelectedRow(boolean autoExpandSelectedRow)
          Sets the autoexpand feature for selected rows.
 void storeEditorState(AttributableOnSet attributable)
          Stores the state for the given AttributableOnSet when it is removed from the AttributeEditor.
 void useExactMatching(boolean useExactMatching)
          Turns on/off the exact matching of AttributableOnSets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSwingAttributeTreeStateManager

public DefaultSwingAttributeTreeStateManager(SwingAttributeTree tree)
Constructor

Parameters:
tree - The SwingAttributeTree this manager belongs to
Method Detail

storeEditorState

public void storeEditorState(AttributableOnSet attributable)
Description copied from interface: AttributeEditorStateManager
Stores the state for the given AttributableOnSet when it is removed from the AttributeEditor.

Specified by:
storeEditorState in interface AttributeEditorStateManager
Parameters:
attributable - The item to store the state for, might be null

restoreEditorState

public void restoreEditorState(AttributableOnSet attributable)
Description copied from interface: AttributeEditorStateManager
Restores the state for the given AttributableOnSet when it is assigned to the AttributeEditor.

Specified by:
restoreEditorState in interface AttributeEditorStateManager
Parameters:
attributable - The item to restore the state for, might be null

isAutoExpandSelectedRow

public boolean isAutoExpandSelectedRow()
Returns true, if the selected row will be automatically expanded

Returns:
true, if the selected row will be automatically expanded

setAutoExpandSelectedRow

public void setAutoExpandSelectedRow(boolean autoExpandSelectedRow)
Sets the autoexpand feature for selected rows.

Parameters:
autoExpandSelectedRow - true, if the selected rows should be automatically expanded

isUsingExactMatching

public boolean isUsingExactMatching()
Returns true, if states are stored for each specific instance of an AttributableOnSet.

Returns:
true, if states are stored for each specific instance of an AttributableOnSet.

useExactMatching

public void useExactMatching(boolean useExactMatching)
Turns on/off the exact matching of AttributableOnSets.

Parameters:
useExactMatching - true, to enable the exact matching of AttributableOnSets

isAutoExpandNewPaths

public boolean isAutoExpandNewPaths()
Returns true if new paths in the AttributeSets of the Attributables should be expanded automatically.

Returns:
true if new paths in the AttributeSets of the Attributables should be expanded automatically.

setAutoExpandNewPaths

public void setAutoExpandNewPaths(boolean autoExpandNewPaths)
Enables/disables the automatic expansion of newly added attribute paths. This makes it necessary to store all current attribute paths of an Attributable, so it might take some time and memory.

Parameters:
autoExpandNewPaths - true to enable automatic expanding of new paths


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