Class GFXLineAttr


  • public class GFXLineAttr
    extends GFXAttr

    The graphic Line attribute object holds information about attribute values specific for line drawing.

    • Field Detail

      • DEFAULT_LINEWIDTH

        public static final UnitSpan DEFAULT_LINEWIDTH
      • BLACK_LINE

        public static final GFXLineAttr BLACK_LINE
      • WHITE_LINE

        public static final GFXLineAttr WHITE_LINE
      • LIGHTGRAY_LINE

        public static final GFXLineAttr LIGHTGRAY_LINE
      • DARKGRAY_LINE

        public static final GFXLineAttr DARKGRAY_LINE
      • HAND_LEFT

        public static final int HAND_LEFT
        enumeration int: Specifies the type of coordinate system to use.

                 HAND_LEFT      : left-handed
                 HAND_RIGHT : right-handed
                 HAND_EVEN      : even-handed (?)
         
        See Also:
        Constant Field Values
      • CAP_BUTT

        public static final int CAP_BUTT
        enumeration int: Specifies the current device capablilites.

                 CAP_BUTT       :
                 CAP_ROUND      :
                 CAP_SQUARE :
         
        See Also:
        Constant Field Values
    • Constructor Detail

      • GFXLineAttr

        public GFXLineAttr()
        Default constructor.

        Creates a new Line attribute with default settings:

                 Width - default width
                 Hand  - even
                 Cap   - square
         
      • GFXLineAttr

        public GFXLineAttr​(GFXLineAttr oSource)
        Copy constructor.

        Creates a new Line attribute with the same settings as the source attribute.

        Parameters:
        oSource - - Line attribute to copy
      • GFXLineAttr

        public GFXLineAttr​(UnitSpan oNewWidth,
                           int nNewStyle,
                           int lNewShade,
                           GFXColour oNewColour,
                           GFXColour oNewColourBg)
        Constructor.

        Creates a new Line attribute with the specified settings.

        Parameters:
        oNewWidth - - The width for this attribute
        nNewStyle - - The style setting for this attribute
        lNewShade - - The shade setting for this attribute
        oNewColour - - The foreground colour to be used
        oNewColourBg - - The background colour to be used
    • Method Detail

      • defaultLine

        public GFXLineAttr defaultLine()
        Get a default Line Attribute.

        This will return a Line Attribute with the following settings:

                 Width                          = default
                 Style                          = solid
                 Shade scale            = maximum
                 Foreground colour      = black
                 Background colour      = white
         
        Returns:
        A Line Attribute with default settings
      • blackLine

        public GFXLineAttr blackLine()
        Get a black line Attribute.

        This will return a Line Attribute with the following settings:

                 Width                     = default
                 Style                     = solid
                 Shade scale       = maximum
                 Foreground colour = black
                 Background colour = white
         
        Returns:
        A Line Attribute with black line settings
      • whiteLine

        public GFXLineAttr whiteLine()
        Get a white line Attribute.

        This will return a Line Attribute with the following settings:

                 Width                     = default
                 Style                     = solid
                 Shade scale       = maximum
                 Foreground colour = white
                 Background colour = white
         
        Returns:
        A Line Attribute with white line settings
      • lightGrayLine

        public GFXLineAttr lightGrayLine()
        Get a light gray line Attribute.

        This will return a Line Attribute with the following settings:

                 Width                     = default
                 Style                     = solid
                 Shade scale       = maximum
                 Foreground colour = light gray
                 Background colour = white
         
        Returns:
        A Line Attribute with light gray line settings
      • grayLine

        public GFXLineAttr grayLine()
        Get a gray line Attribute.

        This will return a Line Attribute with the following settings:

                 Width                     = default
                 Style                     = solid
                 Shade scale       = maximum
                 Foreground colour = gray
                 Background colour = white
         
        Returns:
        A Line Attribute with gray line settings
      • darkGrayLine

        public GFXLineAttr darkGrayLine()
        Get a dark gray line Attribute.

        This will return a Line Attribute with the following settings:

                 Width                     = default
                 Style                     = solid
                 Shade scale       = maximum
                 Foreground colour = dark gray
                 Background colour = white
         
        Returns:
        A Line Attribute with dark gray line settings
      • width

        public UnitSpan width()
        Get the width for this attribute.
        Returns:
        The width as a UnitSpan object
      • width

        public void width​(UnitSpan oNewWidth)
        Set the width for this attribute.
        Parameters:
        oNewWidth - - The new width
      • hand

        public int hand()
        Get the hand setting for this attribute.
        Returns:
        The hand setting as a int enumeration
      • hand

        public void hand​(int oNewCode)
        Set the hand setting for this attribute.
        Parameters:
        oNewCode - - The new hand setting
      • cap

        public int cap()
        Get the capability for this attribute.
        Returns:
        The capability as a int enumeration
      • cap

        public void cap​(int oNewCode)
        Set the capability for this attribute.
        Parameters:
        oNewCode - - The capability value
      • equivalent

        public boolean equivalent​(GFXLineAttr oCompare)
        Equality comparison.

        Compares on an attribute value basis. Two attributes are considered equal if their values compare for equality.

        Parameters:
        oCompare - - Attribute object to compare against.
        Returns:
        TRUE if all members are equal, FALSE otherwise.
      • equals

        public boolean equals​(java.lang.Object object)
        Equality comparison operator.

        Compares on an attribute value basis. Two attributes are considered equal if their values compare for equality.

        Overrides:
        equals in class GFXAttr
        Parameters:
        object - - Attribute object to compare against.
        Returns:
        TRUE if the attribute objects are considered equal; FALSE otherwise.
      • copyFrom

        public void copyFrom​(GFXLineAttr oSource)
        Assigment operator.

        Replace all attribute settings with those from the source object.

        Parameters:
        oSource - - Source attribute object to copy.