public class OfficeFloorDirectEditPolicy<M>
extends org.eclipse.gef.editpolicies.DirectEditPolicy
DirectEditPolicy
for directly editing a value for a Model
.COMPONENT_ROLE, CONNECTION_BENDPOINTS_ROLE, CONNECTION_ENDPOINTS_ROLE, CONNECTION_ROLE, CONTAINER_ROLE, DIRECT_EDIT_ROLE, GRAPHICAL_NODE_ROLE, LAYOUT_ROLE, NODE_ROLE, PRIMARY_DRAG_ROLE, SELECTION_FEEDBACK_ROLE, TREE_CONTAINER_ROLE
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER
Constructor and Description |
---|
OfficeFloorDirectEditPolicy() |
Modifier and Type | Method and Description |
---|---|
<C> void |
allowDirectEdit(DirectEditAdapter<C,M> adapter)
Initialise this
OfficeFloorDirectEditPolicy to allow directly
editing the Model of the EditPolicy host. |
<C> void |
allowDirectEdit(DirectEditInitialiser initialiser,
DirectEditChangeFactory<C,M> factory)
Initialises this
OfficeFloorDirectEditPolicy to allow directly
editing the Model of the EditPolicy host. |
void |
doDirectEdit(org.eclipse.gef.GraphicalEditPart editPart)
Does the direct edit and handles creating the necessary
Command . |
protected org.eclipse.gef.commands.Command |
getDirectEditCommand(org.eclipse.gef.requests.DirectEditRequest request) |
protected void |
showCurrentEditValue(org.eclipse.gef.requests.DirectEditRequest request) |
eraseDirectEditFeedback, eraseSourceFeedback, getCommand, revertOldEditValue, showDirectEditFeedback, showSourceFeedback, storeOldEditValue, understandsRequest
addFeedback, getFeedbackLayer, getHostFigure, getLayer, removeFeedback
public <C> void allowDirectEdit(DirectEditInitialiser initialiser, DirectEditChangeFactory<C,M> factory)
OfficeFloorDirectEditPolicy
to allow directly
editing the Model
of the EditPolicy
host.C
- Change type.initialiser
- DirectEditInitialiser
.factory
- DirectEditChangeFactory
.public <C> void allowDirectEdit(DirectEditAdapter<C,M> adapter)
OfficeFloorDirectEditPolicy
to allow directly
editing the Model
of the EditPolicy
host.C
- Change type.adapter
- DirectEditAdapter
.public void doDirectEdit(org.eclipse.gef.GraphicalEditPart editPart)
Does the direct edit and handles creating the necessary Command
.
This is to be called in
EditPart.performRequest(org.eclipse.gef.Request)
on a
RequestConstants.REQ_DIRECT_EDIT
.
editPart
- GraphicalEditPart
.protected org.eclipse.gef.commands.Command getDirectEditCommand(org.eclipse.gef.requests.DirectEditRequest request)
getDirectEditCommand
in class org.eclipse.gef.editpolicies.DirectEditPolicy
protected void showCurrentEditValue(org.eclipse.gef.requests.DirectEditRequest request)
showCurrentEditValue
in class org.eclipse.gef.editpolicies.DirectEditPolicy
Copyright © 2005–2016. All rights reserved.