Package org.apache.poi.hwpf.usermodel
Class BorderCode
- java.lang.Object
-
- org.apache.poi.hwpf.usermodel.BorderCode
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class BorderCode extends java.lang.Object implements java.lang.CloneableMapping class for BRC80 structure (Border Code for Word 97)Comments are copied out from the binary format specification.
-
-
Field Summary
Fields Modifier and Type Field Description static intSIZE
-
Constructor Summary
Constructors Constructor Description BorderCode()BorderCode(byte[] buf, int offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()booleanequals(java.lang.Object o)intgetBorderType()Border type code: 0 none 1 single 2 thick 3 double 5 hairline 6 dot 7 dash large gap 8 dot dash 9 dot dot dash 10 triple 11 thin-thick small gap 12 thick-thin small gap 13 thin-thick-thin small gap 14 thin-thick medium gap 15 thick-thin medium gap 16 thin-thick-thin medium gap 17 thin-thick large gap 18 thick-thin large gap 19 thin-thick-thin large gap 20 wave 21 double wave 22 dash small gap 23 dash dot stroked 24 emboss 3D 25 engrave 3D codes 64 - 230 represent border art types and are used only for page bordersshortgetColor()Color: 0 Auto 1 Black 2 Blue 3 Cyan 4 Green 5 Magenta 6 Red 7 Yellow 8 White 9 DkBlue 10 DkCyan 11 DkGreen 12 DkMagenta 13 DkRed 14 DkYellow 15 DkGray 16 LtGrayintgetLineWidth()Width of a single line in 1/8 pt, max of 32 pt.intgetSpace()Width of space to maintain between border and text within border.inthashCode()booleanisEmpty()booleanisFrame()Don't reverse the border.booleanisShadow()When true, border is drawn with shadow Must be false when BRC is a substructure of the TC.voidserialize(byte[] buf, int offset)voidsetBorderType(int borderType)voidsetColor(short color)voidsetFrame(boolean frame)voidsetLineWidth(int lineWidth)voidsetShadow(boolean shadow)voidsetSpace(int space)inttoInt()java.lang.StringtoString()
-
-
-
Field Detail
-
SIZE
public static final int SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
serialize
public void serialize(byte[] buf, int offset)
-
toInt
public int toInt()
-
isEmpty
public boolean isEmpty()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Throws:
java.lang.CloneNotSupportedException
-
getLineWidth
public int getLineWidth()
Width of a single line in 1/8 pt, max of 32 pt.
-
setLineWidth
public void setLineWidth(int lineWidth)
- Parameters:
lineWidth- the width of the line to set
-
getBorderType
public int getBorderType()
Border type code:- 0 none
- 1 single
- 2 thick
- 3 double
- 5 hairline
- 6 dot
- 7 dash large gap
- 8 dot dash
- 9 dot dot dash
- 10 triple
- 11 thin-thick small gap
- 12 thick-thin small gap
- 13 thin-thick-thin small gap
- 14 thin-thick medium gap
- 15 thick-thin medium gap
- 16 thin-thick-thin medium gap
- 17 thin-thick large gap
- 18 thick-thin large gap
- 19 thin-thick-thin large gap
- 20 wave
- 21 double wave
- 22 dash small gap
- 23 dash dot stroked
- 24 emboss 3D
- 25 engrave 3D
- codes 64 - 230 represent border art types and are used only for page borders
-
setBorderType
public void setBorderType(int borderType)
-
getColor
public short getColor()
Color:- 0 Auto
- 1 Black
- 2 Blue
- 3 Cyan
- 4 Green
- 5 Magenta
- 6 Red
- 7 Yellow
- 8 White
- 9 DkBlue
- 10 DkCyan
- 11 DkGreen
- 12 DkMagenta
- 13 DkRed
- 14 DkYellow
- 15 DkGray
- 16 LtGray
-
setColor
public void setColor(short color)
-
getSpace
public int getSpace()
Width of space to maintain between border and text within border.Must be 0 when BRC is a substructure of TC.
Stored in points.
-
setSpace
public void setSpace(int space)
-
isShadow
public boolean isShadow()
When true, border is drawn with shadow Must be false when BRC is a substructure of the TC.
-
setShadow
public void setShadow(boolean shadow)
-
isFrame
public boolean isFrame()
Don't reverse the border.
-
setFrame
public void setFrame(boolean frame)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-