Documentation of 'org.jhotdraw.draw.decoration.AbstractLineDecoration' Java class
AbstractLineDecoration
org.jhotdraw.draw.decoration

Class AbstractLineDecoration

    • Constructor Summary

      Constructors 
      Constructor and Description
      AbstractLineDecoration(boolean isFilled, boolean isStroked, boolean isSolid)
      Constructs an arrow tip with the given angle and radius.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void draw(java.awt.Graphics2D g, Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)
      Draws the arrow tip in the direction specified by the given two Points.
      double getDecorationRadius(Figure f)
      Returns the radius of the decorator.
      java.awt.geom.Rectangle2D.Double getDrawingArea(Figure f, java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2)
      Returns the drawing area of the decorator.
      • Methods inherited from class java.lang.Object

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

      • AbstractLineDecoration

        public AbstractLineDecoration(boolean isFilled,
                                      boolean isStroked,
                                      boolean isSolid)
        Constructs an arrow tip with the given angle and radius.
    • Method Detail

      • draw

        public void draw(java.awt.Graphics2D g,
                         Figure f,
                         java.awt.geom.Point2D.Double p1,
                         java.awt.geom.Point2D.Double p2)
        Draws the arrow tip in the direction specified by the given two Points. (template method)
        Specified by:
        draw in interface LineDecoration
      • getDrawingArea

        public java.awt.geom.Rectangle2D.Double getDrawingArea(Figure f,
                                                               java.awt.geom.Point2D.Double p1,
                                                               java.awt.geom.Point2D.Double p2)
        Returns the drawing area of the decorator.
        Specified by:
        getDrawingArea in interface LineDecoration
      • getDecorationRadius

        public double getDecorationRadius(Figure f)
        Description copied from interface: LineDecoration
        Returns the radius of the decorator. This is used to crop the end of the line, to prevent it from being drawn over the decorator.
        Specified by:
        getDecorationRadius in interface LineDecoration

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.