Documentation of 'CH.ifa.draw.contrib.TriangleFigure' Java class
TriangleFigure
CH.ifa.draw.contrib

Class TriangleFigure

  • All Implemented Interfaces:
    Figure, Storable, java.io.Serializable, java.lang.Cloneable


    public class TriangleFigure
    extends RectangleFigure
    A triangle with same dimensions as its enclosing rectangle, and apex at any of 8 places
    See Also:
    Serialized Form
    • Constructor Detail

      • TriangleFigure

        public TriangleFigure()
      • TriangleFigure

        public TriangleFigure(java.awt.Point origin,
                              java.awt.Point corner)
    • Method Detail

      • handles

        public java.util.Vector handles()
        Description copied from class: AbstractFigure
        Returns the handles of a Figure that can be used to manipulate some of its attributes.
        Specified by:
        handles in interface Figure
        Overrides:
        handles in class RectangleFigure
        Returns:
        a Vector of handles
        See Also:
        Handle
      • rotate

        public void rotate(double angle)
      • polygon

        public java.awt.Polygon polygon()
        Return the polygon describing the triangle
      • draw

        public void draw(java.awt.Graphics g)
        Description copied from class: AttributeFigure
        Draws the figure in the given graphics. Draw is a template method calling drawBackground followed by drawFrame.
        Specified by:
        draw in interface Figure
        Overrides:
        draw in class AttributeFigure
        Parameters:
        g - the Graphics to draw into
      • connectionInsets

        public java.awt.Insets connectionInsets()
        Description copied from class: AbstractFigure
        Returns the connection inset. The connection inset defines the area where the display box of a figure can't be connected. By default the entire display box can be connected.
        Specified by:
        connectionInsets in interface Figure
        Overrides:
        connectionInsets in class AbstractFigure
      • center

        public java.awt.Point center()
        Description copied from class: AbstractFigure
        Gets the center of a figure. A convenice method that is rarely overridden.
        Specified by:
        center in interface Figure
        Overrides:
        center in class AbstractFigure
      • chop

        public java.awt.Point chop(java.awt.Point p)
      • clone

        public java.lang.Object clone()
        Description copied from class: AbstractFigure
        Clones a figure. Creates a clone by using the storable mechanism to flatten the Figure to stream followed by resurrecting it from the same stream.
        Specified by:
        clone in interface Figure
        Overrides:
        clone in class AbstractFigure
        See Also:
        Figure.clone()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.