Documentation of 'org.jhotdraw.draw.connector.AbstractConnector' Java class
AbstractConnector
org.jhotdraw.draw.connector

Class AbstractConnector

    • Constructor Summary

      Constructors 
      Constructor and Description
      AbstractConnector()
      Constructs a connector that has no owner.
      AbstractConnector(Figure owner)
      Constructs a connector with the given owner figure.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Returns a clone of the Connection.
      boolean contains(java.awt.geom.Point2D.Double p)
      Tests if a point is contained in the connector.
      void draw(java.awt.Graphics2D g)
      Draws the connector.
      java.awt.geom.Point2D.Double findEnd(ConnectionFigure connection)
      Finds the end point for the connection.
      java.awt.geom.Point2D.Double findStart(ConnectionFigure connection)
      Finds the start point for the connection.
      java.awt.geom.Point2D.Double getAnchor()
      Gets the anchor of the connector.
      java.awt.geom.Rectangle2D.Double getBounds()
      Gets the bounds of the connector.
      java.awt.geom.Rectangle2D.Double getDrawingArea()
      Gets the drawing area of the connector.
      Figure getOwner()
      Gets the connector's owner.
      boolean isConnectToDecorator() 
      void read(DOMInput in) 
      void setConnectToDecorator(boolean newValue) 
      void updateAnchor(java.awt.geom.Point2D.Double p)
      Updates the anchor of the connector.
      void updateEndLocation(java.awt.geom.Point2D.Double p)
      This is called, when the end location of the connection has been moved by the user.
      void updateStartLocation(java.awt.geom.Point2D.Double p)
      This is called, when the start location of the connection has been moved by the user.
      void write(DOMOutput out) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractConnector

        public AbstractConnector()
        Constructs a connector that has no owner. It is only used internally to resurrect a connectors from a StorableOutput. It should never be called directly.
      • AbstractConnector

        public AbstractConnector(Figure owner)
        Constructs a connector with the given owner figure.
    • Method Detail

      • setConnectToDecorator

        public void setConnectToDecorator(boolean newValue)
      • isConnectToDecorator

        public boolean isConnectToDecorator()
      • contains

        public boolean contains(java.awt.geom.Point2D.Double p)
        Tests if a point is contained in the connector.
        Specified by:
        contains in interface Connector
      • findStart

        public java.awt.geom.Point2D.Double findStart(ConnectionFigure connection)
        Description copied from interface: Connector
        Finds the start point for the connection.
        Specified by:
        findStart in interface Connector
      • findEnd

        public java.awt.geom.Point2D.Double findEnd(ConnectionFigure connection)
        Description copied from interface: Connector
        Finds the end point for the connection.
        Specified by:
        findEnd in interface Connector
      • clone

        public java.lang.Object clone()
        Description copied from interface: Connector
        Returns a clone of the Connection.
        Specified by:
        clone in interface Connector
        Overrides:
        clone in class java.lang.Object
      • updateStartLocation

        public void updateStartLocation(java.awt.geom.Point2D.Double p)
        This is called, when the start location of the connection has been moved by the user. The user has this probably done, to adjust the layout. The connector may use this as a hint to improve the results for the next call to findEnd.
      • updateEndLocation

        public void updateEndLocation(java.awt.geom.Point2D.Double p)
        This is called, when the end location of the connection has been moved by the user. The user has this probably done, to adjust the layout. The connector may use this as a hint to improve the results for the next call to findStart.
      • getAnchor

        public java.awt.geom.Point2D.Double getAnchor()
        Description copied from interface: Connector
        Gets the anchor of the connector. This is a point at the center or at the bounds of the figure, where the start or the end point will most likely be attached. The purpose of this method is to give the user a hint, where the connector will most likely be attached to the owner of the connector.
        Specified by:
        getAnchor in interface Connector
      • updateAnchor

        public void updateAnchor(java.awt.geom.Point2D.Double p)
        Description copied from interface: Connector
        Updates the anchor of the connector. This method is called when the user manually changes the end point of the ConnectionFigure. The Connector uses this as a hint for choosing a new anchor position.
        Specified by:
        updateAnchor in interface Connector
      • getBounds

        public java.awt.geom.Rectangle2D.Double getBounds()
        Description copied from interface: Connector
        Gets the bounds of the connector. This usually are the bounds of the Figure which owns the Connector. The bounds can differ from the Figure bounds, if the Connector connects to a specific region of the Figure.
        Specified by:
        getBounds in interface Connector
      • read

        public void read(DOMInput in)
                  throws java.io.IOException
        Specified by:
        read in interface DOMStorable
        Throws:
        java.io.IOException
      • write

        public void write(DOMOutput out)
                   throws java.io.IOException
        Specified by:
        write in interface DOMStorable
        Throws:
        java.io.IOException
      • getDrawingArea

        public java.awt.geom.Rectangle2D.Double getDrawingArea()
        Description copied from interface: Connector
        Gets the drawing area of the connector.
        Specified by:
        getDrawingArea in interface Connector
      • draw

        public void draw(java.awt.Graphics2D g)
        Description copied from interface: Connector
        Draws the connector.
        Specified by:
        draw in interface Connector

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.