Documentation of 'edu.rit.draw.item.SquareDottedOutline' Java class
SquareDottedOutline
edu.rit.draw.item

Class SquareDottedOutline

  • All Implemented Interfaces:
    Outline, java.io.Externalizable, java.io.Serializable


    public class SquareDottedOutline
    extends java.lang.Object
    implements Outline
    Class SquareDottedOutline provides an object that outlines an area in a DrawingItem with a square-cornered dotted stroke in a solid color.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static Fill NORMAL_FILL
      The normal square dotted outline fill paint (black).
      static SquareDottedOutline NORMAL_OUTLINE
      The normal square dotted outline (width = 1, fill paint = black).
      static float NORMAL_WIDTH
      The normal square dotted outline width (1).
      • Fields inherited from interface edu.rit.draw.item.Outline

        NONE
    • Constructor Summary

      Constructors 
      Constructor and Description
      SquareDottedOutline()
      Construct a new square dotted outline object with the normal width (1) and the normal fill paint (black).
      SquareDottedOutline(SquareDottedOutline theOutline)
      Construct a new square dotted outline object with the same width and fill paint as the given dotted outline object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Fill fill()
      Returns this square dotted outline object's fill paint.
      SquareDottedOutline fill(Fill theFill)
      Set this square dotted outline object's fill paint.
      float getStrokeWidth()
      Returns the stroke width of this outline.
      void readExternal(java.io.ObjectInput in)
      Read this square dotted outline object from the given object input stream.
      void setGraphicsContext(java.awt.Graphics2D g2d)
      Set the given graphics context's stroke and paint attributes as specified by this outline object.
      float width()
      Returns this square dotted outline object's width.
      SquareDottedOutline width(float theWidth)
      Set this square dotted outline object's width.
      void writeExternal(java.io.ObjectOutput out)
      Write this square dotted outline object to the given object output stream.
      • Methods inherited from class java.lang.Object

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

      • NORMAL_WIDTH

        public static final float NORMAL_WIDTH
        The normal square dotted outline width (1).
        See Also:
        Constant Field Values
      • NORMAL_FILL

        public static final Fill NORMAL_FILL
        The normal square dotted outline fill paint (black).
      • NORMAL_OUTLINE

        public static final SquareDottedOutline NORMAL_OUTLINE
        The normal square dotted outline (width = 1, fill paint = black).
    • Constructor Detail

      • SquareDottedOutline

        public SquareDottedOutline()
        Construct a new square dotted outline object with the normal width (1) and the normal fill paint (black).
      • SquareDottedOutline

        public SquareDottedOutline(SquareDottedOutline theOutline)
        Construct a new square dotted outline object with the same width and fill paint as the given dotted outline object.
        Parameters:
        theOutline - Square dotted outline object.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theOutline is null.
    • Method Detail

      • width

        public float width()
        Returns this square dotted outline object's width.
        Returns:
        Width.
      • width

        public SquareDottedOutline width(float theWidth)
        Set this square dotted outline object's width.
        Parameters:
        theWidth - Width.
        Returns:
        This square dotted outline object.
        Throws:
        java.lang.IllegalArgumentException - (unchecked exception) Thrown if theWidth is less than or equal to 0.
      • fill

        public Fill fill()
        Returns this square dotted outline object's fill paint.
        Returns:
        Fill paint.
      • fill

        public SquareDottedOutline fill(Fill theFill)
        Set this square dotted outline object's fill paint.
        Parameters:
        theFill - Fill paint.
        Returns:
        This square dotted outline object.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theFill is null.
      • getStrokeWidth

        public float getStrokeWidth()
        Returns the stroke width of this outline.
        Specified by:
        getStrokeWidth in interface Outline
        Returns:
        Stroke width.
      • setGraphicsContext

        public void setGraphicsContext(java.awt.Graphics2D g2d)
        Set the given graphics context's stroke and paint attributes as specified by this outline object.
        Specified by:
        setGraphicsContext in interface Outline
        Parameters:
        g2d - 2-D graphics context.
      • writeExternal

        public void writeExternal(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this square dotted outline object to the given object output stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - Object output stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • readExternal

        public void readExternal(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Read this square dotted outline object from the given object input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - Object input stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
        java.lang.ClassNotFoundException - Thrown if any class needed to deserialize this square dotted outline object cannot be found.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.