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
public abstract class AbstractEditPolicy extends java.lang.Object implements EditPolicy, RequestConstants
The default implementation ofEditPolicy.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 Constructor Description AbstractEditPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidactivate()Does nothing by default.voiddeactivate()Does nothing by default.protected voiddebugFeedback(java.lang.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.CommandgetCommand(Request request)Returnsnullby default.EditPartgetHost()EditPartgetTargetEditPart(Request request)Returnsnullby default.voidsetHost(EditPart host)Sets the host in which this EditPolicy is installed.voidshowSourceFeedback(Request request)Does nothing by default.voidshowTargetFeedback(Request request)Does nothing by default.java.lang.StringtoString()booleanunderstandsRequest(Request req)Returnsfalseby default.
-
-
-
Method Detail
-
activate
public void activate()
Does nothing by default.- Specified by:
activatein interfaceEditPolicy- See Also:
EditPolicy.activate()
-
deactivate
public void deactivate()
Does nothing by default.- Specified by:
deactivatein interfaceEditPolicy- See Also:
EditPolicy.deactivate()
-
debugFeedback
protected final void debugFeedback(java.lang.String message)
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
public void eraseSourceFeedback(Request request)
Does nothing by default.- Specified by:
eraseSourceFeedbackin interfaceEditPolicy- Parameters:
request- the Request- See Also:
EditPolicy.eraseSourceFeedback(Request)
-
eraseTargetFeedback
public void eraseTargetFeedback(Request request)
Does nothing by default.- Specified by:
eraseTargetFeedbackin interfaceEditPolicy- Parameters:
request- the Request- See Also:
EditPolicy.eraseTargetFeedback(Request)
-
getCommand
public Command getCommand(Request request)
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:
EditPolicy.getCommand(Request)
-
getHost
public EditPart getHost()
- Specified by:
getHostin interfaceEditPolicy- Returns:
- the host EditPart on which this policy is installed.
- See Also:
EditPolicy.getHost()
-
getTargetEditPart
public EditPart getTargetEditPart(Request request)
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:
EditPolicy.getTargetEditPart(Request)
-
setHost
public void setHost(EditPart host)
Description copied from interface:EditPolicySets the host in which this EditPolicy is installed.- Specified by:
setHostin interfaceEditPolicy- Parameters:
host- the host EditPart- See Also:
EditPolicy.setHost(EditPart)
-
showSourceFeedback
public void showSourceFeedback(Request request)
Does nothing by default.- Specified by:
showSourceFeedbackin interfaceEditPolicy- Parameters:
request- the Request- See Also:
EditPolicy.showSourceFeedback(Request)
-
showTargetFeedback
public void showTargetFeedback(Request request)
Does nothing by default.- Specified by:
showTargetFeedbackin interfaceEditPolicy- Parameters:
request- the Request- See Also:
EditPolicy.showTargetFeedback(Request)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
understandsRequest
public boolean understandsRequest(Request req)
Returnsfalseby default.- Specified by:
understandsRequestin interfaceEditPolicy- Parameters:
req- the Request- Returns:
- boolean
trueif the EditPolicy understands the specified request - See Also:
EditPolicy.understandsRequest(Request)
-
-