com.tensegrity.gui.swing.customattribute
Class ItemListAttributeEditor

java.lang.Object
  extended bycom.tensegrity.gui.swing.customattribute.ItemListAttributeEditor
All Implemented Interfaces:
CustomAttributeEditor

public class ItemListAttributeEditor
extends java.lang.Object
implements CustomAttributeEditor

ItemListAttributeEditor

: Editor for ItemListAttributes.

Author:
BurkhardWick

Constructor Summary
ItemListAttributeEditor(java.lang.Object[] items)
          Constructor
 
Method Summary
 java.lang.Object getComponent(CustomAttributeEditorEnvironment environment)
          All those editors which return false in the isStandalone method *must* return a valid instance of a Component here to let the AttributeTable layout it as an in-place editor.
 java.lang.Object getValue()
          Returns the currently edited value of the editor.
 boolean isStandalone()
          Returns true for all editors that display a modal dialog for editing of the value.
 void setValue(java.lang.Object value)
          Sets the value on the editor.
 void showEditor(CustomAttributeEditorEnvironment environment)
          This method will be invoked to initiate the editing process.
 boolean wasCanceled()
          This method is checked right after the showEditor method returns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemListAttributeEditor

public ItemListAttributeEditor(java.lang.Object[] items)
Constructor

Parameters:
items - The items of the combo
Method Detail

setValue

public void setValue(java.lang.Object value)
Description copied from interface: CustomAttributeEditor
Sets the value on the editor.

Specified by:
setValue in interface CustomAttributeEditor
Parameters:
value - the value to be edited.

getValue

public java.lang.Object getValue()
Description copied from interface: CustomAttributeEditor
Returns the currently edited value of the editor.

Specified by:
getValue in interface CustomAttributeEditor
Returns:
the currently edited value.

isStandalone

public boolean isStandalone()
Description copied from interface: CustomAttributeEditor
Returns true for all editors that display a modal dialog for editing of the value. It returns false if the editor will provide an in-place editor which will be shown inside of the AttributeEditor.

Specified by:
isStandalone in interface CustomAttributeEditor
Returns:
true for editors that are using a modal dialog for editing

getComponent

public java.lang.Object getComponent(CustomAttributeEditorEnvironment environment)
Description copied from interface: CustomAttributeEditor
All those editors which return false in the isStandalone method *must* return a valid instance of a Component here to let the AttributeTable layout it as an in-place editor. If isStandalone returns true, this method is ignored.

NOTE: the implementation of CustomAttributeEditor is then responsible to delegate the setValue and getValue calls to this Component.

Specified by:
getComponent in interface CustomAttributeEditor
Parameters:
environment - The environment with information about where the editor will be used.
Returns:
an instance of Component to be used as an editor.

showEditor

public void showEditor(CustomAttributeEditorEnvironment environment)
Description copied from interface: CustomAttributeEditor
This method will be invoked to initiate the editing process. For all those editors which are standalone this call is useful to open the frame, window,dialog or whatever is used to realize the editor. This method has to be synchronous, so that the method will return after editing is completely finished.

Specified by:
showEditor in interface CustomAttributeEditor
Parameters:
environment - The environment with information about where the editor will be used.

wasCanceled

public boolean wasCanceled()
Description copied from interface: CustomAttributeEditor
This method is checked right after the showEditor method returns. If an editor returns true, no further changes are made to the value and the whole editing process is treated as it was canceled by the user.

Specified by:
wasCanceled in interface CustomAttributeEditor
Returns:
true, if the editor was canceled.


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