public class EdgeLabelLocator
extends org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator
LabelLocator for edge labels to reflect the real label
location during the feedback.| Constructor and Description |
|---|
EdgeLabelLocator(org.eclipse.draw2d.IFigure parent,
org.eclipse.draw2d.geometry.Rectangle bounds,
int alignment)
Constructor for figure who are located and sized.
|
| Modifier and Type | Method and Description |
|---|---|
void |
eraseFeedbackData()
This method must be called at the end of the edge feedback (
org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy.eraseConnectionMoveFeedback(ReconnectRequest)
or
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)
or
org.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 method eraseFeedbackData() must be called when edge feedback
is erase. |
getAlignment, getOffset, getPointList, getReferencePoint, getSize, setOffsetpublic EdgeLabelLocator(org.eclipse.draw2d.IFigure parent,
org.eclipse.draw2d.geometry.Rectangle bounds,
int alignment)
parent - the parent figurebounds - the boundsalignment - the alignmentpublic void setFeedbackData(org.eclipse.draw2d.geometry.PointList oldPointList,
org.eclipse.draw2d.geometry.Vector oldLabelOffset,
boolean isEdgeWithObliqueRoutingStyle)
org.eclipse.sirius.diagram.ui.graphical.edit.policies.TreeLayoutConnectionLineSegEditPolicy#showMoveLineSegFeedback(BendpointRequest)
or
org.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.eraseFeedbackData() must be called when edge feedback
is erase.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 stylepublic void eraseFeedbackData()
org.eclipse.gef.editpolicies.ConnectionEndpointEditPolicy.eraseConnectionMoveFeedback(ReconnectRequest)
or
org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.ConnectionBendpointEditPolicy.eraseConnectionFeedback(BendpointRequest,
boolean) for example).public void relocate(org.eclipse.draw2d.IFigure target)
relocate in interface org.eclipse.draw2d.Locatorrelocate in class org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator