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_ROLEFields 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 TypeMethodDescriptionvoidactivate()Does nothing by default.voidDoes nothing by default.protected final voiddebugFeedback(String message) Deprecated.in 3.1 This method will be removed in future releases.voideraseSourceFeedback(Request request) Does nothing by default.voideraseTargetFeedback(Request request) Does nothing by default.getCommand(Request request) Returnsnullby default.getHost()getTargetEditPart(Request request) Returnsnullby default.voidSets the host in which this EditPolicy is installed.voidshowSourceFeedback(Request request) Does nothing by default.voidshowTargetFeedback(Request request) Does nothing by default.toString()booleanReturnsfalseby default.
-
Constructor Details
-
AbstractEditPolicy
public AbstractEditPolicy()
-
-
Method Details
-
activate
public void activate()Does nothing by default.- Specified by:
activatein interfaceEditPolicy- See Also:
-
deactivate
public void deactivate()Does nothing by default.- Specified by:
deactivatein 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:
eraseSourceFeedbackin interfaceEditPolicy- Parameters:
request- the Request- See Also:
-
eraseTargetFeedback
Does nothing by default.- Specified by:
eraseTargetFeedbackin interfaceEditPolicy- Parameters:
request- the Request- See Also:
-
getCommand
Returnsnullby default.nullis used to indicate that the EditPolicy does not contribute to the specifiedRequest.- Specified by:
getCommandin interfaceEditPolicy- Parameters:
request- the Request- Returns:
nullor a Command contribution- See Also:
-
getHost
- Specified by:
getHostin interfaceEditPolicy- Returns:
- the host EditPart on which this policy is installed.
- See Also:
-
getTargetEditPart
Returnsnullby default.nullindicates that this policy is unable to determine the target for the specifiedRequest.- Specified by:
getTargetEditPartin interfaceEditPolicy- Parameters:
request- the Request- Returns:
nullor the appropriate targetEditPart- See Also:
-
setHost
Description copied from interface:EditPolicySets the host in which this EditPolicy is installed.- Specified by:
setHostin interfaceEditPolicy- Parameters:
host- the host EditPart- See Also:
-
showSourceFeedback
Does nothing by default.- Specified by:
showSourceFeedbackin interfaceEditPolicy- Parameters:
request- the Request- See Also:
-
showTargetFeedback
Does nothing by default.- Specified by:
showTargetFeedbackin interfaceEditPolicy- Parameters:
request- the Request- See Also:
-
toString
-
understandsRequest
Returnsfalseby default.- Specified by:
understandsRequestin interfaceEditPolicy- Parameters:
req- the Request- Returns:
- boolean
trueif the EditPolicy understands the specified request - See Also:
-