org.apache.poi.hssf.record.cf
Class BorderFormatting

java.lang.Object
  extended by org.apache.poi.hssf.record.cf.BorderFormatting

public class BorderFormatting
extends java.lang.Object

Border Formatting Block of the Conditional Formatting Rule Record.

Author:
Dmitriy Kumshayev

Field Summary
static short BORDER_DASH_DOT
          dash-dot border
static short BORDER_DASH_DOT_DOT
          dash-dot-dot border
static short BORDER_DASHED
          dash border
static short BORDER_DOTTED
          hair-line border
static short BORDER_DOUBLE
          double-line border
static short BORDER_HAIR
          dot border
static short BORDER_MEDIUM
          Medium border
static short BORDER_MEDIUM_DASH_DOT
          medium dash-dot border
static short BORDER_MEDIUM_DASH_DOT_DOT
          medium dash-dot-dot border
static short BORDER_MEDIUM_DASHED
          Medium dashed border
static short BORDER_NONE
          No border
static short BORDER_SLANTED_DASH_DOT
          slanted dash-dot border
static short BORDER_THICK
          Thick border
static short BORDER_THIN
          Thin border
 
Constructor Summary
BorderFormatting()
           
BorderFormatting(RecordInputStream in)
          Creates new FontFormatting
 
Method Summary
 java.lang.Object clone()
           
 short getBorderBottom()
          get the type of border to use for the bottom border of the cell
 short getBorderDiagonal()
          get the type of border to use for the diagonal border of the cell
 short getBorderLeft()
          get the type of border to use for the left border of the cell
 short getBorderRight()
          get the type of border to use for the right border of the cell
 short getBorderTop()
          get the type of border to use for the top border of the cell
 short getBottomBorderColor()
          get the color to use for the bottom border
 short getDiagonalBorderColor()
          get the color to use for the diagonal border
 short getLeftBorderColor()
          get the color to use for the left border
 short getRightBorderColor()
          get the color to use for the right border
 short getTopBorderColor()
          get the color to use for the top border
 boolean isBackwardDiagonalOn()
           
 boolean isForwardDiagonalOn()
           
 int serialize(int offset, byte[] data)
           
 void setBackwardDiagonalOn(boolean on)
          Of/off top left to bottom right line
 void setBorderBottom(short border)
          set the type of border to use for the bottom border of the cell
 void setBorderDiagonal(short border)
          set the type of border to use for the diagonal border of the cell
 void setBorderLeft(short border)
          set the type of border to use for the left border of the cell
 void setBorderRight(short border)
          set the type of border to use for the right border of the cell
 void setBorderTop(short border)
          set the type of border to use for the top border of the cell
 void setBottomBorderColor(short color)
          set the color to use for the bottom border
 void setDiagonalBorderColor(short color)
          set the color to use for the diagonal borders
 void setForwardDiagonalOn(boolean on)
          Of/off bottom left to top right line
 void setLeftBorderColor(short color)
          set the color to use for the left border
 void setRightBorderColor(short color)
          set the color to use for the right border
 void setTopBorderColor(short color)
          set the color to use for the top border
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BORDER_NONE

public static final short BORDER_NONE
No border

See Also:
Constant Field Values

BORDER_THIN

public static final short BORDER_THIN
Thin border

See Also:
Constant Field Values

BORDER_MEDIUM

public static final short BORDER_MEDIUM
Medium border

See Also:
Constant Field Values

BORDER_DASHED

public static final short BORDER_DASHED
dash border

See Also:
Constant Field Values

BORDER_HAIR

public static final short BORDER_HAIR
dot border

See Also:
Constant Field Values

BORDER_THICK

public static final short BORDER_THICK
Thick border

See Also:
Constant Field Values

BORDER_DOUBLE

public static final short BORDER_DOUBLE
double-line border

See Also:
Constant Field Values

BORDER_DOTTED

public static final short BORDER_DOTTED
hair-line border

See Also:
Constant Field Values

BORDER_MEDIUM_DASHED

public static final short BORDER_MEDIUM_DASHED
Medium dashed border

See Also:
Constant Field Values

BORDER_DASH_DOT

public static final short BORDER_DASH_DOT
dash-dot border

See Also:
Constant Field Values

BORDER_MEDIUM_DASH_DOT

public static final short BORDER_MEDIUM_DASH_DOT
medium dash-dot border

See Also:
Constant Field Values

BORDER_DASH_DOT_DOT

public static final short BORDER_DASH_DOT_DOT
dash-dot-dot border

See Also:
Constant Field Values

BORDER_MEDIUM_DASH_DOT_DOT

public static final short BORDER_MEDIUM_DASH_DOT_DOT
medium dash-dot-dot border

See Also:
Constant Field Values

BORDER_SLANTED_DASH_DOT

public static final short BORDER_SLANTED_DASH_DOT
slanted dash-dot border

See Also:
Constant Field Values
Constructor Detail

BorderFormatting

public BorderFormatting()

BorderFormatting

public BorderFormatting(RecordInputStream in)
Creates new FontFormatting

Method Detail

setBorderLeft

public void setBorderLeft(short border)
set the type of border to use for the left border of the cell

Parameters:
border - type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

getBorderLeft

public short getBorderLeft()
get the type of border to use for the left border of the cell

Returns:
border type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

setBorderRight

public void setBorderRight(short border)
set the type of border to use for the right border of the cell

Parameters:
border - type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

getBorderRight

public short getBorderRight()
get the type of border to use for the right border of the cell

Returns:
border type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

setBorderTop

public void setBorderTop(short border)
set the type of border to use for the top border of the cell

Parameters:
border - type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

getBorderTop

public short getBorderTop()
get the type of border to use for the top border of the cell

Returns:
border type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

setBorderBottom

public void setBorderBottom(short border)
set the type of border to use for the bottom border of the cell

Parameters:
border - type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

getBorderBottom

public short getBorderBottom()
get the type of border to use for the bottom border of the cell

Returns:
border type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

setBorderDiagonal

public void setBorderDiagonal(short border)
set the type of border to use for the diagonal border of the cell

Parameters:
border - type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

getBorderDiagonal

public short getBorderDiagonal()
get the type of border to use for the diagonal border of the cell

Returns:
border type
See Also:
BORDER_NONE, BORDER_THIN, BORDER_MEDIUM, BORDER_DASHED, BORDER_DOTTED, BORDER_THICK, BORDER_DOUBLE, BORDER_HAIR, BORDER_MEDIUM_DASHED, BORDER_DASH_DOT, BORDER_MEDIUM_DASH_DOT, BORDER_DASH_DOT_DOT, BORDER_MEDIUM_DASH_DOT_DOT, BORDER_SLANTED_DASH_DOT

setLeftBorderColor

public void setLeftBorderColor(short color)
set the color to use for the left border

Parameters:
color - The index of the color definition

getLeftBorderColor

public short getLeftBorderColor()
get the color to use for the left border

Parameters:
color - The index of the color definition
See Also:
HSSFPalette.getColor(short)

setRightBorderColor

public void setRightBorderColor(short color)
set the color to use for the right border

Parameters:
color - The index of the color definition

getRightBorderColor

public short getRightBorderColor()
get the color to use for the right border

Parameters:
color - The index of the color definition
See Also:
HSSFPalette.getColor(short)

setTopBorderColor

public void setTopBorderColor(short color)
set the color to use for the top border

Parameters:
color - The index of the color definition

getTopBorderColor

public short getTopBorderColor()
get the color to use for the top border

Parameters:
color - The index of the color definition
See Also:
HSSFPalette.getColor(short)

setBottomBorderColor

public void setBottomBorderColor(short color)
set the color to use for the bottom border

Parameters:
color - The index of the color definition

getBottomBorderColor

public short getBottomBorderColor()
get the color to use for the bottom border

Parameters:
color - The index of the color definition
See Also:
HSSFPalette.getColor(short)

setDiagonalBorderColor

public void setDiagonalBorderColor(short color)
set the color to use for the diagonal borders

Parameters:
color - The index of the color definition

getDiagonalBorderColor

public short getDiagonalBorderColor()
get the color to use for the diagonal border

Parameters:
color - The index of the color definition
See Also:
HSSFPalette.getColor(short)

setForwardDiagonalOn

public void setForwardDiagonalOn(boolean on)
Of/off bottom left to top right line

Parameters:
on - - if true - on, otherwise off

setBackwardDiagonalOn

public void setBackwardDiagonalOn(boolean on)
Of/off top left to bottom right line

Parameters:
on - - if true - on, otherwise off

isForwardDiagonalOn

public boolean isForwardDiagonalOn()
Returns:
true if forward diagonal is on

isBackwardDiagonalOn

public boolean isBackwardDiagonalOn()
Returns:
true if backward diagonal is on

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

serialize

public int serialize(int offset,
                     byte[] data)


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.