jet.report.xls
Class GlobalWorksheet

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

public class GlobalWorksheet
extends java.lang.Object

It is a global object to set some global properties for a WorkBook.


Method Summary
 void addColor(int color)
          Adds a color to the palette.
 int getColorIndex(int color)
          Gets the index of the Color.
 int getFontIndex(BFont font)
          Gets the index of the BFont.
 short getFormatIndex(java.lang.String formatString, java.lang.String encoding)
          Gets the format index that will be set in the Xf .
 boolean getShareLabel()
          Deprecated. it is not be used
 java.lang.String getString(int id)
          Gets a particular string in shared string table by its index.
 java.lang.String getUsername()
          Gets the username for the user who have created the report.
 int getXfIndex(Xf xf)
          Gets the index of the Xf.
 void makePalette()
          Adds the palette to the right location of the GlobalWorksheet if user modified the default color in the palette.
 void setCurrentCountry(short ccountry)
          Sets the current country.
 void setDefaultCountry(short dcountry)
          Sets the default country.
 void setDsf(short fdsf)
          Sets the DSF flag.
 void setFNGroupCount(short count)
          Sets the number of built-in functions.
 void setShareLabel(boolean shareLabel)
          Deprecated. it is not be used
 void setUsername(java.lang.String username)
          Sets the username for the user who created the report.
 void setUseSelfFlag(short flag)
          Sets whether to turn the flag on or off.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFormatIndex

public short getFormatIndex(java.lang.String formatString,
                            java.lang.String encoding)
Gets the format index that will be set in the Xf .

Parameters:
formatString - the format string
encoding - it is't used and can be null

getXfIndex

public int getXfIndex(Xf xf)
Gets the index of the Xf.

Parameters:
xf - the Xf whose index the user wants to get

getFontIndex

public int getFontIndex(BFont font)
Gets the index of the BFont.

Parameters:
font - the BFont whose index the user wants to get

getColorIndex

public int getColorIndex(int color)
Gets the index of the Color.

Parameters:
color - the RGB value of a Color

addColor

public void addColor(int color)
Adds a color to the palette.

Parameters:
color - the RGB value of a Color

makePalette

public void makePalette()
Adds the palette to the right location of the GlobalWorksheet if user modified the default color in the palette.


setUsername

public void setUsername(java.lang.String username)
Sets the username for the user who created the report.

Parameters:
username - of the user who has logged in

getUsername

public java.lang.String getUsername()
Gets the username for the user who have created the report. In most cases, on natively created M$ Excel sheet this would be the name you typed in when you installed it.

Returns:
username of the user who has logged in

setDsf

public void setDsf(short fdsf)
Sets the DSF flag.

Parameters:
fdsf - (0-off,1-on)

setFNGroupCount

public void setFNGroupCount(short count)
Sets the number of built-in functions.

Parameters:
count - - number of built-in functions

setUseSelfFlag

public void setUseSelfFlag(short flag)
Sets whether to turn the flag on or off.

Parameters:
flag - whether to use natural language formulas or not 1 for true; 0 for false

setDefaultCountry

public void setDefaultCountry(short dcountry)
Sets the default country.

Parameters:
dcountry - ID to set (1 = US)

setCurrentCountry

public void setCurrentCountry(short ccountry)
Sets the current country.

Parameters:
ccountry - ID to set (1 = US)

getString

public java.lang.String getString(int id)
Gets a particular string in shared string table by its index.

Parameters:
id - index to the strings in shared string table
Returns:
the desired string

setShareLabel

public void setShareLabel(boolean shareLabel)
Deprecated. it is not be used

Parameters:
shareLabel -

getShareLabel

public boolean getShareLabel()
Deprecated. it is not be used

Returns:
true share the label