Class Circle

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, PdfProclet, PdfProcletWithVariableFileExtension, Serializable

    public class Circle
    extends AbstractPdfProclet
    implements PdfProcletWithVariableFileExtension
    Draws a circle.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -regexp-filename <adams.core.base.BaseRegExp> (property: regExpFilename)
        The regular expression that the filename must match.
        default: .*
     
    -extension <adams.core.base.BaseString> [-extension ...] (property: extensions)
        The file extension(s) that the processor will be used for.
        default: *
     
    -x <float> (property: X)
        The absolute X position.
        default: 0.0
        minimum: 0.0
     
    -y <float> (property: Y)
        The absolute Y position.
        default: 0.0
        minimum: 0.0
     
    -radius <float> (property: radius)
        The radius.
        default: 10.0
        minimum: 0.001
     
    -color <java.awt.Color> (property: color)
        The color of the rectangle.
        default: #000000
     
    -line-width <float> (property: lineWidth)
        The line width.
        default: 1.0
        minimum: 0.001
     
    -fill <boolean> (property: fill)
        If enabled the shape gets filled with the specified color.
        default: false
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Extensions

        protected BaseString[] m_Extensions
        the file extensions.
      • m_X

        protected float m_X
        the absolute X position.
      • m_Y

        protected float m_Y
        the absolute Y position.
      • m_Radius

        protected float m_Radius
        the radius.
      • m_Color

        protected Color m_Color
        the color.
      • m_LineWidth

        protected float m_LineWidth
        the line width.
      • m_Fill

        protected boolean m_Fill
        whether to fill the circle.
    • Constructor Detail

      • Circle

        public Circle()
    • Method Detail

      • setX

        public void setX​(float value)
        Sets the absolute X position.
        Parameters:
        value - the X position
      • getX

        public float getX()
        Returns the absolute X position.
        Returns:
        the X position
      • XTipText

        public String XTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setY

        public void setY​(float value)
        Sets the absolute Y position.
        Parameters:
        value - the Y position
      • getY

        public float getY()
        Returns the absolute Y position.
        Returns:
        the Y position
      • YTipText

        public String YTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRadius

        public void setRadius​(float value)
        Sets the radius.
        Parameters:
        value - the radius
      • getRadius

        public float getRadius()
        Returns the radius.
        Returns:
        the radius
      • radiusTipText

        public String radiusTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColor

        public void setColor​(Color value)
        Sets the color.
        Parameters:
        value - the color
      • getColor

        public Color getColor()
        Returns the color.
        Returns:
        the color
      • colorTipText

        public String colorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setLineWidth

        public void setLineWidth​(float value)
        Sets the line width.
        Parameters:
        value - the line width
      • getLineWidth

        public float getLineWidth()
        Returns the line width.
        Returns:
        the line width
      • lineWidthTipText

        public String lineWidthTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFill

        public void setFill​(boolean value)
        Sets whether to fill the shape with the specified color.
        Parameters:
        value - true if to fill
      • getFill

        public boolean getFill()
        Returns whether to fill the shape with the specified color.
        Returns:
        true if to fill
      • fillTipText

        public String fillTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • doProcess

        protected boolean doProcess​(PDFGenerator generator,
                                    File file)
                             throws Exception
        The actual processing of the document.
        Specified by:
        doProcess in class AbstractPdfProclet
        Parameters:
        generator - the context
        file - the file to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • canProcess

        public boolean canProcess​(PDFGenerator generator,
                                  Object obj)
        Whether the processor can handle this particular object.
        Specified by:
        canProcess in interface PdfProclet
        Specified by:
        canProcess in class AbstractPdfProclet
        Parameters:
        generator - the context
        obj - the object to check
        Returns:
        true if the object can be handled
      • doProcess

        protected boolean doProcess​(PDFGenerator generator,
                                    Object obj)
                             throws Exception
        The actual processing of the document.
        Specified by:
        doProcess in class AbstractPdfProclet
        Parameters:
        generator - the context
        obj - the object to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong