Class SetLabelsOffsetOperation
java.lang.Object
org.yakindu.base.xtext.utils.gmf.commands.SetLabelsOffsetOperation
Operation concerning the label offset. Used to delegate from the
SetLabelsOffsetCommmand
and from the
SetConnectionBendpointsAndLabelCommmand
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isEdgeWithObliqueRoutingStyle
(org.eclipse.gef.ConnectionEditPart part) void
setLabelsToUpdate
(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connectionEditPart) Set labels to update according to a connectionEditPart (all labels of this connection will be update).void
setLabelsToUpdate
(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connectionEditPart, org.eclipse.draw2d.geometry.PointList originalPoints) Set labels to update according to a connectionEditPart (all labels of this connection will be update).void
setNewPointList
(org.eclipse.draw2d.geometry.PointList newPointList) Method to set the newPointList.void
Update the offset (Bounds
) of the labelsNode
.
-
Constructor Details
-
SetLabelsOffsetOperation
public SetLabelsOffsetOperation()
-
-
Method Details
-
setNewPointList
public void setNewPointList(org.eclipse.draw2d.geometry.PointList newPointList) Method to set the newPointList.- Parameters:
newPointList
- The new points list
-
setLabelsToUpdate
public void setLabelsToUpdate(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connectionEditPart, org.eclipse.draw2d.geometry.PointList originalPoints) Set labels to update according to a connectionEditPart (all labels of this connection will be update). This method must be used if the edge figure is updated (through feedback) during the move. Indeed, in this case, we can not use the figure to retrieve the old points.
This method must be called after having called thesetNewPointList(PointList)
method.- Parameters:
connectionEditPart
- The connection from which to get the potential three labels to updateoriginalPoints
- The points of the edge before the move.
-
setLabelsToUpdate
public void setLabelsToUpdate(org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connectionEditPart) Set labels to update according to a connectionEditPart (all labels of this connection will be update).
This method must be called after having called thesetNewPointList(PointList)
method.- Parameters:
connectionEditPart
- The connection from which to get the potential three labels to update
-
isEdgeWithObliqueRoutingStyle
public static boolean isEdgeWithObliqueRoutingStyle(org.eclipse.gef.ConnectionEditPart part) -
updateGMFLabelsOffset
public void updateGMFLabelsOffset()Update the offset (Bounds
) of the labelsNode
. This method must be called after setting the newPointList and the labelToUpdate. If the methodssetLabelsToUpdate(ConnectionEditPart)
orsetLabelsToUpdate(ConnectionEditPart, PointList)
are not called, this method has no effect.
-