ru.novosoft.dc.rtf.dom.objects
Class Border

java.lang.Object
  |
  +--ru.novosoft.dc.rtf.dom.objects.Border

public final class Border
extends java.lang.Object
implements java.lang.Cloneable

The border specification class. It consists of the border style, width, color index, and a space between border and bordered object.


Field Summary
static byte DASHED
          Dashed border.
static byte DOT_DASH
          Dot dash border.
static byte DOT_DOT_DASH
          Dot dot dash border.
static byte DOTTED
          Dotted border.
static byte DOUBLE
          Double border.
static byte DOUBLE_THICKNESS
          Double-thickness border.
static byte DOUBLE_WAVY
          Double wavy border.
static byte EMBOSS
          Emboss border.
static byte ENGRAVE
          Engrave border.
static byte FRAME
          Border resembles a "Frame".
static byte HAIRLINE
          Hairline border.
static byte INSET
          Inset border.
static byte LARGE_THICK_THIN
          Thick thin border (large).
static byte LARGE_THIN_THICK
          Thin thick border (large).
static byte LARGE_THIN_THICK_THIN
          Thin thick thin border (large).
static byte MEDIUM_THICK_THIN
          Thick thin border (medium).
static byte MEDIUM_THIN_THICK
          Thin thick border (medium).
static byte MEDIUM_THIN_THICK_THIN
          Thin thick thin border (medium).
static byte NIL
          No border specified.
static byte NONE
          No border.
static byte OUTSET
          Outset border.
static byte SHADOWED
          Shadowed border.
static byte SINGLE_THICKNESS
          Single-thickness border.
static byte SMALL_DASH
          Dash border (small).
static byte SMALL_THICK_THIN
          Thick thin border (small).
static byte SMALL_THIN_THICK
          Thin thick border (small).
static byte SMALL_THIN_THICK_THIN
          Thin thick thin border (small).
static byte STRIPED
          Striped border.
static byte TABLE
          Table cell has no borders.
static byte TRIPLE
          Triple border.
static byte WAVY
          Wavy border.
 
Constructor Summary
Border()
           
 
Method Summary
 java.lang.Object clone()
          Create a deep copy of this object.
 boolean equals(java.lang.Object obj)
          Compare this border with another border and return true if borders coinside.
 int getColorIndex()
          Return the border color index (-1 means "auto" color).
 int getSpace()
          Return the space between the border and bordered object (the default is 0).
 int getStyle()
          Return the border style (the default is NONE).
 int getWidth()
          Return the border width (the default is 0).
 void setColorIndex(int value)
          Set an index of the border color.
 void setSpace(int value)
          Set a space in twips between the border and bordered object.
 void setStyle(int value)
          Set a border style.
 void setWidth(int value)
          Set a border width in twips.
 java.lang.String toString()
          Return a border description string in the form "style,wwidth,sspace,ccolor-index".
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final byte NONE
No border.

SINGLE_THICKNESS

public static final byte SINGLE_THICKNESS
Single-thickness border.

DOUBLE_THICKNESS

public static final byte DOUBLE_THICKNESS
Double-thickness border.

SHADOWED

public static final byte SHADOWED
Shadowed border.

DOUBLE

public static final byte DOUBLE
Double border.

DOTTED

public static final byte DOTTED
Dotted border.

DASHED

public static final byte DASHED
Dashed border.

HAIRLINE

public static final byte HAIRLINE
Hairline border.

INSET

public static final byte INSET
Inset border.

SMALL_DASH

public static final byte SMALL_DASH
Dash border (small).

DOT_DASH

public static final byte DOT_DASH
Dot dash border.

DOT_DOT_DASH

public static final byte DOT_DOT_DASH
Dot dot dash border.

OUTSET

public static final byte OUTSET
Outset border.

TRIPLE

public static final byte TRIPLE
Triple border.

SMALL_THICK_THIN

public static final byte SMALL_THICK_THIN
Thick thin border (small).

SMALL_THIN_THICK

public static final byte SMALL_THIN_THICK
Thin thick border (small).

SMALL_THIN_THICK_THIN

public static final byte SMALL_THIN_THICK_THIN
Thin thick thin border (small).

MEDIUM_THICK_THIN

public static final byte MEDIUM_THICK_THIN
Thick thin border (medium).

MEDIUM_THIN_THICK

public static final byte MEDIUM_THIN_THICK
Thin thick border (medium).

MEDIUM_THIN_THICK_THIN

public static final byte MEDIUM_THIN_THICK_THIN
Thin thick thin border (medium).

LARGE_THICK_THIN

public static final byte LARGE_THICK_THIN
Thick thin border (large).

LARGE_THIN_THICK

public static final byte LARGE_THIN_THICK
Thin thick border (large).

LARGE_THIN_THICK_THIN

public static final byte LARGE_THIN_THICK_THIN
Thin thick thin border (large).

WAVY

public static final byte WAVY
Wavy border.

DOUBLE_WAVY

public static final byte DOUBLE_WAVY
Double wavy border.

STRIPED

public static final byte STRIPED
Striped border.

EMBOSS

public static final byte EMBOSS
Emboss border.

ENGRAVE

public static final byte ENGRAVE
Engrave border.

FRAME

public static final byte FRAME
Border resembles a "Frame".

NIL

public static final byte NIL
No border specified.

TABLE

public static final byte TABLE
Table cell has no borders.
Constructor Detail

Border

public Border()
Method Detail

setStyle

public final void setStyle(int value)
Set a border style.

getStyle

public final int getStyle()
Return the border style (the default is NONE).

setWidth

public final void setWidth(int value)
Set a border width in twips. The width cannot be greater than 75. The DOUBLE_THICKNESS style can be used to obtain a width double that specified width.

getWidth

public final int getWidth()
Return the border width (the default is 0).

setColorIndex

public final void setColorIndex(int value)
Set an index of the border color.

getColorIndex

public final int getColorIndex()
Return the border color index (-1 means "auto" color).

setSpace

public final void setSpace(int value)
Set a space in twips between the border and bordered object.

getSpace

public final int getSpace()
Return the space between the border and bordered object (the default is 0).

clone

public java.lang.Object clone()
Create a deep copy of this object.
Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Compare this border with another border and return true if borders coinside.
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Return a border description string in the form "style,wwidth,sspace,ccolor-index". If width, space, or color-index is undefined, the corresponding field is omittted together with comma.
Overrides:
toString in class java.lang.Object