Documentation of 'org.jhotdraw.samples.net.figures.NodeFigure' Java class
NodeFigure
org.jhotdraw.samples.net.figures

Class NodeFigure

    • Constructor Detail

      • NodeFigure

        public NodeFigure()
        Creates a new instance.
    • Method Detail

      • getConnectors

        public java.util.Collection<Connector> getConnectors(ConnectionFigure prototype)
        Description copied from interface: Figure
        Returns all connectors of this Figure for the specified prototype of a ConnectionFigure.

        This is used by connection tools and connection handles to visualize the connectors when the user is about to create a ConnectionFigure to this Figure.

        Specified by:
        getConnectors in interface Figure
        Overrides:
        getConnectors in class AbstractFigure
        Parameters:
        prototype - The prototype used to create a connection or null if unknown. This allows for specific connectors for different connection figures.
      • createHandles

        public java.util.Collection<Handle> createHandles(int detailLevel)
        Description copied from interface: Figure
        Creates handles used to manipulate the figure.
        Specified by:
        createHandles in interface Figure
        Overrides:
        createHandles in class TextFigure
        Parameters:
        detailLevel - The detail level of the handles. Usually this is 0 for bounding box handles and 1 for point handles. The value -1 is used by the SelectAreaTracker and the HandleTracker to highlight figures, over which the mouse pointer is hovering.
        Returns:
        a Collection of handles
        See Also:
        Handle
      • getFigureDrawingArea

        public java.awt.geom.Rectangle2D.Double getFigureDrawingArea()
        Description copied from class: TextFigure
        Gets the drawing area without taking the decorator into account.
      • findConnector

        public Connector findConnector(java.awt.geom.Point2D.Double p,
                                       ConnectionFigure figure)
        Description copied from class: AbstractFigure
        Returns the Figures connector for the specified location. By default a ChopBoxConnector is returned.
        Specified by:
        findConnector in interface Figure
        Overrides:
        findConnector in class AbstractFigure
        Parameters:
        p - the location of the connector.
        figure - The prototype used to create a connection or null if unknown. This allows for specific connectors for different connection figures.
        See Also:
        ChopRectangleConnector
      • findCompatibleConnector

        public Connector findCompatibleConnector(Connector c,
                                                 boolean isStart)
        Description copied from interface: Figure
        Gets a compatible connector. If the provided connector is part of this figure, return the connector. If the provided connector is part of another figure, return a connector with the same semantics for this figure. Returns null, if no compatible connector is available.
        Specified by:
        findCompatibleConnector in interface Figure
        Overrides:
        findCompatibleConnector in class AbstractFigure
      • clone

        public NodeFigure clone()
        Description copied from interface: Figure
        Returns a clone of the figure, with clones of all aggregated figures, such as children and decorators. The cloned figure does not clone the list of FigureListeners from its original.
        Specified by:
        clone in interface Figure
        Overrides:
        clone in class TextFigure
      • getLayer

        public int getLayer()
        Description copied from class: AbstractFigure
        AbstractFigure always returns 0. Override this method if your figure needs to be on a different layer.
        Specified by:
        getLayer in interface Figure
        Overrides:
        getLayer in class AbstractFigure

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.