Package org.eclipse.gef.editpolicies
Class FeedbackHelper
- java.lang.Object
-
- org.eclipse.gef.editpolicies.FeedbackHelper
-
public class FeedbackHelper extends java.lang.ObjectHelps display connection feedback during drags of the connection ends. This class is used internally by the provided EditPolicy implementation.
-
-
Constructor Summary
Constructors Constructor Description FeedbackHelper()Constructs a new FeedbackHelper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.draw2d.ConnectiongetConnection()Returns the connection being used to show feedback.protected booleanisMovingStartAnchor()Returns true is the feedback is moving the source anchorprotected voidsetAnchor(org.eclipse.draw2d.ConnectionAnchor anchor)Sets the anchor for the end being moved.voidsetConnection(org.eclipse.draw2d.Connection c)Sets the connection.voidsetMovingStartAnchor(boolean value)Sets if moving start of connection.voidupdate(org.eclipse.draw2d.ConnectionAnchor anchor, org.eclipse.draw2d.geometry.Point p)Updates the feedback based on the given anchor or point.
-
-
-
Method Detail
-
getConnection
protected org.eclipse.draw2d.Connection getConnection()
Returns the connection being used to show feedback.- Returns:
- the connection
-
isMovingStartAnchor
protected boolean isMovingStartAnchor()
Returns true is the feedback is moving the source anchor- Returns:
trueif moving start
-
setConnection
public void setConnection(org.eclipse.draw2d.Connection c)
Sets the connection.- Parameters:
c- connection
-
setMovingStartAnchor
public void setMovingStartAnchor(boolean value)
Sets if moving start of connection.- Parameters:
value-trueif the starts is being moved
-
setAnchor
protected void setAnchor(org.eclipse.draw2d.ConnectionAnchor anchor)
Sets the anchor for the end being moved.- Parameters:
anchor- the new anchor
-
update
public void update(org.eclipse.draw2d.ConnectionAnchor anchor, org.eclipse.draw2d.geometry.Point p)Updates the feedback based on the given anchor or point. The anchor is used unlessnull. The point is used when there is no anchor.- Parameters:
anchor-nullor an anchorp- the point to use when there is no anchor
-
-