com.tensegrity.gui.swt.control.attributetree
Class SwtAttributeTreeModel

java.lang.Object
  extended bycom.tensegrity.gui.swt.control.attributetree.SwtAttributeTreeModel
All Implemented Interfaces:
AttributableOnSetListener, EventListenerTag

public class SwtAttributeTreeModel
extends java.lang.Object
implements AttributableOnSetListener

The model for the SwtAttributeTree. All operations related to attribute values should be performed here. Thereby we reach a useful separation of the attribute data and their visual representation.

Version:
$Id: SwtAttributeTreeModel.java,v 1.11 2006/03/02 11:41:40 BurkhardWick Exp $
Author:
Arnd Houben

Constructor Summary
SwtAttributeTreeModel(SwtAttributeTree attrTree)
          Constructor which requires a reference to the corresponding view, namely an SwtAttributeTree instance
 
Method Summary
 void attributesChanged(AttributableOnSetEvent attributableOnSetEvent)
          Invoked when an attribute in an AttributableOnSet object has changed.
 void changed(AttributeTableItem tableItem)
          This method is called whenever an attribute of this table has been altered
 AttributableOnSet getAttributableOnSet()
          Returns the currently set AttributableOnSet displayed by the attribute tree.
 AttributeSet getCurrentAttributeSet()
          Returns the currently used AttributeSet
 AttributeTableItem getRoot()
          Returns the root item of the currently setted table data
 boolean gotNotified()
          Returns the notified flag
 void rehash()
          Fills the tree with new data, i.e. the currently attributes.
 void setAttributableOnSet(AttributableOnSet attributable)
          Sets the AttributableOnSet to be edited in this tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwtAttributeTreeModel

public SwtAttributeTreeModel(SwtAttributeTree attrTree)
Constructor which requires a reference to the corresponding view, namely an SwtAttributeTree instance

Parameters:
attrTree - the SwtAttributeTree instance this model belongs to
Method Detail

attributesChanged

public void attributesChanged(AttributableOnSetEvent attributableOnSetEvent)
Description copied from interface: AttributableOnSetListener
Invoked when an attribute in an AttributableOnSet object has changed.

Specified by:
attributesChanged in interface AttributableOnSetListener
Parameters:
attributableOnSetEvent - the event carrying information.

setAttributableOnSet

public void setAttributableOnSet(AttributableOnSet attributable)
Sets the AttributableOnSet to be edited in this tree

Parameters:
attributable - the AttributableOnSet to be edited in this tree

rehash

public void rehash()
Fills the tree with new data, i.e. the currently attributes.


changed

public void changed(AttributeTableItem tableItem)
This method is called whenever an attribute of this table has been altered

Parameters:
tableItem - the altered attribute table item

getAttributableOnSet

public AttributableOnSet getAttributableOnSet()
Returns the currently set AttributableOnSet displayed by the attribute tree.

Returns:
the actual AttributableOnSet used by this tree model

getCurrentAttributeSet

public AttributeSet getCurrentAttributeSet()
Returns the currently used AttributeSet

Returns:
the currently used AttributeSet

getRoot

public final AttributeTableItem getRoot()
Returns the root item of the currently setted table data

Returns:
an AttributeTableItem representing the root

gotNotified

public final boolean gotNotified()
Returns the notified flag

Returns:
true if notified flag was set, false otherwise


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