com.tensegrity.gui.swing.inplaceediting
Class InplaceEditorConfigurator

java.lang.Object
  extended bycom.tensegrity.gui.swing.inplaceediting.InplaceEditorConfigurator

public class InplaceEditorConfigurator
extends java.lang.Object

The InplaceEditorConfigurator that is used to configure the inplace editor component whenever a label is edited in the view.

To use this callback, you have to register it to the SwingGraphPanel using SwingGraphPanel.setInplaceEditorConfigurator(InplaceEditorConfigurator)

Author:
BurkhardWick

Constructor Summary
InplaceEditorConfigurator()
          Constructor
 
Method Summary
 javax.swing.text.Document getTextDocument(BaseComposite bc, Label2D label)
          Returns the text document that should be used for editing the given label.
 boolean useSingleLineEditing(BaseComposite bc, Label2D label)
          Returns true, if the editor component should be used for single lines only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InplaceEditorConfigurator

public InplaceEditorConfigurator()
Constructor

Method Detail

useSingleLineEditing

public boolean useSingleLineEditing(BaseComposite bc,
                                    Label2D label)
Returns true, if the editor component should be used for single lines only. Enter will commit changes in this mode.

Parameters:
bc - The BaseComposite the label belongs to
label - The Label2D that will be edited
Returns:
true for single line editing, false otherwise

getTextDocument

public javax.swing.text.Document getTextDocument(BaseComposite bc,
                                                 Label2D label)
Returns the text document that should be used for editing the given label.

Parameters:
bc - The BaseComposite the label belongs to
label - The Label2D that will be edited
Returns:
the text document that should be used for editing the given label. If null is returned, the default text document is used.


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