Package org.eclipse.gef.editpolicies
Class AbstractEditPolicy
java.lang.Object
org.eclipse.gef.editpolicies.AbstractEditPolicy
- All Implemented Interfaces:
EditPolicy
,RequestConstants
- Direct Known Subclasses:
ComponentEditPolicy
,ConnectionEditPolicy
,ContainerEditPolicy
,GraphicalEditPolicy
,TreeContainerEditPolicy
The default implementation of
EditPolicy
.
Since this is the default implementation of an interface, this document deals
with proper sub-classing. This class is not the API. For documentation on
proper usage of the public API, see the documentation for the interface
itself: EditPolicy
.
-
Field Summary
Fields inherited from interface org.eclipse.gef.EditPolicy
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
Fields inherited from interface org.eclipse.gef.RequestConstants
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Does nothing by default.void
Does nothing by default.protected final void
debugFeedback
(String message) Deprecated.in 3.1 This method will be removed in future releases.void
eraseSourceFeedback
(Request request) Does nothing by default.void
eraseTargetFeedback
(Request request) Does nothing by default.getCommand
(Request request) Returnsnull
by default.getHost()
getTargetEditPart
(Request request) Returnsnull
by default.void
Sets the host in which this EditPolicy is installed.void
showSourceFeedback
(Request request) Does nothing by default.void
showTargetFeedback
(Request request) Does nothing by default.toString()
boolean
Returnsfalse
by default.
-
Constructor Details
-
AbstractEditPolicy
public AbstractEditPolicy()
-
-
Method Details
-
activate
public void activate()Does nothing by default.- Specified by:
activate
in interfaceEditPolicy
- See Also:
-
deactivate
public void deactivate()Does nothing by default.- Specified by:
deactivate
in interfaceEditPolicy
- See Also:
-
debugFeedback
Deprecated.in 3.1 This method will be removed in future releases.This method will log the message to GEF's trace/debug system if the corrseponding flag for FEEDBACK is set to true.- Parameters:
message
- the String to log
-
eraseSourceFeedback
Does nothing by default.- Specified by:
eraseSourceFeedback
in interfaceEditPolicy
- Parameters:
request
- the Request- See Also:
-
eraseTargetFeedback
Does nothing by default.- Specified by:
eraseTargetFeedback
in interfaceEditPolicy
- Parameters:
request
- the Request- See Also:
-
getCommand
Returnsnull
by default.null
is used to indicate that the EditPolicy does not contribute to the specifiedRequest
.- Specified by:
getCommand
in interfaceEditPolicy
- Parameters:
request
- the Request- Returns:
null
or a Command contribution- See Also:
-
getHost
- Specified by:
getHost
in interfaceEditPolicy
- Returns:
- the host EditPart on which this policy is installed.
- See Also:
-
getTargetEditPart
Returnsnull
by default.null
indicates that this policy is unable to determine the target for the specifiedRequest
.- Specified by:
getTargetEditPart
in interfaceEditPolicy
- Parameters:
request
- the Request- Returns:
null
or the appropriate targetEditPart
- See Also:
-
setHost
Description copied from interface:EditPolicy
Sets the host in which this EditPolicy is installed.- Specified by:
setHost
in interfaceEditPolicy
- Parameters:
host
- the host EditPart- See Also:
-
showSourceFeedback
Does nothing by default.- Specified by:
showSourceFeedback
in interfaceEditPolicy
- Parameters:
request
- the Request- See Also:
-
showTargetFeedback
Does nothing by default.- Specified by:
showTargetFeedback
in interfaceEditPolicy
- Parameters:
request
- the Request- See Also:
-
toString
-
understandsRequest
Returnsfalse
by default.- Specified by:
understandsRequest
in interfaceEditPolicy
- Parameters:
req
- the Request- Returns:
- boolean
true
if the EditPolicy understands the specified request - See Also:
-