Class Line

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, AntiAliasingDrawOperation, Serializable

    public class Line
    extends AbstractColorStrokeDrawOperation
    Draws a line between the given start and end coordinates.

    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to 
        the console (0 = off).
        default: 0
        minimum: 0
     
    -color <java.awt.Color> (property: color)
        The color of the pixel.
        default: #000000
     
    -stroke-thickness <float> (property: strokeThickness)
        The thickness of the stroke.
        default: 1.0
        minimum: 0.01
     
    -anti-aliasing-enabled (property: antiAliasingEnabled)
        If enabled, uses anti-aliasing for drawing.
     
    -x1 <int> (property: X1)
        The X position of the start of the line (1-based).
        default: 1
        minimum: 1
     
    -y1 <int> (property: Y1)
        The Y position of the start of the line (1-based).
        default: 1
        minimum: 1
     
    -x2 <int> (property: X2)
        The X position of the end of the line (1-based).
        default: 10
        minimum: 1
     
    -y2 <int> (property: Y2)
        The Y position of the end of the line (1-based).
        default: 10
        minimum: 1
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_X1

        protected int m_X1
        the X position of the start of the line (1-based).
      • m_Y1

        protected int m_Y1
        the Y position of the start of the line (1-based).
      • m_X2

        protected int m_X2
        the X position of the end of the line (1-based).
      • m_Y2

        protected int m_Y2
        the Y position of the end of the line (1-based).
    • Constructor Detail

      • Line

        public Line()
    • Method Detail

      • setX1

        public void setX1​(int value)
        Sets the X position of the start of the line.
        Parameters:
        value - the position, 1-based
      • getX1

        public int getX1()
        Returns the X position of the start of the line.
        Returns:
        the position, 1-based
      • X1TipText

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

        public void setY1​(int value)
        Sets the Y position of the start of the line.
        Parameters:
        value - the position, 1-based
      • getY1

        public int getY1()
        Returns the Y position of the start of the line.
        Returns:
        the position, 1-based
      • Y1TipText

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

        public void setX2​(int value)
        Sets the X position of the end of the line.
        Parameters:
        value - the position, 1-based
      • getX2

        public int getX2()
        Returns the X position of the end of the line.
        Returns:
        the position, 1-based
      • X2TipText

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

        public void setY2​(int value)
        Sets the Y position of the end of the line.
        Parameters:
        value - the position, 1-based
      • getY2

        public int getY2()
        Returns the Y position of the end of the line.
        Returns:
        the position, 1-based
      • Y2TipText

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