com.tensegrity.gui.swt.inplaceediting
Class InplaceTextEditor

java.lang.Object
  extended bycom.tensegrity.gui.inplaceediting.InplaceEditor
      extended bycom.tensegrity.gui.swt.inplaceediting.InplaceTextEditor

public class InplaceTextEditor
extends InplaceEditor

InplaceEditor instance to use for editing the text of a Label2D or CompositeLabel. A Text instance is placed over the corresponding label.

Version:
$Id: InplaceTextEditor.java,v 1.10 2005/10/05 14:29:11 ArndHouben Exp $
Author:
Arnd Houben

Field Summary
 
Fields inherited from class com.tensegrity.gui.inplaceediting.InplaceEditor
bComp, gPanel, label
 
Constructor Summary
InplaceTextEditor(org.eclipse.swt.widgets.Composite parent, Label2D label, BaseComposite bComp, GraphPanel gPanel, CompositeTable table)
          Creates a new InplaceTextEditor.
 
Method Summary
 void commitChanges()
          Is called on normal edit commits.
 void editingCancelled()
          Is called in case an editing was cancelled.
 java.lang.Object getControl()
          Returns the editor control, i.e. its visual component.
 
Methods inherited from class com.tensegrity.gui.inplaceediting.InplaceEditor
abortEditing, addInplaceEditorListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InplaceTextEditor

public InplaceTextEditor(org.eclipse.swt.widgets.Composite parent,
                         Label2D label,
                         BaseComposite bComp,
                         GraphPanel gPanel,
                         CompositeTable table)
Creates a new InplaceTextEditor.

Parameters:
parent - the parent Composite to add this editor to
label - Primitive to apply inplace editing to
bComp - Composite to apply inplace editing to
gPanel - contains the underlying element which requests inplace editing
table - if inplace editing occurs inside a CompositeTable
Method Detail

getControl

public java.lang.Object getControl()
Description copied from class: InplaceEditor
Returns the editor control, i.e. its visual component.
For a Swing based editor this is usually an instance of a JComponent class and for an SWT based editor this is usually an extend of Control.

Specified by:
getControl in class InplaceEditor
Returns:
the visual editor component for placing into a GUI environment.

commitChanges

public void commitChanges()
Description copied from class: InplaceEditor
Is called on normal edit commits. This method notifies the registered InplaceEditorListener.
Overwriting classes should call this method afterwards to notify a registered class.

Overrides:
commitChanges in class InplaceEditor

editingCancelled

public void editingCancelled()
Description copied from class: InplaceEditor
Is called in case an editing was cancelled. This method notifies the registered InplaceEditorListener.
Overwriting classes should call this method afterwards to notify a registered class.

Overrides:
editingCancelled in class InplaceEditor


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