com.tensegrity.gui.swt.control.attributetree.editors
Class AttributeTableItemEditor

java.lang.Object
  extended bycom.tensegrity.gui.swt.control.attributetree.editors.AttributeTableItemEditor
All Implemented Interfaces:
AbstractAttributeTableItemEditor
Direct Known Subclasses:
AnchorItemEditor, BooleanItemEditor, ColorItemEditor, DoubleItemEditor, EnumConstraintItemEditor, FontFormatItemEditor, IntegerItemEditor, MarkerFormatItemEditor, MetricExpressionItemEditor, PaintFormatItemEditor, RasterItemEditor, StrokeFormatItemEditor, TextItemEditor

public abstract class AttributeTableItemEditor
extends java.lang.Object
implements AbstractAttributeTableItemEditor

This abstract class provides a default implementation of the AbstractAttributeTableItemEditor interface, except for the getEditorControl method which is unique for each implementing class.

Version:
$Id: AttributeTableItemEditor.java,v 1.4 2005/09/14 13:53:59 ArndHouben Exp $
Author:
Arnd Houben

Field Summary
protected  java.lang.Object newValue
          this field holds the new, i.e. changed, attribute value
 
Constructor Summary
AttributeTableItemEditor(AttributeTableItem tableItem)
          Constructor which needs the AttributeTableItem which should be edited.
 
Method Summary
 void addEditorListener(AttributeEditorListener listener)
          Adds the specified editor listener to the list of all listeners
abstract  void dispose()
          Callback method which is invoked to signal that the current editor is asked to remove itself.
 AttributeTableItem getItem()
          Returns the AttributeTableItem which should be edit
 java.lang.Object getValue()
          Returns the changed value or null if none exists or no change happened
 void notifyListeners()
          Notifies each registered listener that an attribute has been changed
 void removeEditorListener(AttributeEditorListener listener)
          Removes the specified editor listener from the list of all listeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tensegrity.gui.swt.control.attributetree.editors.AbstractAttributeTableItemEditor
getEditorControl
 

Field Detail

newValue

protected java.lang.Object newValue
this field holds the new, i.e. changed, attribute value

Constructor Detail

AttributeTableItemEditor

public AttributeTableItemEditor(AttributeTableItem tableItem)
Constructor which needs the AttributeTableItem which should be edited.

Parameters:
tableItem - the AttributeTableItem to edit
Method Detail

addEditorListener

public final void addEditorListener(AttributeEditorListener listener)
Description copied from interface: AbstractAttributeTableItemEditor
Adds the specified editor listener to the list of all listeners

Specified by:
addEditorListener in interface AbstractAttributeTableItemEditor
Parameters:
listener - an arbitrary AttributeEditorListener

removeEditorListener

public final void removeEditorListener(AttributeEditorListener listener)
Description copied from interface: AbstractAttributeTableItemEditor
Removes the specified editor listener from the list of all listeners

Specified by:
removeEditorListener in interface AbstractAttributeTableItemEditor
Parameters:
listener - an arbitrary AttributeEditorListener

notifyListeners

public void notifyListeners()
Description copied from interface: AbstractAttributeTableItemEditor
Notifies each registered listener that an attribute has been changed

Specified by:
notifyListeners in interface AbstractAttributeTableItemEditor

getValue

public final java.lang.Object getValue()
Description copied from interface: AbstractAttributeTableItemEditor
Returns the changed value or null if none exists or no change happened

Specified by:
getValue in interface AbstractAttributeTableItemEditor
Returns:
the new value of an attribute

getItem

public AttributeTableItem getItem()
Description copied from interface: AbstractAttributeTableItemEditor
Returns the AttributeTableItem which should be edit

Specified by:
getItem in interface AbstractAttributeTableItemEditor
Returns:
the adjusted AttributeTableItem

dispose

public abstract void dispose()
Description copied from interface: AbstractAttributeTableItemEditor
Callback method which is invoked to signal that the current editor is asked to remove itself. For implementing classes this is a good place to free occupied resources.

Specified by:
dispose in interface AbstractAttributeTableItemEditor


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