Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.report.xls
Class BFont

    java.lang.Object
      Biff
          jet.report.xls.BFont

    public class BFont

extends Biff

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

### ITALIC

    public static final int ITALIC

See Also:
  Constant Field Values

### STRIKEOUT

    public static final int STRIKEOUT

See Also:
  Constant Field Values

### OUTLINE

    public static final int OUTLINE

See Also:
  Constant Field Values

### SHADOW

    public static final int SHADOW

See Also:
  Constant Field Values

### SS_NONE

    public static final short SS_NONE

See Also:
  Constant Field Values

### SS_SUPER

    public static final short SS_SUPER

See Also:
  Constant Field Values

### SS_SUB

    public static final short SS_SUB

See Also:
  Constant Field Values

### U_NONE

    public static final byte U_NONE

See Also:
  Constant Field Values

### U_SINGLE

    public static final byte U_SINGLE

See Also:
  Constant Field Values

### U_DOUBLE

    public static final byte U_DOUBLE

See Also:
  Constant Field Values

### U_SINGLE_ACCOUNTING

    public static final byte U_SINGLE_ACCOUNTING

See Also:
  Constant Field Values

### U_DOUBLE_ACCOUNTING

    public static final byte U_DOUBLE_ACCOUNTING

See Also:
  Constant Field Values

Constructor Detail

### BFont

    public BFont()

  Constructs a BFont record with default value.

### BFont

    public BFont(BFont font)

  Constructs a BFont record with a BFont record existed.

### BFont

    public 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.

  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()

  get the opcode of BFont.

### output

    public int output(RandomAccessStream stream)
               throws java.io.IOException

  output class BFont.

  Throws:
    `java.io.IOException`

### input

    public void input(RandomAccessStream stream)
               throws java.io.IOException

  input font from input stream

  Throws:
    `java.io.IOException`

### getLength

    public int getLength()

  get the current size of the record.

### 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)

  set whether the font is italic

  Parameters:
    `fItalic:` - whether the font is italic

### setStrickout

    public void setStrickout(boolean fStrickout)

  set whether the font is struck out

  Parameters:
    `fStrickout:` - whether the font is struck out

### setOutline

    public void setOutline(boolean fOutline)

  set if the font is outline style (Macintosh only)

  Parameters:
    `fOutline` - :whether the font is outline style

### setShadow

    public void setShadow(boolean fShadow)

  set if the font is shadow style (Macintosh only)

  Parameters:
    `fShadow` - :the font is shadow styleor not

### getItalic

    public boolean getItalic()

  get whether the font is italic

  Returns:
    whether the font is italic

### getStrickout

    public boolean getStrickout()

  get whether the font is struck out

  Returns:
    the font is struck out or not

### getOutline

    public boolean getOutline()

  get if the font is outline style (Macintosh only)

  Returns:
    the font is outline style or not

### getShadow

    public boolean getShadow()

  get if the font is shadow style (Macintosh only)

  Returns:
    the font is shadow style or not

### setColor

    public void setColor(short icv)

  set the font's color palette index

  Parameters:
    `cpi` - - font color index

### setBoldStyle

    public void setBoldStyle(boolean bs)

  set the bold weight for this font (100-1000dec or 0x64-0x3e8). Default is 0x190 for normal and 0x2bc for bold

  Parameters:
    `bw` - - a number between 100-1000 for the fonts "boldness"

### setSuperSubScript

    public void setSuperSubScript(short sss)

  set the type of super or subscript for the font

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

### setUnderline

    public void setUnderline(byte u)

  set the type of underlining for the font

  Parameters:
    `u` - super or subscript option
  See Also:
    `U_NONE`, `U_SINGLE`, `U_DOUBLE`, `U_SINGLE_ACCOUNTING`, `U_DOUBLE_ACCOUNTING`

### setFamily

    public void setFamily(byte f)

  set the font family (TODO)

  Parameters:
    `f` - family

### setCharset

    public void setCharset(byte charset)

  set the character set

  Parameters:
    `charset` - - characterset

### setFontName

    public void setFontName(java.lang.String name)

  set the name of the font

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

### toString

    public java.lang.String toString()

  get the Returns a string representation of the BFont

  Returns:
    a string representation of the object.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD