Class AbstractConnectionEditPart

    • Constructor Detail

      • AbstractConnectionEditPart

        public AbstractConnectionEditPart()
    • Method Detail

      • activateFigure

        protected void activateFigure()
        Activates the Figure representing this, by setting up the start and end connections, and adding the figure to the Connection Layer.
        See Also:
        AbstractGraphicalEditPart.deactivate()
      • createFigure

        protected org.eclipse.draw2d.IFigure createFigure()
        Returns a newly created Figure to represent these type of EditParts.
        Specified by:
        createFigure in class AbstractGraphicalEditPart
        Returns:
        The created Figure.
      • deactivateFigure

        protected void deactivateFigure()
        Deactivates the Figure representing this, by removing it from the connection layer, and resetting the source and target connections to null.
      • getConnectionFigure

        public org.eclipse.draw2d.Connection getConnectionFigure()
        Convenience method for casting this GraphicalEditPart's Figure to a Connection
        Returns:
        the Figure as a Connection
      • getSourceConnectionAnchor

        protected org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor()
        Returns the ConnectionAnchor for the source end of the connection. If the source is an instance of NodeEditPart, that interface will be used to determine the proper ConnectionAnchor. If the source is not an instance of NodeEditPart, this method should be overridden to return the correct ConnectionAnchor. Failure to do this will cause a default anchor to be used so that the connection figure will be made visible to the developer.
        Returns:
        ConnectionAnchor for the source end of the Connection
      • getTargetConnectionAnchor

        protected org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor()
        Returns the ConnectionAnchor for the target end of the connection. If the target is an instance of NodeEditPart, that interface will be used to determine the proper ConnectionAnchor. If the target is not an instance of NodeEditPart, this method should be overridden to return the correct ConnectionAnchor. Failure to do this will cause a default anchor to be used so that the connection figure will be made visible to the developer.
        Returns:
        ConnectionAnchor for the target end of the Connection
      • refreshSourceAnchor

        protected void refreshSourceAnchor()
        Updates the source ConnectionAnchor. Subclasses should override getSourceConnectionAnchor() if necessary, and not this method.
      • refreshTargetAnchor

        protected void refreshTargetAnchor()
        Updates the target ConnectionAnchor. Subclasses should override getTargetConnectionAnchor() if necessary, and not this method.
      • setSource

        public void setSource​(EditPart editPart)
        Sets the source EditPart of this connection.
        Specified by:
        setSource in interface ConnectionEditPart
        Parameters:
        editPart - EditPart which is the source.
      • setTarget

        public void setTarget​(EditPart editPart)
        Sets the target EditPart of this connection.
        Specified by:
        setTarget in interface ConnectionEditPart
        Parameters:
        editPart - EditPart which is the target.