|
Eclipse GEF 3.8.0.201206112118 |
|||||||||
| 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.ScrollableSelectionFeedbackEditPolicy
public class ScrollableSelectionFeedbackEditPolicy
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.
| 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_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 | |
|---|---|
ScrollableSelectionFeedbackEditPolicy()
|
|
| Method Summary | |
|---|---|
void |
activate()
Extends activate to hook the appropriate listener and to initialize the visual changes for representing selection/focus. |
protected void |
addFeedbackFigure(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 local feedbackFigures list. |
protected void |
createConnectionFeedbackFigure(ConnectionEditPart connectionEditPart)
Creates a ghost image feedback figure for the given ConnectionEditPart's figure and adds it to the feedback layer. |
protected void |
createConnectionFeedbackFigures()
Creates the connection layer feedback figures. |
protected void |
createNodeFeedbackFigure(GraphicalEditPart childEditPart)
Creates a ghost image feedback figure for the given GraphicalEditPart's figure and adds it to the feedback layer. |
protected void |
createNodeFeedbackFigures()
Creates the primary layer feedback figures. |
void |
deactivate()
Extends deactivate to unhook the seleciton listener and to remove the visual changes for representing selection/focus. |
protected int |
getAlpha()
Used to obtain the alpha value used for all feedback figures. |
protected IFigure |
getFeedbackLayer()
Returns the layer used for displaying feedback. |
protected Viewport |
getHostFigureViewport()
Provides access to the host figure's Viewport. |
protected void |
hideFeedback()
Removes all feedback figures from the feedback layer as well as from the feedbackFigures list. |
protected void |
hideSelection()
Override to hide selection |
void |
setAlpha(int alpha)
Used to specify the alpha value used for all feedback figures. |
void |
setHost(EditPart host)
Sets the host in which this EditPolicy is installed. |
protected 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. |
protected void |
showSelection()
Override to show selection |
protected void |
updateFeedback()
Removes any existing feedback figures by delegating to hideFeedback(). |
| Methods inherited from class org.eclipse.gef.editpolicies.SelectionEditPolicy |
|---|
addSelectionListener, getTargetEditPart, hideFocus, removeSelectionListener, setFocus, setSelectedState, showFocus, showPrimarySelection |
| Methods inherited from class org.eclipse.gef.editpolicies.GraphicalEditPolicy |
|---|
addFeedback, getHostFigure, getLayer, removeFeedback |
| Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy |
|---|
debugFeedback, eraseSourceFeedback, eraseTargetFeedback, getCommand, getHost, showSourceFeedback, showTargetFeedback, toString, understandsRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScrollableSelectionFeedbackEditPolicy()
| Method Detail |
|---|
public void activate()
SelectionEditPolicy
activate in interface EditPolicyactivate in class SelectionEditPolicySelectionEditPolicy.activate()
protected void addFeedbackFigure(IFigure feedbackFigure,
Rectangle feedbackFigureAbsoluteBounds)
feedbackFigures list.
feedbackFigure - the feedback figure to add to the feedback layerfeedbackFigureAbsoluteBounds - the absolute bounds used to layout the feedback figureprotected void createConnectionFeedbackFigure(ConnectionEditPart connectionEditPart)
ConnectionEditPart's figure and adds it to the feedback layer.
connectionEditPart - protected void createConnectionFeedbackFigures()
protected void createNodeFeedbackFigure(GraphicalEditPart childEditPart)
GraphicalEditPart's figure and adds it to the feedback layer.
childEditPart - protected void createNodeFeedbackFigures()
public void deactivate()
SelectionEditPolicy
deactivate in interface EditPolicydeactivate in class SelectionEditPolicySelectionEditPolicy.deactivate()protected int getAlpha()
Graphics.setAlpha(int).
protected IFigure getFeedbackLayer()
GraphicalEditPolicy
getFeedbackLayer in class GraphicalEditPolicyGraphicalEditPolicy.getFeedbackLayer()protected Viewport getHostFigureViewport()
Viewport.
Viewport of the host figure's
ScrollPaneprotected void hideFeedback()
feedbackFigures list.
protected void hideSelection()
SelectionEditPolicy
hideSelection in class SelectionEditPolicySelectionEditPolicy.hideSelection()public void setAlpha(int alpha)
Graphics.setAlpha(int).
alpha - public void setHost(EditPart host)
EditPolicy
setHost in interface EditPolicysetHost in class AbstractEditPolicyhost - the host EditPartAbstractEditPolicy.setHost(EditPart)protected void showFeedback()
protected void showSelection()
SelectionEditPolicy
showSelection in class SelectionEditPolicySelectionEditPolicy.showSelection()protected void updateFeedback()
hideFeedback(). In case the host edit part is the primary
selection, recreates feedback figures via showFeedback().
|
Eclipse GEF 3.8.0.201206112118 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||