com.arctorus.documents.table
Class CellBorders

java.lang.Object
  extended by com.arctorus.documents.table.CellBorders
All Implemented Interfaces:
java.lang.Cloneable

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

Borders of a cell. Allows to set different styles for different sides of a cell.

Type of border elements: left, right, top, bottom, diagonal up (/), diagonal down (\) and diagonal cross (X).

See Also:
DiagonalBorderType, BorderStyle, Cell

Field Summary
static CellBorders DEFAULT
           
 
Method Summary
 void clear()
          Clear all borders and make them invisible.
 boolean equals(java.lang.Object obj)
          Compares the specified object with this map for equality.
 BorderStyleId getBottomBorder()
          Return id of the bottom border style.
 BorderStyleId getDiagonalBorder()
          Return id of the diagonal border style.
 DiagonalBorderType getDiagonalBorderType()
          Return type of the diagonal border.
 BorderStyleId getLeftBorder()
          Return id of the left border style.
 BorderStyleId getRightBorder()
          Return id of the right border style.
 BorderStyleId getTopBorder()
          Return id of the top border style.
 int hashCode()
          Returns the hash code value for this collection.
 boolean isEmpty()
          Returns true if all borders don't have any style assigned.
 void setBottomBorder(BorderStyle bottom)
          Set bottom border style.
 void setBottomBorder(BorderStyleId bottom)
          Set id of the bottom border style.
 void setDiagonalBorder(DiagonalBorderType diagonalType, BorderStyle diagonal)
          Set style and type of the diagonal border.
 void setDiagonalBorder(DiagonalBorderType diagonalType, BorderStyleId diagonal)
          Set id and type of the diagonal border style.
 void setDiagonalBorderType(DiagonalBorderType diagonalType)
          Set type of the diagonal border.
 void setLeftBorder(BorderStyle left)
          Set left border style.
 void setLeftBorder(BorderStyleId left)
          Set id of the left border style.
 void setRightBorder(BorderStyle right)
          Set right border style.
 void setRightBorder(BorderStyleId right)
          Set id of the right border style.
 void setTopBorder(BorderStyle top)
          Set top border style.
 void setTopBorder(BorderStyleId top)
          Set id of the top border style.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final CellBorders DEFAULT
Method Detail

getLeftBorder

public final BorderStyleId getLeftBorder()
Return id of the left border style.


setLeftBorder

public final void setLeftBorder(BorderStyleId left)
Set id of the left border style.

Parameters:
left - style's id to set.

setLeftBorder

public final void setLeftBorder(BorderStyle left)
Set left border style.

Parameters:
left - style to set.

getRightBorder

public final BorderStyleId getRightBorder()
Return id of the right border style.


setRightBorder

public final void setRightBorder(BorderStyleId right)
Set id of the right border style.

Parameters:
right - style's id to set.

setRightBorder

public final void setRightBorder(BorderStyle right)
Set right border style.

Parameters:
right - style to set.

getTopBorder

public final BorderStyleId getTopBorder()
Return id of the top border style.


setTopBorder

public final void setTopBorder(BorderStyleId top)
Set id of the top border style.

Parameters:
top - style's id to set.

setTopBorder

public final void setTopBorder(BorderStyle top)
Set top border style.

Parameters:
top - style to set.

getBottomBorder

public final BorderStyleId getBottomBorder()
Return id of the bottom border style.


setBottomBorder

public final void setBottomBorder(BorderStyleId bottom)
Set id of the bottom border style.

Parameters:
bottom - style's id to set.

setBottomBorder

public final void setBottomBorder(BorderStyle bottom)
Set bottom border style.

Parameters:
bottom - style to set.

getDiagonalBorder

public final BorderStyleId getDiagonalBorder()
Return id of the diagonal border style.


setDiagonalBorder

public final void setDiagonalBorder(DiagonalBorderType diagonalType,
                                    BorderStyleId diagonal)
Set id and type of the diagonal border style.

Parameters:
diagonalType - diagonal border type.
diagonal - style's id to set.

setDiagonalBorder

public final void setDiagonalBorder(DiagonalBorderType diagonalType,
                                    BorderStyle diagonal)
Set style and type of the diagonal border.

Parameters:
diagonalType - diagonal border type.
diagonal - style to set.

getDiagonalBorderType

public final DiagonalBorderType getDiagonalBorderType()
Return type of the diagonal border.


setDiagonalBorderType

public final void setDiagonalBorderType(DiagonalBorderType diagonalType)
Set type of the diagonal border.

Parameters:
diagonalType - diagonal border type.

clear

public void clear()
Clear all borders and make them invisible.


hashCode

public int hashCode()
Returns the hash code value for this collection.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Compares the specified object with this map for equality. Returns true if the given object is also a map and the two maps represent the same mappings.

Overrides:
equals in class java.lang.Object

isEmpty

public boolean isEmpty()
Returns true if all borders don't have any style assigned.