sk.uniba.euromath.editor.xmlEditor.policies
Class FigureSelectionPolicy
java.lang.Object
org.eclipse.gef.editpolicies.AbstractEditPolicy
org.eclipse.gef.editpolicies.GraphicalEditPolicy
org.eclipse.gef.editpolicies.SelectionEditPolicy
sk.uniba.euromath.editor.xmlEditor.policies.FigureSelectionPolicy
- All Implemented Interfaces:
- org.eclipse.gef.EditPolicy, org.eclipse.gef.RequestConstants
public class FigureSelectionPolicy
- extends org.eclipse.gef.editpolicies.SelectionEditPolicy
Responsible for handling selection border
- Author:
- Martin Kollar 10.9.2005
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 |
Methods inherited from class org.eclipse.gef.editpolicies.SelectionEditPolicy |
activate, addSelectionListener, deactivate, hideFocus, removeSelectionListener, setFocus, setSelectedState, showFocus, 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, eraseSourceFeedback, getCommand, getHost, setHost, showSourceFeedback, toString, understandsRequest |
SELECION_BORDER_WIDTH
public static final int SELECION_BORDER_WIDTH
- constant that gives width of the selection rectangle
- See Also:
- Constant Field Values
FigureSelectionPolicy
public FigureSelectionPolicy()
- Construcotr. Creates new policy.
FigureSelectionPolicy
public FigureSelectionPolicy(boolean showHighlight)
- Parameters:
showHighlight
- if true
then host is highlighted when cursor of
mouse is over host
createFeedBack
protected org.eclipse.draw2d.IFigure createFeedBack()
- Returns:
- Figure that is selection border
eraseTargetFeedback
public void eraseTargetFeedback(org.eclipse.gef.Request request)
- Specified by:
eraseTargetFeedback
in interface org.eclipse.gef.EditPolicy
- Overrides:
eraseTargetFeedback
in class org.eclipse.gef.editpolicies.AbstractEditPolicy
- Parameters:
request
- not need to be SelectionRequest
getTargetEditPart
public org.eclipse.gef.EditPart getTargetEditPart(org.eclipse.gef.Request request)
- Specified by:
getTargetEditPart
in interface org.eclipse.gef.EditPolicy
- Overrides:
getTargetEditPart
in class org.eclipse.gef.editpolicies.SelectionEditPolicy
- Parameters:
request
-
- Returns:
- host or
null
hideSelection
protected void hideSelection()
- Specified by:
hideSelection
in class org.eclipse.gef.editpolicies.SelectionEditPolicy
showHighlight
protected void showHighlight()
- Highlights host - figure associated with editpart where policy is
installed.
showSelection
protected void showSelection()
- Specified by:
showSelection
in class org.eclipse.gef.editpolicies.SelectionEditPolicy
showTargetFeedback
public void showTargetFeedback(org.eclipse.gef.Request request)
- Shows the selection feedback
- Specified by:
showTargetFeedback
in interface org.eclipse.gef.EditPolicy
- Overrides:
showTargetFeedback
in class org.eclipse.gef.editpolicies.AbstractEditPolicy
- Parameters:
request
- should by SelectionRequest
Copyright © 2003-2006 null. All Rights Reserved.