jet.report.xls
Class FontInfo

java.lang.Object
  extended by jet.report.xls.FontInfo

public class FontInfo
extends java.lang.Object

Information of text font


Field Summary
static short BOLD
           
static byte BOTTOM
           
static byte CENTER
           
static int ITALIC
           
static byte LEFT
           
static short NOBOLD
           
static int OUTLINE
           
static byte RIGHT
           
static int SHADOW
           
static short SS_NONE
           
static short SS_SUB
           
static short SS_SUPER
           
static int STRIKEOUT
           
static byte TOP
           
static byte U_DOUBLE
           
static byte U_NONE
           
static byte U_SINGLE
           
 
Constructor Summary
FontInfo()
          Constructs a FontInfo record with default value.
FontInfo(short size, short grbit, short bold, short effect, byte underline, int rgb, java.lang.String name, GlobalWorksheet gws)
          Constructs a FontInfo record and sets its fields appropriately.
 
Method Summary
 boolean getBoldStyle()
          get the bold weight for this font (100-1000dec or 0x64-0x3e8).
 int getColor()
          get the font's color
 short getEffect()
          get the type of super or subscript for the font
 short getFontHeight()
          gets the height of the font in 1/20th point units
 java.lang.String getFontName()
          get the name of the font
 short getGrbit()
          get font attributes
 byte getHAlignment()
          get the horizonal alignment of the text
 boolean getItalic()
          get whether the font is italic
 boolean getOutline()
          get if the font is outline style (Macintosh only)
 short getRotation()
          get the text rotation
 boolean getShadow()
          get if the font is shadow style
 boolean getStrickout()
          get whether the font is struck out
 byte getUnderline()
          get the type of underlining for the font
 byte getVAlignment()
          get the vertical alignment of the text
 void setBoldStyle(boolean bs)
          set the bold weight for this font (100-1000dec or 0x64-0x3e8).
 void setColor(int color, GlobalWorksheet gws)
          set the font's color
 void setEffect(short effect)
          set the type of super or subscript for the font
 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 setHAlignment(byte ha)
          set the horizonal alignment of the text
 void setItalic(boolean fItalic)
          set whether the font is italic
 void setOutline(boolean fOutline)
          set if the font is outline style (Macintosh only)
 void setRotation(short rot)
          set text rotation
 void setShadow(boolean fShadow)
          set if the font is shadow style
 void setStrickout(boolean fStrickout)
          set whether the font is struck out
 void setUnderline(byte u)
          set the type of underlining for the font
 void setVAlignment(byte va)
          set the vertical alignment of the text
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, 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

BOLD

public static final short BOLD
See Also:
Constant Field Values

NOBOLD

public static final short NOBOLD
See Also:
Constant Field Values

LEFT

public static final byte LEFT
See Also:
Constant Field Values

CENTER

public static final byte CENTER
See Also:
Constant Field Values

RIGHT

public static final byte RIGHT
See Also:
Constant Field Values

TOP

public static final byte TOP
See Also:
Constant Field Values

BOTTOM

public static final byte BOTTOM
See Also:
Constant Field Values
Constructor Detail

FontInfo

public FontInfo()
Constructs a FontInfo record with default value.


FontInfo

public FontInfo(short size,
                short grbit,
                short bold,
                short effect,
                byte underline,
                int rgb,
                java.lang.String name,
                GlobalWorksheet gws)
Constructs a FontInfo record and sets its fields appropriately.

Parameters:
size - Height of the font(in units of 1/20 of a point)
grbit - Font attributes, ITALIC, STRIKEOUT, OUTLINE, SHADOW or combine value of them.
bold - Bold Style, BOLD or NOBOLD.
effect - Superscript/subscript, SS_NONE, SS_SUPER or SS_SUB
underline - Underline style, U_NONE, U_SINGLE OR U_DOUBLE
rgb - Font color
name - Font name
Method Detail

setFontHeight

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

Parameters:
height - fontheight (in points/20)

getFontHeight

public short getFontHeight()
gets the height of the font in 1/20th point units

Returns:
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

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

Returns:
the font is shadow style or not

getGrbit

public short getGrbit()
get font attributes

Returns:
font attributes

setColor

public void setColor(int color,
                     GlobalWorksheet gws)
set the font's color

Parameters:
cpi - - font color rgb

getColor

public int getColor()
get the font's color

Returns:
font color rgb

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"

getBoldStyle

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

Returns:
bold or not

setEffect

public void setEffect(short effect)
set the type of super or subscript for the font

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

getEffect

public short getEffect()
get the type of super or subscript for the font

Returns:
super or subscript option effect
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

getUnderline

public byte getUnderline()
get the type of underlining for the font

Returns:
super or subscript option
See Also:
U_NONE, U_SINGLE, U_DOUBLE

setFontName

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

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

getFontName

public java.lang.String getFontName()
get the name of the font

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

setRotation

public void setRotation(short rot)
set text rotation

Parameters:
rot - - text rotation

getRotation

public short getRotation()
get the text rotation

Returns:
text rotation

setHAlignment

public void setHAlignment(byte ha)
set the horizonal alignment of the text

Parameters:
ha - horizonal alignment of the text
See Also:
LEFT, RIGHT, CENTER

getHAlignment

public byte getHAlignment()
get the horizonal alignment of the text

Returns:
horizonal alignment of the text
See Also:
LEFT, RIGHT, CENTER

setVAlignment

public void setVAlignment(byte va)
set the vertical alignment of the text

Parameters:
va - vertical alignment of the text
See Also:
TOP, BOTTOM, CENTER

getVAlignment

public byte getVAlignment()
get the vertical alignment of the text

Returns:
vertical alignment of the text
See Also:
TOP, BOTTOM, CENTER