Package org.eclipse.gef.editpolicies
Class ScrollableSelectionFeedbackEditPolicy
java.lang.Object
org.eclipse.gef.editpolicies.AbstractEditPolicy
org.eclipse.gef.editpolicies.GraphicalEditPolicy
org.eclipse.gef.editpolicies.SelectionEditPolicy
org.eclipse.gef.editpolicies.ScrollableSelectionFeedbackEditPolicy
- All Implemented Interfaces:
- EditPolicy,- RequestConstants
A 
SelectionEditPolicy, which may be registered to an
 IScrollableEditPart to provide primary selection feedback by
 rendering the hidden contents of the host figure's ScrollPane's
 nested Viewport by means of GhostImageFigures.- Since:
- 3.6
- 
Field SummaryFields inherited from interface org.eclipse.gef.EditPolicyCOMPONENT_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_ROLEFields inherited from interface org.eclipse.gef.RequestConstantsREQ_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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidactivate()Extends activate to hook the appropriate listener and to initialize the visual changes for representing selection/focus.protected voidaddFeedbackFigure(IFigure feedbackFigure, Rectangle feedbackFigureAbsoluteBounds) Adds a given feedback figure to the feedback layer (using the provided bounds to layout it) and registers it in the localfeedbackFigureslist.protected voidcreateConnectionFeedbackFigure(ConnectionEditPart connectionEditPart) Creates a ghost image feedback figure for the givenConnectionEditPart's figure and adds it to the feedback layer.protected voidCreates the connection layer feedback figures.protected voidcreateNodeFeedbackFigure(GraphicalEditPart childEditPart) Creates a ghost image feedback figure for the givenGraphicalEditPart's figure and adds it to the feedback layer.protected voidCreates the primary layer feedback figures.voidExtends deactivate to unhook the seleciton listener and to remove the visual changes for representing selection/focus.protected intgetAlpha()Used to obtain the alpha value used for all feedback figures.protected IFigureReturns the layer used for displaying feedback.protected ViewportProvides access to the host figure'sViewport.protected voidRemoves all feedback figures from the feedback layer as well as from thefeedbackFigureslist.protected voidOverride to hide selectionvoidsetAlpha(int alpha) Used to specify the alpha value used for all feedback figures.voidSets the host in which this EditPolicy is installed.protected voidCreates feedback figures for all node figures nested within the host figure's viewport, as well as for all incoming and outgoing connections of these nodes.protected voidOverride to show selectionprotected voidRemoves any existing feedback figures by delegating tohideFeedback().Methods inherited from class org.eclipse.gef.editpolicies.SelectionEditPolicyaddSelectionListener, getTargetEditPart, hideFocus, removeSelectionListener, setFocus, setSelectedState, showFocus, showPrimarySelectionMethods inherited from class org.eclipse.gef.editpolicies.GraphicalEditPolicyaddFeedback, getHost, getHostFigure, getLayer, removeFeedbackMethods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicydebugFeedback, eraseSourceFeedback, eraseTargetFeedback, getCommand, showSourceFeedback, showTargetFeedback, toString, understandsRequest
- 
Constructor Details- 
ScrollableSelectionFeedbackEditPolicypublic ScrollableSelectionFeedbackEditPolicy()
 
- 
- 
Method Details- 
activatepublic void activate()Description copied from class:SelectionEditPolicyExtends activate to hook the appropriate listener and to initialize the visual changes for representing selection/focus.- Specified by:
- activatein interface- EditPolicy
- Overrides:
- activatein class- SelectionEditPolicy
- See Also:
 
- 
addFeedbackFigureAdds a given feedback figure to the feedback layer (using the provided bounds to layout it) and registers it in the localfeedbackFigureslist.- Parameters:
- feedbackFigure- the feedback figure to add to the feedback layer
- feedbackFigureAbsoluteBounds- the absolute bounds used to layout the feedback figure
 
- 
createConnectionFeedbackFigureCreates a ghost image feedback figure for the givenConnectionEditPart's figure and adds it to the feedback layer.- Parameters:
- connectionEditPart-
 
- 
createConnectionFeedbackFiguresprotected void createConnectionFeedbackFigures()Creates the connection layer feedback figures.
- 
createNodeFeedbackFigureCreates a ghost image feedback figure for the givenGraphicalEditPart's figure and adds it to the feedback layer.- Parameters:
- childEditPart-
 
- 
createNodeFeedbackFiguresprotected void createNodeFeedbackFigures()Creates the primary layer feedback figures.
- 
deactivatepublic void deactivate()Description copied from class:SelectionEditPolicyExtends deactivate to unhook the seleciton listener and to remove the visual changes for representing selection/focus.- Specified by:
- deactivatein interface- EditPolicy
- Overrides:
- deactivatein class- SelectionEditPolicy
- See Also:
 
- 
getAlphaprotected int getAlpha()Used to obtain the alpha value used for all feedback figures. The valid range is the one documented forGraphics.setAlpha(int).- Returns:
- the alpha
 
- 
getFeedbackLayerDescription copied from class:GraphicalEditPolicyReturns the layer used for displaying feedback.- Overrides:
- getFeedbackLayerin class- GraphicalEditPolicy
- Returns:
- the feedback layer
- See Also:
 
- 
getHostFigureViewportProvides access to the host figure'sViewport.- Returns:
- the nested Viewportof the host figure'sScrollPane
 
- 
hideFeedbackprotected void hideFeedback()Removes all feedback figures from the feedback layer as well as from thefeedbackFigureslist.
- 
hideSelectionprotected void hideSelection()Description copied from class:SelectionEditPolicyOverride to hide selection- Specified by:
- hideSelectionin class- SelectionEditPolicy
- See Also:
 
- 
setAlphapublic void setAlpha(int alpha) Used to specify the alpha value used for all feedback figures. The valid range is the one documented forGraphics.setAlpha(int).- Parameters:
- alpha-
 
- 
setHostDescription copied from interface:EditPolicySets the host in which this EditPolicy is installed.- Specified by:
- setHostin interface- EditPolicy
- Overrides:
- setHostin class- AbstractEditPolicy
- Parameters:
- host- the host EditPart
- See Also:
 
- 
showFeedbackprotected void showFeedback()Creates feedback figures for all node figures nested within the host figure's viewport, as well as for all incoming and outgoing connections of these nodes. Feedback figures are only created in case there are children or connections, which are not fully visible.
- 
showSelectionprotected void showSelection()Description copied from class:SelectionEditPolicyOverride to show selection- Specified by:
- showSelectionin class- SelectionEditPolicy
- See Also:
 
- 
updateFeedbackprotected void updateFeedback()Removes any existing feedback figures by delegating tohideFeedback(). In case the host edit part is the primary selection, recreates feedback figures viashowFeedback().
 
-