|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.gef.editpolicies.AbstractEditPolicy
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_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 | |
AbstractEditPolicy()
|
Method Summary | |
void |
activate()
Does nothing by default. |
void |
deactivate()
Does nothing by default. |
protected void |
debugFeedback(String message)
This method will log the message to GEF's trace/debug system if the corrseponding flag for FEEDBACK is set to true. |
void |
eraseSourceFeedback(Request request)
Does nothing by default. |
void |
eraseTargetFeedback(Request request)
Does nothing by default. |
Command |
getCommand(Request request)
Returns null by default. |
EditPart |
getHost()
|
EditPart |
getTargetEditPart(Request request)
Returns null by default. |
void |
setHost(EditPart host)
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. |
String |
toString()
|
boolean |
understandsRequest(Request req)
Returns false by default. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AbstractEditPolicy()
Method Detail |
public void activate()
activate
in interface EditPolicy
EditPolicy.activate()
public void deactivate()
deactivate
in interface EditPolicy
EditPolicy.deactivate()
protected final void debugFeedback(String message)
message
- the String to logpublic void eraseSourceFeedback(Request request)
eraseSourceFeedback
in interface EditPolicy
request
- the RequestEditPolicy.eraseSourceFeedback(Request)
public void eraseTargetFeedback(Request request)
eraseTargetFeedback
in interface EditPolicy
request
- the RequestEditPolicy.eraseTargetFeedback(Request)
public Command getCommand(Request request)
null
by default. null
is used to indicate that the
EditPolicy does not contribute to the specified Request
.
getCommand
in interface EditPolicy
request
- the Request
null
or a Command contributionEditPolicy.getCommand(Request)
public EditPart getHost()
getHost
in interface EditPolicy
EditPolicy.getHost()
public EditPart getTargetEditPart(Request request)
null
by default. null
indicates that this policy is
unable to determine the target for the specified Request
.
getTargetEditPart
in interface EditPolicy
request
- the Request
null
or the appropriate target EditPart
EditPolicy.getTargetEditPart(Request)
public void setHost(EditPart host)
EditPolicy
setHost
in interface EditPolicy
host
- the host EditPartEditPolicy.setHost(EditPart)
public void showSourceFeedback(Request request)
showSourceFeedback
in interface EditPolicy
request
- the RequestEditPolicy.showSourceFeedback(Request)
public void showTargetFeedback(Request request)
showTargetFeedback
in interface EditPolicy
request
- the RequestEditPolicy.showTargetFeedback(Request)
public String toString()
toString
in class Object
Object.toString()
public boolean understandsRequest(Request req)
false
by default.
understandsRequest
in interface EditPolicy
req
- the Request
true
if the EditPolicy understands the specified requestEditPolicy.understandsRequest(Request)
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |