de.vc.jfo.attributes

## Class Border

- java.lang.Object
- - de.vc.jfo.attributes.AttributeSubSet
  - - de.vc.jfo.attributes.Border

- All Implemented Interfaces:
    java.lang.Cloneable

      public class Border
      extends AttributeSubSet

  Describes the border of an formatting object.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Border.Style`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `KEY_SET`
    `static Border.Style` | `STYLE_DASHED`
    `static Border.Style` | `STYLE_DOTTED`
    `static Border.Style` | `STYLE_DOUBLE`
    `static Border.Style` | `STYLE_GROOVE`
    `static Border.Style` | `STYLE_HIDDEN`
    `static Border.Style` | `STYLE_INSET`
    `static Border.Style` | `STYLE_NONE`
    `static Border.Style` | `STYLE_OUTSET`
    `static Border.Style` | `STYLE_RIDGE`
    `static Border.Style` | `STYLE_SOLID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Border()` Create a border without any definitions.
    `Border(int width, java.awt.Color color)` Creates a new solid border.
    `Border(int width, java.awt.Color color, Border.Style style)` Creates a new border.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Border` | `copy()` This is equals to clone(), but with a correct return type and no CloneNotSupportedException is thrown.
    `boolean` | `equals(java.lang.Object o)`
    `java.lang.Object` | `getAttribute(int keyIdx)`
    `java.awt.Color` | `getBottomColor()` Gets the bottom border-color.
    `Border.Style` | `getBottomStyle()` Gets the bottom border-style.
    `Measure` | `getBottomWidth()` Gets the bottom border-width.
    `java.awt.Color` | `getColor()` Gets the common color of border (left, right, top & bottom).
    `java.awt.Color` | `getLeftColor()` Gets the left border-color.
    `Border.Style` | `getLeftStyle()` Gets the left border-style.
    `Measure` | `getLeftWidth()` Gets the left border-width.
    `java.awt.Color` | `getRightColor()` Gets the right border-color.
    `Border.Style` | `getRightStyle()` Gets the right border-style.
    `Measure` | `getRightWidth()` Gets the right border-width.
    `Border.Style` | `getStyle()` Gets the common style of border (left, right, top & bottom).
    `java.awt.Color` | `getTopColor()` Gets the top border-color.
    `Border.Style` | `getTopStyle()` Gets the top border-style.
    `Measure` | `getTopWidth()` Gets the top border-width.
    `Measure` | `getWidth()` Gets the common width border (left, right, top & bottom).
    `boolean` | `isDefined()`
    `void` | `optimize()` Optimize settings of this border.
    `void` | `setBottomColor(java.awt.Color color)` Sets the bottom border-color .
    `void` | `setBottomStyle(Border.Style style)` Sets the bottom border-style .
    `void` | `setBottomWidth(Measure width)` Sets the bottom border-width .
    `void` | `setColor(java.awt.Color color)` Sets the common border-color (left, right, top & bottom).
    `void` | `setLeftColor(java.awt.Color color)` Sets the left border-color .
    `void` | `setLeftStyle(Border.Style style)` Sets the left border-style .
    `void` | `setLeftWidth(Measure width)` Sets the left border-width .
    `void` | `setRightColor(java.awt.Color color)` Sets the right border-color .
    `void` | `setRightStyle(Border.Style style)` Sets the right border-style .
    `void` | `setRightWidth(Measure width)` Sets the right border-width .
    `void` | `setSolid()`
    `void` | `setSolid(Measure width)`
    `void` | `setSolid(Measure width, java.awt.Color color)`
    `void` | `setStyle(Border.Style style)` Sets the common border-style (left, right, top & bottom).
    `void` | `setTopColor(java.awt.Color color)` Sets the top border-color .
    `void` | `setTopStyle(Border.Style style)` Sets the top border-style .
    `void` | `setTopWidth(Measure width)` Sets the top border-width .
    `void` | `setWidth(Measure width)` Sets the common border-width for (left, right, top & bottom).

    - ### Methods inherited from class de.vc.jfo.attributes.AttributeSubSet

      `addDefinedAttributes, applyAttributes, clone, isMutable, makeImmutable, setAttribute`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### STYLE_NONE

          public static final Border.Style STYLE_NONE

    - #### STYLE_HIDDEN

          public static final Border.Style STYLE_HIDDEN

    - #### STYLE_DOTTED

          public static final Border.Style STYLE_DOTTED

    - #### STYLE_DASHED

          public static final Border.Style STYLE_DASHED

    - #### STYLE_DOUBLE

          public static final Border.Style STYLE_DOUBLE

    - #### STYLE_GROOVE

          public static final Border.Style STYLE_GROOVE

    - #### STYLE_RIDGE

          public static final Border.Style STYLE_RIDGE

    - #### STYLE_INSET

          public static final Border.Style STYLE_INSET

    - #### STYLE_OUTSET

          public static final Border.Style STYLE_OUTSET

    - #### STYLE_SOLID

          public static final Border.Style STYLE_SOLID

    - #### KEY_SET

          public static final java.lang.String[] KEY_SET

  - ### Constructor Detail

    - #### Border

          public Border()

      Create a border without any definitions.

    - #### Border

          public Border(int width,
                java.awt.Color color)

      Creates a new solid border.
      Parameters:
        `width` - Width in points.
        `color` - Color.

    - #### Border

          public Border(int width,
                java.awt.Color color,
                Border.Style style)

      Creates a new border.
      Parameters:
        `width` - Width in points.
        `color` - Color.
        `style` - Style of border.

  - ### Method Detail

    - #### setSolid

          public void setSolid()

    - #### setSolid

          public void setSolid(Measure width)

    - #### setSolid

          public void setSolid(Measure width,
                      java.awt.Color color)

    - #### setStyle

          public void setStyle(Border.Style style)

      Sets the common border-style (left, right, top & bottom).
      Parameters:
        `style` - New Style.

    - #### setWidth

          public void setWidth(Measure width)

      Sets the common border-width for (left, right, top & bottom).
      Parameters:
        `width` - New width of border.

    - #### setColor

          public void setColor(java.awt.Color color)

      Sets the common border-color (left, right, top & bottom).
      Parameters:
        `color` - New color of border.

    - #### setLeftStyle

          public void setLeftStyle(Border.Style style)

      Sets the left border-style .
      Parameters:
        `style` - New Style.

    - #### setLeftWidth

          public void setLeftWidth(Measure width)

      Sets the left border-width .
      Parameters:
        `width` - New width.

    - #### setLeftColor

          public void setLeftColor(java.awt.Color color)

      Sets the left border-color .
      Parameters:
        `color` - New color.

    - #### setRightStyle

          public void setRightStyle(Border.Style style)

      Sets the right border-style .
      Parameters:
        `style` - New Style.

    - #### setRightWidth

          public void setRightWidth(Measure width)

      Sets the right border-width .
      Parameters:
        `width` - New width.

    - #### setRightColor

          public void setRightColor(java.awt.Color color)

      Sets the right border-color .
      Parameters:
        `color` - New color.

    - #### setTopStyle

          public void setTopStyle(Border.Style style)

      Sets the top border-style .
      Parameters:
        `style` - New Style.

    - #### setTopWidth

          public void setTopWidth(Measure width)

      Sets the top border-width .
      Parameters:
        `width` - New width.

    - #### setTopColor

          public void setTopColor(java.awt.Color color)

      Sets the top border-color .
      Parameters:
        `color` - New color.

    - #### setBottomStyle

          public void setBottomStyle(Border.Style style)

      Sets the bottom border-style .
      Parameters:
        `style` - New Style.

    - #### setBottomWidth

          public void setBottomWidth(Measure width)

      Sets the bottom border-width .
      Parameters:
        `width` - New width.

    - #### setBottomColor

          public void setBottomColor(java.awt.Color color)

      Sets the bottom border-color .
      Parameters:
        `color` - New color.

    - #### getColor

          public java.awt.Color getColor()

      Gets the common color of border (left, right, top & bottom).
      Returns:
        Color. Default is black.

    - #### getStyle

          public Border.Style getStyle()

      Gets the common style of border (left, right, top & bottom).
      Returns:
        Style or NULL, if undefined.

    - #### getWidth

          public Measure getWidth()

      Gets the common width border (left, right, top & bottom).
      Returns:
        Width or NULL, if undefined.

    - #### getLeftColor

          public java.awt.Color getLeftColor()

      Gets the left border-color. Returns common border-color, if undefined.
      Returns:
        Color of left border.

    - #### getLeftStyle

          public Border.Style getLeftStyle()

      Gets the left border-style. Returns common border-style, if undefined.
      Returns:
        Style of left border.

    - #### getLeftWidth

          public Measure getLeftWidth()

      Gets the left border-width. Returns common border-width, if undefined.
      Returns:
        Width of left border.

    - #### getRightColor

          public java.awt.Color getRightColor()

      Gets the right border-color. Returns common border-color, if undefined.
      Returns:
        Color of left border.

    - #### getRightStyle

          public Border.Style getRightStyle()

      Gets the right border-style. Returns common border-style, if undefined.
      Returns:
        Style of left border.

    - #### getRightWidth

          public Measure getRightWidth()

      Gets the right border-width. Returns common border-width, if undefined.
      Returns:
        Width of left border.

    - #### getTopColor

          public java.awt.Color getTopColor()

      Gets the top border-color. Returns common border-color, if undefined.
      Returns:
        Color of left border.

    - #### getTopStyle

          public Border.Style getTopStyle()

      Gets the top border-style. Returns common border-style, if undefined.
      Returns:
        Style of left border.

    - #### getTopWidth

          public Measure getTopWidth()

      Gets the top border-width. Returns common border-width, if undefined.
      Returns:
        Width of left border.

    - #### getBottomColor

          public java.awt.Color getBottomColor()

      Gets the bottom border-color. Returns common border-color, if undefined.
      Returns:
        Color of left border.

    - #### getBottomStyle

          public Border.Style getBottomStyle()

      Gets the bottom border-style. Returns common border-style, if undefined.
      Returns:
        Style of left border.

    - #### getBottomWidth

          public Measure getBottomWidth()

      Gets the bottom border-width. Returns common border-width, if undefined.
      Returns:
        Width of left border.

    - #### optimize

          public void optimize()

      Optimize settings of this border. Only for internal use currently.

    - #### isDefined

          public boolean isDefined()

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### copy

          public Border copy()

      This is equals to clone(), but with a correct return type and no CloneNotSupportedException is thrown.
      Returns:
        Copy of this border.

    - #### getAttribute

          public java.lang.Object getAttribute(int keyIdx)

      Specified by:
        `getAttribute` in class `AttributeSubSet`

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.