jxl
Class SheetSettings

java.lang.Object
  extended byjxl.SheetSettings

public final class SheetSettings
extends java.lang.Object

This is a bean which client applications may use to get/set various properties which are associated with a particular worksheet, such as headers and footers, page orientation etc.


Constructor Summary
SheetSettings()
          Default constructor
SheetSettings(SheetSettings copy)
          Copy constructor.
 
Method Summary
 double getBottomMargin()
          Accessor for the bottom margin
 int getDefaultColumnWidth()
          Accessor for the default column width
 double getDefaultHeightMargin()
          Gets the default margin height
 int getDefaultRowHeight()
          Accessor for the default row height
 double getDefaultWidthMargin()
          Gets the default margin width
 boolean getDisplayZeroValues()
          Accessor for the displayZeroValues property
 int getFitHeight()
          Accessor for the fit height
 boolean getFitToPages()
          Accessor for the fit width print flag
 int getFitWidth()
          Accessor for the fit width
 double getFooterMargin()
          Accessor for the footer margin
 double getHeaderMargin()
          Accessor for the header margin
 int getHorizontalFreeze()
          Gets the row at which the pane is frozen horizontally
 int getHorizontalPrintResolution()
          Accessor for the horizontal print resolution
 double getLeftMargin()
          Accessor for the left margin
 PageOrientation getOrientation()
          Accessor for the orientation
 int getPageStart()
          Accessor for the page start
 PaperSize getPaperSize()
          Accessor for the paper size
 java.lang.String getPassword()
          Accessor for the password
 int getPasswordHash()
          Accessor for the password hash - used only when copying sheets
 double getRightMargin()
          Accessor for the right margin
 int getScaleFactor()
          Accessor for the scale factor
 boolean getShowGridLines()
          Accessor for the showGridLines property
 double getTopMargin()
          Accessor for the top margin
 int getVerticalFreeze()
          Gets the column at which the pane is frozen vertically
 int getVerticalPrintResolution()
          Accessor for the vertical print resolution
 int getZoomFactor()
          Accessor for the zoom factor.
 boolean isHidden()
          Accessor for the hidden nature of this sheet
 boolean isProtected()
          Queries whether this sheet is protected (ie.
 boolean isSelected()
          Accessor for the selected nature of the sheet
 void setBottomMargin(double m)
          Sets the bottom margin
 void setDefaultColumnWidth(int w)
          Sets the default column width
 void setDefaultRowHeight(int h)
          Sets the default row height
 void setDisplayZeroValues(boolean b)
          Sets the displayZeroValues property
 void setFitHeight(int fh)
          Sets the number of pages vertically that this sheet will be printed into
 void setFitToPages(boolean b)
          Accessor for the fit to pages flag
 void setFitWidth(int fw)
          Sets the number of pages widthwise which this sheet should be printed into
 void setFooterMargin(double d)
          Sets the margin for any page footer
 void setHeaderMargin(double d)
          Sets the margin for any page headers
 void setHidden(boolean h)
          Sets the hidden status of this worksheet
 void setHorizontalFreeze(int row)
          Sets the row at which the pane is frozen horizontally
 void setHorizontalPrintResolution(int hpw)
          Sets the horizontal print resolution
 void setLeftMargin(double m)
          Sets the left margin
 void setOrientation(PageOrientation po)
          Sets the paper orientation for printing this sheet
 void setPageStart(int ps)
          Sets the page number at which to commence printing
 void setPaperSize(PaperSize ps)
          Sets the paper size to be used when printing this sheet
 void setPassword(java.lang.String s)
          Sets the password for this sheet
 void setPasswordHash(int ph)
          Accessor for the password hash - used only when copying sheets
 void setProtected(boolean p)
          Sets the protected (ie.
 void setRightMargin(double m)
          Sets the right margin
 void setScaleFactor(int sf)
          Sets the scale factor for this sheet to be used when printing.
 void setSelected()
          Sets this sheet to be when it is opened in excel
 void setShowGridLines(boolean b)
          Sets the showGridLines property
 void setTopMargin(double m)
          Sets the top margin
 void setVerticalFreeze(int col)
          Sets the row at which the pane is frozen vertically
 void setVerticalPrintResolution(int vpw)
          Sets the vertical print reslution
 void setZoomFactor(int zf)
          Sets the zoom factor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SheetSettings

public SheetSettings()
Default constructor


SheetSettings

public SheetSettings(SheetSettings copy)
Copy constructor. Called when copying sheets

Parameters:
copy -
Method Detail

getBottomMargin

public double getBottomMargin()
Accessor for the bottom margin

Returns:
the bottom margin in inches

getDefaultColumnWidth

public int getDefaultColumnWidth()
Accessor for the default column width

Returns:
the default column width, in characters

getDefaultHeightMargin

public double getDefaultHeightMargin()
Gets the default margin height

Returns:
the default margin height

getDefaultRowHeight

public int getDefaultRowHeight()
Accessor for the default row height

Returns:
the default row height, in 1/20ths of a point

getDefaultWidthMargin

public double getDefaultWidthMargin()
Gets the default margin width

Returns:
the default margin width

getDisplayZeroValues

public boolean getDisplayZeroValues()
Accessor for the displayZeroValues property

Returns:
TRUE to display zero values, FALSE not to bother

getFitHeight

public int getFitHeight()
Accessor for the fit height

Returns:
the number of pages this sheet will be printed into heightwise

getFitToPages

public boolean getFitToPages()
Accessor for the fit width print flag

Returns:
TRUE if the print is to fit to pages, false otherwise

getFitWidth

public int getFitWidth()
Accessor for the fit width

Returns:
the number of pages this sheet will be printed into widthwise

getFooterMargin

public double getFooterMargin()
Accessor for the footer margin

Returns:
the footer margin

getHeaderMargin

public double getHeaderMargin()
Accessor for the header margin

Returns:
the header margin

getHorizontalFreeze

public int getHorizontalFreeze()
Gets the row at which the pane is frozen horizontally

Returns:
the row at which the pane is horizontally frozen, or 0 if there is no freeze

getHorizontalPrintResolution

public int getHorizontalPrintResolution()
Accessor for the horizontal print resolution

Returns:
the horizontal print resolution

getLeftMargin

public double getLeftMargin()
Accessor for the left margin

Returns:
the left margin in inches

getOrientation

public PageOrientation getOrientation()
Accessor for the orientation

Returns:
the orientation

getPageStart

public int getPageStart()
Accessor for the page start

Returns:
the page start

getPaperSize

public PaperSize getPaperSize()
Accessor for the paper size

Returns:
the paper size

getPassword

public java.lang.String getPassword()
Accessor for the password

Returns:
the password to unlock this sheet, or NULL if not protected

getPasswordHash

public int getPasswordHash()
Accessor for the password hash - used only when copying sheets

Returns:
passwordHash

getRightMargin

public double getRightMargin()
Accessor for the right margin

Returns:
the right margin in inches

getScaleFactor

public int getScaleFactor()
Accessor for the scale factor

Returns:
the scale factor

getShowGridLines

public boolean getShowGridLines()
Accessor for the showGridLines property

Returns:
TRUE if grid lines will be shown, FALSE otherwise

getTopMargin

public double getTopMargin()
Accessor for the top margin

Returns:
the top margin in inches

getVerticalFreeze

public int getVerticalFreeze()
Gets the column at which the pane is frozen vertically

Returns:
the column at which the pane is vertically frozen, or 0 if there is no freeze

getVerticalPrintResolution

public int getVerticalPrintResolution()
Accessor for the vertical print resolution

Returns:
the vertical print resolution

getZoomFactor

public int getZoomFactor()
Accessor for the zoom factor. Do not confuse zoom factor (which relates to the on screen view) with scale factor (which refers to the scale factor when printing)

Returns:
the zoom factor as a percentage

isHidden

public boolean isHidden()
Accessor for the hidden nature of this sheet

Returns:
TRUE if this sheet is hidden, FALSE otherwise

isProtected

public boolean isProtected()
Queries whether this sheet is protected (ie. read only)

Returns:
TRUE if this sheet is read only, FALSE otherwise

isSelected

public boolean isSelected()
Accessor for the selected nature of the sheet

Returns:
TRUE if this sheet is selected, FALSE otherwise

setBottomMargin

public void setBottomMargin(double m)
Sets the bottom margin

Parameters:
m - the bottom margin in inches

setDefaultColumnWidth

public void setDefaultColumnWidth(int w)
Sets the default column width

Parameters:
w - the new default column width

setDefaultRowHeight

public void setDefaultRowHeight(int h)
Sets the default row height

Parameters:
h - the default row height, in 1/20ths of a point

setDisplayZeroValues

public void setDisplayZeroValues(boolean b)
Sets the displayZeroValues property

Parameters:
b - TRUE to show zero values, FALSE not to bother

setFitHeight

public void setFitHeight(int fh)
Sets the number of pages vertically that this sheet will be printed into

Parameters:
fh - the number of pages this sheet will be printed into heightwise

setFitToPages

public void setFitToPages(boolean b)
Accessor for the fit to pages flag

Parameters:
b - TRUE to fit to pages, FALSE to use a scale factor

setFitWidth

public void setFitWidth(int fw)
Sets the number of pages widthwise which this sheet should be printed into

Parameters:
fw - the number of pages

setFooterMargin

public void setFooterMargin(double d)
Sets the margin for any page footer

Parameters:
d - the footer margin in inches

setHeaderMargin

public void setHeaderMargin(double d)
Sets the margin for any page headers

Parameters:
d - the margin in inches

setHidden

public void setHidden(boolean h)
Sets the hidden status of this worksheet

Parameters:
h - the hidden flag

setHorizontalFreeze

public void setHorizontalFreeze(int row)
Sets the row at which the pane is frozen horizontally

Parameters:
row -

setHorizontalPrintResolution

public void setHorizontalPrintResolution(int hpw)
Sets the horizontal print resolution

Parameters:
hpw -

setLeftMargin

public void setLeftMargin(double m)
Sets the left margin

Parameters:
m - the left margin in inches

setOrientation

public void setOrientation(PageOrientation po)
Sets the paper orientation for printing this sheet

Parameters:
po - the orientation

setPageStart

public void setPageStart(int ps)
Sets the page number at which to commence printing

Parameters:
ps - the page start number

setPaperSize

public void setPaperSize(PaperSize ps)
Sets the paper size to be used when printing this sheet

Parameters:
ps - the paper size

setPassword

public void setPassword(java.lang.String s)
Sets the password for this sheet


setPasswordHash

public void setPasswordHash(int ph)
Accessor for the password hash - used only when copying sheets

Parameters:
ph - the password hash

setProtected

public void setProtected(boolean p)
Sets the protected (ie. read only) status of this sheet

Parameters:
p - the protected status

setRightMargin

public void setRightMargin(double m)
Sets the right margin

Parameters:
m - the right margin in inches

setScaleFactor

public void setScaleFactor(int sf)
Sets the scale factor for this sheet to be used when printing. The parameter is a percentage, therefore setting a scale factor of 100 will print at normal size, 50 half size, 200 double size etc

Parameters:
sf - the scale factor as a percentage

setSelected

public void setSelected()
Sets this sheet to be when it is opened in excel


setShowGridLines

public void setShowGridLines(boolean b)
Sets the showGridLines property

Parameters:
b - TRUE to show grid lines on this sheet, FALSE otherwise

setTopMargin

public void setTopMargin(double m)
Sets the top margin

Parameters:
m - the top margin in inches

setVerticalFreeze

public void setVerticalFreeze(int col)
Sets the row at which the pane is frozen vertically


setVerticalPrintResolution

public void setVerticalPrintResolution(int vpw)
Sets the vertical print reslution

Parameters:
vpw - the vertical print resolution

setZoomFactor

public void setZoomFactor(int zf)
Sets the zoom factor. Do not confuse zoom factor (which relates to the on screen view) with scale factor (which refers to the scale factor when printing)

Parameters:
zf - the zoom factor as a percentage