Class EdgeLabelLocator

  • All Implemented Interfaces:
    org.eclipse.draw2d.Locator

    public class EdgeLabelLocator
    extends org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator
    Specific LabelLocator for edge labels to reflect the real label location during the feedback.
    • Field Summary

      • Fields inherited from class org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator

        parent
    • 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) 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.
      • Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator

        getAlignment, getOffset, getPointList, getReferencePoint, getSize, setOffset
      • Methods inherited from class org.eclipse.draw2d.AbstractLocator

        getGap, getNewBounds, getRelativePosition, setGap, setRelativePosition
    • Constructor Detail

      • EdgeLabelLocator

        public EdgeLabelLocator​(org.eclipse.draw2d.IFigure parent,
                                org.eclipse.draw2d.geometry.Rectangle bounds,
                                int alignment)
        Constructor for figure who are located and sized.
        Parameters:
        parent - the parent figure
        bounds - the bounds
        alignment - the alignment
    • 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) 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.
        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 interface org.eclipse.draw2d.Locator
        Overrides:
        relocate in class org.eclipse.gmf.runtime.diagram.ui.figures.LabelLocator