|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectBiff
jet.report.xls.BFont
public class BFont
Description: the Font record is Font Description The workbook font table contains at least five Font records. Record Body Length: more than 15 bytes Record Body Byte Structure: Byte Number Byte Name Byte Description 0-1 dyHeight Height of the font 2-3 grbit Font attributes 4-5 icv Index to the color palette 6-7 bls Bold Style. 8-9 sss Superscript/subscript 10 uls Underline style 11 bFamily Font family, as defined by the Windows API LOGFONT structure 12 bCharSet Character set, as defined by the Windows API LOGFONT structure 13 (Reserved) Reserved ;must be 0 14 cch Length of the font name 15-... rfch Font name A Font class extends Biff class.
| Field Summary | |
|---|---|
static int |
ITALIC
|
static int |
OUTLINE
|
static int |
SHADOW
|
static short |
SS_NONE
|
static short |
SS_SUB
|
static short |
SS_SUPER
|
static int |
STRIKEOUT
|
static byte |
U_DOUBLE
|
static byte |
U_DOUBLE_ACCOUNTING
|
static byte |
U_NONE
|
static byte |
U_SINGLE
|
static byte |
U_SINGLE_ACCOUNTING
|
| Constructor Summary | |
|---|---|
BFont()
Constructs a BFont record with default value. |
|
BFont(BFont font)
Constructs a BFont record with a BFont record existed. |
|
BFont(short size,
short grbit,
short icv,
short bls,
short sss,
byte uls,
byte bFamily,
byte bCharSet,
java.lang.String name)
Constructs a BFont record and sets its fields appropriately. |
|
| Method Summary | |
|---|---|
boolean |
getItalic()
get whether the font is italic |
int |
getLength()
get the current size of the record. |
boolean |
getOutline()
get if the font is outline style (Macintosh only) |
boolean |
getShadow()
get if the font is shadow style (Macintosh only) |
boolean |
getStrickout()
get whether the font is struck out |
void |
input(RandomAccessStream stream)
input font from input stream |
int |
opcode()
get the opcode of BFont. |
int |
output(RandomAccessStream stream)
output class BFont. |
void |
setBoldStyle(boolean bs)
set the bold weight for this font (100-1000dec or 0x64-0x3e8). |
void |
setCharset(byte charset)
set the character set |
void |
setColor(short icv)
set the font's color palette index |
void |
setFamily(byte f)
set the font family (TODO) |
void |
setFontHeight(short height)
sets the height of the font in 1/20th point units |
void |
setFontName(java.lang.String name)
set the name of the font |
void |
setItalic(boolean fItalic)
set whether the font is italic |
void |
setOutline(boolean fOutline)
set if the font is outline style (Macintosh only) |
void |
setShadow(boolean fShadow)
set if the font is shadow style (Macintosh only) |
void |
setStrickout(boolean fStrickout)
set whether the font is struck out |
void |
setSuperSubScript(short sss)
set the type of super or subscript for the font |
void |
setUnderline(byte u)
set the type of underlining for the font |
java.lang.String |
toString()
get the Returns a string representation of the BFont |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ITALIC
public static final int STRIKEOUT
public static final int OUTLINE
public static final int SHADOW
public static final short SS_NONE
public static final short SS_SUPER
public static final short SS_SUB
public static final byte U_NONE
public static final byte U_SINGLE
public static final byte U_DOUBLE
public static final byte U_SINGLE_ACCOUNTING
public static final byte U_DOUBLE_ACCOUNTING
| Constructor Detail |
|---|
public BFont()
public BFont(BFont font)
public BFont(short size,
short grbit,
short icv,
short bls,
short sss,
byte uls,
byte bFamily,
byte bCharSet,
java.lang.String name)
size - Height of the font(in units of 1/20 of a pointgrbit - Font attributesicv - Index to the color palettebls - Bold Style.sss - Superscript/subscriptuls - Underline stylebFamily - Font family, as defined by the Windows API LOGFONT structurebCharSet - Character set, as defined by the Windows API LOGFONT structurename - Font name| Method Detail |
|---|
public final int opcode()
public int output(RandomAccessStream stream)
throws java.io.IOException
java.io.IOException
public void input(RandomAccessStream stream)
throws java.io.IOException
java.io.IOExceptionpublic int getLength()
public void setFontHeight(short height)
height - fontheight (in points/20)public void setItalic(boolean fItalic)
fItalic: - whether the font is italicpublic void setStrickout(boolean fStrickout)
fStrickout: - whether the font is struck outpublic void setOutline(boolean fOutline)
fOutline - :whether the font is outline stylepublic void setShadow(boolean fShadow)
fShadow - :the font is shadow styleor notpublic boolean getItalic()
public boolean getStrickout()
public boolean getOutline()
public boolean getShadow()
public void setColor(short icv)
cpi - - font color indexpublic void setBoldStyle(boolean bs)
bw - - a number between 100-1000 for the fonts "boldness"public void setSuperSubScript(short sss)
sss - super or subscript optionSS_NONE,
SS_SUPER,
SS_SUBpublic void setUnderline(byte u)
u - super or subscript optionU_NONE,
U_SINGLE,
U_DOUBLE,
U_SINGLE_ACCOUNTING,
U_DOUBLE_ACCOUNTINGpublic void setFamily(byte f)
f - familypublic void setCharset(byte charset)
charset - - charactersetpublic void setFontName(java.lang.String name)
fn - - name of the font (i.e. "Arial")public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||