|
Eclipse GEF 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.editpolicies.AbstractEditPolicy
org.eclipse.gef.editpolicies.GraphicalEditPolicy
org.eclipse.gef.editpolicies.SelectionEditPolicy
org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy
org.eclipse.gef.editpolicies.NonResizableEditPolicy
org.eclipse.gef.editpolicies.ResizableEditPolicy
Provides support for selecting, positioning, and resizing an editpart. Selection is
indicated via eight square handles along the editpart's figure, and a rectangular
handle that outlines the editpart with a 1-pixel black line. The eight square handles
will resize the current selection in the eight primary directions. The rectangular
handle will drag the current selection using a DragEditPartsTracker.
During feedback, a rectangle filled using XOR and outlined with dashes is drawn. Subclasses may tailor the feedback.
| Field Summary |
| Fields inherited from class org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy |
handles |
| 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 | |
ResizableEditPolicy()
|
|
| Method Summary | |
protected List |
createSelectionHandles()
Subclasses must implement to provide the list of handles. |
void |
eraseSourceFeedback(Request request)
Dispatches erase requests to more specific methods. |
Command |
getCommand(Request request)
Returns null by default. |
protected Command |
getResizeCommand(ChangeBoundsRequest request)
Returns the command contribution for the given resize request. |
int |
getResizeDirections()
Returns the current resize directions integer that depicts which handles can be resized on this object. |
void |
setResizeDirections(int newDirections)
Sets the directions in which handles should allow resizing. |
void |
showSourceFeedback(Request request)
Calls other methods as appropriate. |
boolean |
understandsRequest(Request request)
Returns true for move, align, add, and orphan request types. |
| Methods inherited from class org.eclipse.gef.editpolicies.NonResizableEditPolicy |
createDragSourceFeedbackFigure, deactivate, eraseChangeBoundsFeedback, getAlignCommand, getDragSourceFeedbackFigure, getInitialFeedbackBounds, getMoveCommand, getOrphanCommand, hideFocus, isDragAllowed, setDragAllowed, showChangeBoundsFeedback, showFocus |
| Methods inherited from class org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy |
addSelectionHandles, getAdapter, hideSelection, removeSelectionHandles, showSelection |
| Methods inherited from class org.eclipse.gef.editpolicies.SelectionEditPolicy |
activate, addSelectionListener, getTargetEditPart, removeSelectionListener, setFocus, setSelectedState, showPrimarySelection |
| Methods inherited from class org.eclipse.gef.editpolicies.GraphicalEditPolicy |
addFeedback, getFeedbackLayer, getHostFigure, getLayer, removeFeedback |
| Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy |
debugFeedback, eraseTargetFeedback, getHost, setHost, showTargetFeedback, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ResizableEditPolicy()
| Method Detail |
protected List createSelectionHandles()
SelectionHandlesEditPolicy
createSelectionHandles in class NonResizableEditPolicySelectionHandlesEditPolicy.createSelectionHandles()public void eraseSourceFeedback(Request request)
eraseSourceFeedback in interface EditPolicyeraseSourceFeedback in class NonResizableEditPolicyEditPolicy.eraseSourceFeedback(org.eclipse.gef.Request)public Command getCommand(Request request)
AbstractEditPolicynull by default. null is used to indicate that the
EditPolicy does not contribute to the specified Request.
getCommand in interface EditPolicygetCommand in class NonResizableEditPolicyEditPolicy.getCommand(org.eclipse.gef.Request)public int getResizeDirections()
protected Command getResizeCommand(ChangeBoundsRequest request)
RequestConstants.REQ_RESIZE_CHILDREN. The parent's editpolicies
determine how to perform the resize based on the layout manager in use.
request - the resize request
public void setResizeDirections(int newDirections)
PositionConstants.NORTH
PositionConstants.SOUTH
PositionConstants.EAST
PositionConstants.WEST
newDirections - the direction in which resizing is allowedpublic void showSourceFeedback(Request request)
NonResizableEditPolicy
showSourceFeedback in interface EditPolicyshowSourceFeedback in class NonResizableEditPolicyEditPolicy.showSourceFeedback(org.eclipse.gef.Request)public boolean understandsRequest(Request request)
NonResizableEditPolicytrue for move, align, add, and orphan request types. This method
is never called for some of these types, but they are included for possible future use.
understandsRequest in interface EditPolicyunderstandsRequest in class NonResizableEditPolicyEditPolicy.understandsRequest(org.eclipse.gef.Request)
|
Eclipse GEF 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||