jet.report.xls
Class BFont

java.lang.Object
  extended by jet.report.xls.Biff
      extended by jet.report.xls.BFont
All Implemented Interfaces:
jet.report.xls.DataConstants

public class BFont
extends jet.report.xls.Biff

Specifies the excel font info.


Field Summary
static short SS_NONE
          Indicates that the font is neither super script nor subscript.
static short SS_SUB
          Indicates that the font is subscript.
static short SS_SUPER
          Indicates that the font is super script.
static byte U_DOUBLE
          Represents double underline.
static byte U_DOUBLE_ACCOUNTING
          Represents double accounting underline.
static byte U_NONE
          Represents no underline.
static byte U_SINGLE
          Represents single underline.
static byte U_SINGLE_ACCOUNTING
          Represents single accounting underline.
 
Fields inherited from class jet.report.xls.Biff
AI, AREA, AREAFORMAT, ATTACHEDLABEL, AXCEXT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BFONT, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOTTOMMARGIN, BOUNDSHEET, CALCCOUNT, CALCMODE, CATERRANGE, CHART, CHART3D, CHARTDATALABELEXT, CHARTFORMAT, CHARTLINE, CODEPAGE, COLINFO, CONTINUE, COUNTRY, DATAFORMAT, DATE1904, DBCELL, DCON, DCONNAME, DCONREF, DEFCOLWIDTH, DEFROWHEIGHT, DEFTEXT, DELTA, DIMENSIONS, DROPBAR, DSF, END, EOF, EXTERNCOUNT, EXTERNSHEET, EXTSST, FBI, FILEPASS, FNGROUPCOUNT, FONTX, FOOTER, FORMAT, FORMULA, FRAME, FTCF, FTCMO, FTEND, FTPIOGRBIT, GELFRAME, GRIDSET, GUTS, HCENTER, HEADER, HIDEOBJ, HLINK, HORIZONTALPAGEBREAKS, IFMT, INDEX, INTEGER, INTERFACEEND, INTERFACEHDR, ITERATION, LABEL, LABELSST, LEFTMARGIN, LEGEND, LEGENDDXN, LINE, LINEFORMAT, MARKERFORMAT, MERGECELLS, MMS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MSODRAWINGUNKNOWN, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, PALETTE, PANE, PASSWORD, PIE, PIEFORMAT, PLOTAREA, PLOTGROWTH, PLS, POS, PRECISION, PRINTGRIDLINES, PRINTHEADERS, PROT4REV, PROT4REVPASS, PROTECT, RADAR, RADARAREA, REFMODE, REFRESHALL, RIGHTMARGIN, RK, ROW, SAVERECALC, SCATTER, SCL, SELECTION, SERFORMAT, SERIES, SERIESTEXT, SERTOCRT, SETUP, SHTPROPS, SIINDEX, SST, STRING, STYLE, SUPBOOK, SURFACE, TABID, TABLE, TEXT, TICK, TIP, TOPMARGIN, UNITS, UNKNOWN, UNKNOWN1, UNKNOWN10, UNKNOWN2, UNKNOWN3, UNKNOWN4, UNKNOWN5, UNKNOWN6, UNKNOWN7, UNKNOWN8, UNKNOWN9, USESELFS, VALUERANGE, VCENTER, VERTICALPAGEBREAKS, WINDOW1, WINDOW2, WINDOWPROTECT, WRITEACCESS, WSBOOL, XF
 
Fields inherited from interface jet.report.xls.DataConstants
BIG_BLOCK_SIZE, BYTE, DIRECTORY_TYPE, DOCUMENT_TYPE, DOUBLE, FLOAT, INT, LONG, MAX_LENGTH, MAX_RECORD_SIZE, MIN_DOC_SIZE, PROPERTY_SIZE, PROPERTY_TYPE_OFFSET, ROOT_TYPE, SHORT, SMALL_BLOCK_SIZE, UNUSED_BLOCK
 
Constructor Summary
BFont()
          Constructs a BFont record with the default value.
BFont(BFont font)
          Constructs a BFont record with an existing BFont record.
BFont(short size, short grbit, short icv, short bls, short sss, byte uls, byte bFamily, short bCharSet, java.lang.String name)
          Constructs a BFont record and sets its fields appropriately.
 
Method Summary
 boolean getItalic()
          Gets whether the font is italic.
 int getLength()
          Gets the current size of the record.
 boolean getOutline()
          Gets whether the font is in outline style (Macintosh only).
 boolean getShadow()
          Gets whether the font is in shadow style (Macintosh only).
 boolean getStrickout()
          Gets whether the font is strikethrough.
 void input(util.RandomAccessStream stream)
          Inputs font from input stream.
 int opcode()
          Gets the opcode of BFont.
 int output(util.RandomAccessStream stream)
          Outputs class BFont.
 void setBoldStyle(boolean bs)
          Sets the flag whether the font is bold or not.
 void setCharset(byte charset)
          Sets the character set.
 void setColor(short icv)
          Sets the font's color palette index.
 void setFamily(byte f)
          Sets the font family.
 void setFontHeight(short height)
          Sets the height of the font in 1/20th point units.
 void setFontName(java.lang.String name)
          Sets the name of the font.
 void setItalic(boolean fItalic)
          Sets whether the font is italic.
 void setOutline(boolean fOutline)
          Sets if the font is in outline style (Macintosh only).
 void setShadow(boolean fShadow)
          Sets if the font is in shadow style (Macintosh only).
 void setStrickout(boolean fStrickout)
          Sets whether the font is strikethrough.
 void setSuperSubScript(short sss)
          Sets the type of superscript or subscript for the font.
 void setUnderline(byte u)
          Sets the type of underlining for the font.
 java.lang.String toString()
          Returns a string representation of the BFont
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SS_NONE

public static final short SS_NONE
Indicates that the font is neither super script nor subscript.

See Also:
Constant Field Values

SS_SUPER

public static final short SS_SUPER
Indicates that the font is super script.

See Also:
Constant Field Values

SS_SUB

public static final short SS_SUB
Indicates that the font is subscript.

See Also:
Constant Field Values

U_NONE

public static final byte U_NONE
Represents no underline.

See Also:
Constant Field Values

U_SINGLE

public static final byte U_SINGLE
Represents single underline.

See Also:
Constant Field Values

U_DOUBLE

public static final byte U_DOUBLE
Represents double underline.

See Also:
Constant Field Values

U_SINGLE_ACCOUNTING

public static final byte U_SINGLE_ACCOUNTING
Represents single accounting underline.

See Also:
Constant Field Values

U_DOUBLE_ACCOUNTING

public static final byte U_DOUBLE_ACCOUNTING
Represents double accounting underline.

See Also:
Constant Field Values
Constructor Detail

BFont

public BFont()
Constructs a BFont record with the default value.


BFont

public BFont(BFont font)
Constructs a BFont record with an existing BFont record.


BFont

public BFont(short size,
             short grbit,
             short icv,
             short bls,
             short sss,
             byte uls,
             byte bFamily,
             short bCharSet,
             java.lang.String name)
Constructs a BFont record and sets its fields appropriately.

Parameters:
size - height of the font(in units of 1/20 of a point)
grbit - font attributes
icv - index to the color palette
bls - bold Style.
sss - superscript/subscript
uls - underline style
bFamily - font family, as defined by the Windows API LOGFONT structure
bCharSet - character set, as defined by the Windows API LOGFONT structure
name - font name
Method Detail

opcode

public final int opcode()
Gets the opcode of BFont.

Specified by:
opcode in class jet.report.xls.Biff

output

public int output(util.RandomAccessStream stream)
           throws java.io.IOException
Outputs class BFont.

Overrides:
output in class jet.report.xls.Biff
Throws:
java.io.IOException

input

public void input(util.RandomAccessStream stream)
           throws java.io.IOException
Inputs font from input stream.

Overrides:
input in class jet.report.xls.Biff
Throws:
java.io.IOException

getLength

public int getLength()
Gets the current size of the record.

Overrides:
getLength in class jet.report.xls.Biff

setFontHeight

public void setFontHeight(short height)
Sets the height of the font in 1/20th point units.

Parameters:
height - fontheight (in points/20)

setItalic

public void setItalic(boolean fItalic)
Sets whether the font is italic.

Parameters:
fItalic - true specifies the font is italic

setStrickout

public void setStrickout(boolean fStrickout)
Sets whether the font is strikethrough.

Parameters:
fStrickout - true specifies the font is strikethrough

setOutline

public void setOutline(boolean fOutline)
Sets if the font is in outline style (Macintosh only).

Parameters:
fOutline - true specifies the font is in outline style

setShadow

public void setShadow(boolean fShadow)
Sets if the font is in shadow style (Macintosh only).

Parameters:
fShadow - true specifies the font is in shadow style

getItalic

public boolean getItalic()
Gets whether the font is italic.

Returns:
true if the font is italic

getStrickout

public boolean getStrickout()
Gets whether the font is strikethrough.

Returns:
true if the font is strikethrough

getOutline

public boolean getOutline()
Gets whether the font is in outline style (Macintosh only).

Returns:
true if the font is in outline style

getShadow

public boolean getShadow()
Gets whether the font is in shadow style (Macintosh only).

Returns:
true if the font is in shadow style

setColor

public void setColor(short icv)
Sets the font's color palette index.

Parameters:
icv - font color index

setBoldStyle

public void setBoldStyle(boolean bs)
Sets the flag whether the font is bold or not.

Parameters:
bs - true specifies that the font has bold style

setSuperSubScript

public void setSuperSubScript(short sss)
Sets the type of superscript or subscript for the font.

Parameters:
sss - superscript or subscript option
See Also:
SS_NONE, SS_SUPER, SS_SUB

setUnderline

public void setUnderline(byte u)
Sets the type of underlining for the font.

Parameters:
u - underlining option
See Also:
U_NONE, U_SINGLE, U_DOUBLE, U_SINGLE_ACCOUNTING, U_DOUBLE_ACCOUNTING

setFamily

public void setFamily(byte f)
Sets the font family.

Parameters:
f - family

setCharset

public void setCharset(byte charset)
Sets the character set.

Parameters:
charset - - character set

setFontName

public void setFontName(java.lang.String name)
Sets the name of the font.

Parameters:
name - - name of the font (i.e. "Arial")

toString

public java.lang.String toString()
Returns a string representation of the BFont

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.