Class EdgeLabelLocator
- java.lang.Object
-
- org.eclipse.draw2d.AbstractLocator
-
- org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator
-
- org.yakindu.base.xtext.utils.gmf.routing.EdgeLabelLocator
-
- All Implemented Interfaces:
org.eclipse.draw2d.Locator
public class EdgeLabelLocator extends org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator
SpecificLabelLocator
for edge labels to reflect the real label location during the feedback.
-
-
Constructor Summary
Constructors Constructor Description EdgeLabelLocator(org.eclipse.draw2d.IFigure parent, org.eclipse.draw2d.geometry.Rectangle bounds, int alignment)
Constructor for figure who are located and sized.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
eraseFeedbackData()
This method must be called at the end of the edge feedback ( {@link org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy.eraseConnectionMoveFeedback(ReconnectRequest)} or {@link org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.ConnectionBendpointEditPolicy.eraseConnectionFeedback(BendpointRequest, boolean)} for example).void
relocate(org.eclipse.draw2d.IFigure target)
void
setFeedbackData(org.eclipse.draw2d.geometry.PointList oldPointList, org.eclipse.draw2d.geometry.Vector oldLabelOffset, boolean isEdgeWithObliqueRoutingStyle)
This method must be called before edge feedback creation (org.eclipse.sirius.diagram.ui.graphical.edit.policies.TreeLayoutConnectionLineSegEditPolicy#showMoveLineSegFeedback(BendpointRequest)
ororg.eclipse.sirius.diagram.ui.tools.internal.graphical.edit.policies.SiriusConnectionEndPointEditPolicy#showConnectionMoveFeedback(ReconnectRequest)
) for example), to initialize the data needed to compute the label offset dynamically and draw the label feedback correctly.
The methoderaseFeedbackData()
must be called when edge feedback is erase.-
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator
getAlignment, getOffset, getPointList, getReferencePoint, getSize, setOffset
-
-
-
-
Method Detail
-
setFeedbackData
public void setFeedbackData(org.eclipse.draw2d.geometry.PointList oldPointList, org.eclipse.draw2d.geometry.Vector oldLabelOffset, boolean isEdgeWithObliqueRoutingStyle)
This method must be called before edge feedback creation (org.eclipse.sirius.diagram.ui.graphical.edit.policies.TreeLayoutConnectionLineSegEditPolicy#showMoveLineSegFeedback(BendpointRequest)
ororg.eclipse.sirius.diagram.ui.tools.internal.graphical.edit.policies.SiriusConnectionEndPointEditPolicy#showConnectionMoveFeedback(ReconnectRequest)
) for example), to initialize the data needed to compute the label offset dynamically and draw the label feedback correctly.
The methoderaseFeedbackData()
must be called when edge feedback is erase.- Parameters:
oldPointList
- The points list of the edge before to start to move it.oldLabelOffset
- The offset of the label before to start to move the edge.isEdgeWithObliqueRoutingStyle
- The status of the edge routing style
-
eraseFeedbackData
public void eraseFeedbackData()
This method must be called at the end of the edge feedback ( {@link org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy.eraseConnectionMoveFeedback(ReconnectRequest)} or {@link org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.ConnectionBendpointEditPolicy.eraseConnectionFeedback(BendpointRequest, boolean)} for example).
-
relocate
public void relocate(org.eclipse.draw2d.IFigure target)
- Specified by:
relocate
in interfaceorg.eclipse.draw2d.Locator
- Overrides:
relocate
in classorg.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator
-
-