public abstract class DirectEditManager
extends java.lang.Object
CellEditor
and executing the resulting
command if the cell editor value has changed.Modifier and Type | Class and Description |
---|---|
protected static class |
DirectEditManager.DirectEditBorder
The border used to 'frame' the cell editor.
|
Constructor and Description |
---|
DirectEditManager(GraphicalEditPart source,
java.lang.Class editorType,
CellEditorLocator locator)
Constructs a new DirectEditManager for the given source edit part.
|
DirectEditManager(GraphicalEditPart source,
java.lang.Class editorType,
CellEditorLocator locator,
java.lang.Object feature)
Constructs a new DirectEditManager for the given source edit part.
|
Modifier and Type | Method and Description |
---|---|
protected void |
bringDown()
Cleanup is done here.
|
protected void |
commit()
Commits the current value of the cell editor by getting a
Command
from the source edit part and executing it via the CommandStack . |
protected CellEditor |
createCellEditorOn(Composite composite)
Creates the cell editor on the given composite.
|
protected DirectEditRequest |
createDirectEditRequest()
Creates and returns the DirectEditRequest.
|
protected void |
eraseFeedback()
Asks the source edit part to erase source feedback.
|
protected CellEditor |
getCellEditor()
Returns the cell editor.
|
protected IFigure |
getCellEditorFrame()
Returns the IFigure, which is used to 'embed' the cell editor control.
|
protected java.lang.Object |
getDirectEditFeature() |
protected DirectEditRequest |
getDirectEditRequest()
Returns the direct edit request, creating it if needed.
|
protected GraphicalEditPart |
getEditPart()
Returns the source edit part.
|
protected CellEditorLocator |
getLocator() |
protected void |
handleValueChanged() |
protected void |
hookListeners() |
protected abstract void |
initCellEditor()
Initializes the cell editor.
|
protected boolean |
isDirty()
Returns
true if the cell editor's value has been changed. |
protected void |
setCellEditor(CellEditor editor)
Sets the cell editor to the given editor.
|
protected void |
setDirty(boolean value)
Sets the dirty property.
|
protected void |
setEditPart(GraphicalEditPart source)
Sets the source edit part.
|
void |
setLocator(CellEditorLocator locator)
Sets the CellEditorLocator used to place the cell editor in the correct
location.
|
void |
show()
Shows the cell editor when direct edit is started.
|
void |
showFeedback()
Asks the source edit part to show source feedback.
|
protected void |
unhookListeners()
Unhooks listeners.
|
public DirectEditManager(GraphicalEditPart source, java.lang.Class editorType, CellEditorLocator locator)
source
- the source edit parteditorType
- the cell editor typelocator
- the locatorpublic DirectEditManager(GraphicalEditPart source, java.lang.Class editorType, CellEditorLocator locator, java.lang.Object feature)
source
- the source edit parteditorType
- the cell editor typelocator
- the locatorfeature
- If the EditPart supports direct editing of multiple features,
this parameter can be used to discriminate among them.protected void bringDown()
null
, it will be
deativated
, disposed
, and set to null
.protected void commit()
Command
from the source edit part and executing it via the CommandStack
.
Finally, bringDown()
is called to perform and necessary cleanup.protected CellEditor createCellEditorOn(Composite composite)
composite
- the composite to create the cell editor onprotected DirectEditRequest createDirectEditRequest()
protected void eraseFeedback()
protected CellEditor getCellEditor()
protected IFigure getCellEditorFrame()
IFigure
to be used as frame around the cell editor
control.protected java.lang.Object getDirectEditFeature()
Object
that can be used if the EditPart supports
direct editing of multiple features, this parameter can be used
to discriminate among them.protected DirectEditRequest getDirectEditRequest()
protected GraphicalEditPart getEditPart()
protected CellEditorLocator getLocator()
protected void handleValueChanged()
protected void hookListeners()
protected abstract void initCellEditor()
VerifyListeners
, if needed.protected boolean isDirty()
true
if the cell editor's value has been changed.true
if the cell editor is dirtyprotected void setCellEditor(CellEditor editor)
editor
- the cell editorprotected void setDirty(boolean value)
value
- the dirty propertyprotected void setEditPart(GraphicalEditPart source)
source
- the source edit partpublic void setLocator(CellEditorLocator locator)
locator
- the locatorpublic void show()
initCellEditor()
, CellEditor.activate()
, and
showFeedback()
.public void showFeedback()
protected void unhookListeners()
bringDown()
.Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.