Class SetLabelsOffsetOperation

java.lang.Object
org.yakindu.base.xtext.utils.gmf.commands.SetLabelsOffsetOperation

public class SetLabelsOffsetOperation extends Object
Operation concerning the label offset. Used to delegate from the SetLabelsOffsetCommmand and from the SetConnectionBendpointsAndLabelCommmand.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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 labels Node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 the setNewPointList(PointList) method.
      Parameters:
      connectionEditPart - The connection from which to get the potential three labels to update
      originalPoints - 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 the setNewPointList(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 labels Node. This method must be called after setting the newPointList and the labelToUpdate. If the methods setLabelsToUpdate(ConnectionEditPart) or setLabelsToUpdate(ConnectionEditPart, PointList) are not called, this method has no effect.