|
Eclipse GEF 3.3 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.tools.DirectEditManager
Manages the direct edit operation by creating and maintaining the
CellEditor
and executing the resulting command if
the cell editor value has changed.
Constructor Summary | |
DirectEditManager(GraphicalEditPart source,
Class editorType,
CellEditorLocator locator)
Constructs a new DirectEditManager for the given source edit part. |
|
DirectEditManager(GraphicalEditPart source,
Class editorType,
CellEditorLocator locator,
Object feature)
Constructs a new DirectEditManager for the given source edit part. |
Method Summary | |
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 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DirectEditManager(GraphicalEditPart source, Class editorType, CellEditorLocator locator)
source
- the source edit parteditorType
- the cell editor typelocator
- the locatorpublic DirectEditManager(GraphicalEditPart source, Class editorType, CellEditorLocator locator, 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.Method Detail |
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 on
protected DirectEditRequest createDirectEditRequest()
protected void eraseFeedback()
protected CellEditor getCellEditor()
protected 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()
.
|
Eclipse GEF 3.3 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |