Documentation of 'CH.ifa.draw.standard.ConnectionHandle' Java class
ConnectionHandle
CH.ifa.draw.standard

Class ConnectionHandle

  • All Implemented Interfaces:
    Handle
    Direct Known Subclasses:
    SpecialConnectionHandle


    public class ConnectionHandle
    extends LocatorHandle
    A handle to connect figures. The connection object to be created is specified by a prototype.
    Design Patterns

     o Prototype
    ConnectionHandle creates the connection by cloning a prototype.


    See Also:
    ConnectionFigure, Object.clone()
    • Constructor Detail

      • ConnectionHandle

        public ConnectionHandle(Figure owner,
                                Locator l,
                                ConnectionFigure prototype)
        Constructs a handle with the given owner, locator, and connection prototype
    • Method Detail

      • invokeStart

        public void invokeStart(int x,
                                int y,
                                DrawingView view)
        Creates the connection
        Specified by:
        invokeStart in interface Handle
        Overrides:
        invokeStart in class AbstractHandle
        Parameters:
        x - the x position where the interaction started
        y - the y position where the interaction started
        view - the handles container
      • invokeStep

        public void invokeStep(int x,
                               int y,
                               int anchorX,
                               int anchorY,
                               DrawingView view)
        Tracks the connection.
        Specified by:
        invokeStep in interface Handle
        Overrides:
        invokeStep in class AbstractHandle
        Parameters:
        x - the current x position
        y - the current y position
        anchorX - the x position where the interaction started
        anchorY - the y position where the interaction started
      • invokeEnd

        public void invokeEnd(int x,
                              int y,
                              int anchorX,
                              int anchorY,
                              DrawingView view)
        Connects the figures if the mouse is released over another figure.
        Specified by:
        invokeEnd in interface Handle
        Overrides:
        invokeEnd in class AbstractHandle
        Parameters:
        x - the current x position
        y - the current y position
        anchorX - the x position where the interaction started
        anchorY - the y position where the interaction started
      • draw

        public void draw(java.awt.Graphics g)
        Draws the connection handle, by default the outline of a blue circle.
        Specified by:
        draw in interface Handle
        Overrides:
        draw in class AbstractHandle

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.