Runtime

## org.eclipse.gmf.runtime.diagram.ui.tools
Class TextDirectEditManager

    java.lang.Object
      org.eclipse.gef.tools.DirectEditManager
          org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager

public class TextDirectEditManager
extends DirectEditManager

Constructor Summary
`TextDirectEditManager(GraphicalEditPart source, java.lang.Class editorType, CellEditorLocator locator)`
`TextDirectEditManager(ITextAwareEditPart source)` constructor

Method Summary
`protected void` `bringDown()`
`protected void` `commit()`
`protected ResourceManager` `getResourceManager()` Gets the resource manager to remember the resources allocated for this graphical viewer.
`protected Font` `getScaledFont(IFigure label)` Given a `WrapLabel` object, this will calculate the correct Font needed to display into screen coordinates, taking into account the current mapmode.
`static java.lang.Class` `getTextCellEditorClass(GraphicalEditPart source)`
`static CellEditorLocator` `getTextCellEditorLocator(ITextAwareEditPart source)`
`protected void` `initCellEditor()`
`protected void` `setCellEditor(CellEditor editor)`
`void` `setEditText(java.lang.String toEdit)` This method is used to set the cell editors text
`void` `setLocator(CellEditorLocator locator)`
`void` `show()`
`void` `show(char initialChar)` Performs show and sets the edit string to be the initial character or string
`void` `show(Point location)` Performs show and sends an extra mouse click to the point location so that cursor appears at the mouse click point The Text control does not allow for the cursor to appear at point location but at a character location
`void` `showFeedback()`
`protected void` `unhookListeners()`

Methods inherited from class org.eclipse.gef.tools.DirectEditManager
`createCellEditorOn, createDirectEditRequest, eraseFeedback, getCellEditor, getDirectEditFeature, getDirectEditRequest, getEditPart, isDirty, setDirty, setEditPart`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TextDirectEditManager

    public TextDirectEditManager(ITextAwareEditPart source)

  constructor

Parameters:
  `source` - `GraphicalEditPart` to support direct edit of. The figure of the `source` edit part must be of type `WrapLabel`.

### TextDirectEditManager

    public TextDirectEditManager(GraphicalEditPart source,
                                 java.lang.Class editorType,
                                 CellEditorLocator locator)

Parameters:
  `source` -
  `editorType` -
  `locator` -

Method Detail

### getTextCellEditorLocator

    public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source)

  Parameters:
    `source` - the `ITextAwareEditPart` to determine the cell editor for
  Returns:
    the `CellEditorLocator` that is appropriate for the source `EditPart`

### getTextCellEditorClass

    public static java.lang.Class getTextCellEditorClass(GraphicalEditPart source)

  Parameters:
    `source` - the `GraphicalEditPart` that is used to determine which `CellEditor` class to use.
  Returns:
    the `Class` of the `CellEditor` to use for the text editing.

### getScaledFont

    protected Font getScaledFont(IFigure label)

  Given a `WrapLabel` object, this will calculate the correct Font needed to display into screen coordinates, taking into account the current mapmode. This will typically be used by direct edit cell editors that need to display independent of the zoom or any coordinate mapping that is taking place on the drawing surface.

  Parameters:
    `label` - the `WrapLabel` to use for the font calculation
  Returns:
    the `Font` that is scaled to the screen coordinates. Note: the returned `Font` should not be disposed since it is cached by a common resource manager.

### initCellEditor

    protected void initCellEditor()

### commit

    protected void commit()

  See Also:
    `DirectEditManager.commit()`

### bringDown

    protected void bringDown()

  See Also:
    `DirectEditManager.bringDown()`

### setEditText

    public void setEditText(java.lang.String toEdit)

  This method is used to set the cell editors text

  Parameters:
    `toEdit` - String to be set in the cell editor

### show

    public void show(char initialChar)

  Performs show and sets the edit string to be the initial character or string

  Parameters:
    `initialChar` -

### show

    public void show()

### show

    public void show(Point location)

  Performs show and sends an extra mouse click to the point location so that cursor appears at the mouse click point The Text control does not allow for the cursor to appear at point location but at a character location

  Parameters:
    `location` -

### unhookListeners

    protected void unhookListeners()

### setCellEditor

    protected void setCellEditor(CellEditor editor)

### showFeedback

    public void showFeedback()

### getResourceManager

    protected ResourceManager getResourceManager()

  Gets the resource manager to remember the resources allocated for this graphical viewer. All resources will be disposed when the graphical viewer is closed if they have not already been disposed.

  Returns:

### setLocator

    public void setLocator(CellEditorLocator locator)

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.