|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.eclipse.gef.editpolicies.AbstractEditPolicy
The base implementation for the EditPolicy interface.
Since this is the default implementation of an interface, this document
deals with proper sub-classing of this implementation. This class is not
the API. For documentation on proper usage of the public API, see the
documentation for the interface itself: EditPolicy.
| Indicates methods that are commonly overridden or even abstract |
| These methods might be overridden. Especially if you were extending this class directly. |
| Should rarely be overridden. |
| Essentially "internal" and should never be overridden. |
| 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 |
| Constructor Summary | |
AbstractEditPolicy()
|
|
| Method Summary | |
void |
activate()
Called to activate this EditPolicy. |
void |
deactivate()
This policy should shutdown and remove all listeners established in activate(). |
protected void |
debugFeedback(String message)
|
void |
eraseSourceFeedback(Request request)
Erases source feedback based on the given request. |
void |
eraseTargetFeedback(Request request)
Erases target feedback based on the given request. |
Command |
getCommand(Request request)
Returns the command for a given request, or null if the EditPolicy does not work with that request type. |
EditPart |
getHost()
|
EditPart |
getTargetEditPart(Request request)
Returns the host EditPart if the EditPolicy works with the given request type, otherwise return null. |
protected void |
initialize()
Initialize is called by activate(). |
void |
setHost(EditPart host)
Sets the host in which this EditPolicy is installed. |
void |
showSourceFeedback(Request request)
Shows or updates source feedback if the receiver works with the request type. |
void |
showTargetFeedback(Request request)
Shows or updates target feedback if the receiver works with the request type. |
String |
toString()
|
boolean |
understandsRequest(Request req)
|
| 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()
deactivate(). initialize() is called to do any setup
work that does not need to be undone. There is a current bug that initialize()
is called every time activate is called. It will only be called once in
the futureactivate in interface EditPolicyorg.eclipse.gef.EditPolicyEditPart.activate(),
EditPolicy.deactivate(),
EditPart.installEditPolicy(Object, EditPolicy)public void deactivate()
EditPolicyactivate().
deactivate() will be called either when the host is deactivated, or when
this policy is uninstalled from its host.deactivate in interface EditPolicyorg.eclipse.gef.EditPolicyEditPart.deactivate(),
EditPolicy.activate(),
EditPart.removeEditPolicy(Object)protected void debugFeedback(String message)
public void eraseSourceFeedback(Request request)
EditPolicyeraseSourceFeedback in interface EditPolicypublic void eraseTargetFeedback(Request request)
EditPolicyeraseTargetFeedback in interface EditPolicypublic Command getCommand(Request request)
EditPolicynull is treated as a no-op by the caller, or a zero contribution.
The EditPolicy must return an UnexectuableCommand
if it wishes to prevent the operation from being performed.getCommand in interface EditPolicypublic EditPart getHost()
public EditPart getTargetEditPart(Request request)
EditPolicynull. For all practical uses, this method has
"boolean" behavior. It is possible, although rarely useful, to
return an EditPart other than the host.getTargetEditPart in interface EditPolicyprotected void initialize()
public void setHost(EditPart host)
EditPolicysetHost in interface EditPolicypublic void showSourceFeedback(Request request)
EditPolicyshowSourceFeedback in interface EditPolicypublic void showTargetFeedback(Request request)
EditPolicyshowTargetFeedback in interface EditPolicypublic String toString()
toString in class Objectpublic boolean understandsRequest(Request req)
understandsRequest in interface EditPolicy
|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||