org.apache.poi.hssf.usermodel
Class HSSFPrintSetup

java.lang.Object
  |
  +--org.apache.poi.hssf.usermodel.HSSFPrintSetup

public class HSSFPrintSetup
extends java.lang.Object

Used to modify the print setup. *

* Paper size constants have been added for the ones I have access * to. They follow as:
* public final short LETTER_PAPERSIZE = 1;
* public final short LEGAL_PAPERSIZE = 5;
* public final short EXECUTIVE_PAPERSIZE = 7;
* public final short A4_PAPERSIZE = 9;
* public final short A5_PAPERSIZE = 11;
* public final short ENVELOPE_10_PAPERSIZE = 20;
* public final short ENVELOPE_DL_PAPERSIZE = 27;
* public final short ENVELOPE_CS_PAPERSIZE = 28;
* public final short ENVELOPE_MONARCH_PAPERSIZE = 37;
*

* @author Shawn Laubach (slaubach at apache dot org)


Field Summary
 short A4_PAPERSIZE
           
 short A5_PAPERSIZE
           
 short ENVELOPE_10_PAPERSIZE
           
 short ENVELOPE_CS_PAPERSIZE
           
 short ENVELOPE_DL_PAPERSIZE
           
 short ENVELOPE_MONARCH_PAPERSIZE
           
 short EXECUTIVE_PAPERSIZE
           
 short LEGAL_PAPERSIZE
           
 short LETTER_PAPERSIZE
           
 
Constructor Summary
protected HSSFPrintSetup(PrintSetupRecord printSetupRecord)
          Constructor.
 
Method Summary
 short getCopies()
          Returns the number of copies.
 boolean getDraft()
          Returns the draft mode.
 short getFitHeight()
          Returns the number of pages high to fit the sheet in.
 short getFitWidth()
          Returns the number of pages wide to fit sheet in.
 double getFooterMargin()
          Returns the footer margin.
 double getHeaderMargin()
          Returns the header margin.
 short getHResolution()
          Returns the horizontal resolution.
 boolean getLandscape()
          Returns the landscape mode.
 boolean getLeftToRight()
          Returns the left to right print order.
 boolean getNoColor()
          Returns the black and white setting.
 boolean getNoOrientation()
          Returns the no orientation.
 boolean getNotes()
          Returns the print notes.
 short getOptions()
          Returns the bit flags for the options.
 short getPageStart()
          Returns the page start.
 short getPaperSize()
          Returns the paper size.
 short getScale()
          Returns the scale.
 boolean getUsePage()
          Returns the use page numbers.
 boolean getValidSettings()
          Returns the valid settings.
 short getVResolution()
          Returns the vertical resolution.
 void setCopies(short copies)
          Sets the number of copies.
 void setDraft(boolean d)
          Set whether it is in draft mode * @param d draft
 void setFitHeight(short height)
          Set the number of pages high to fit the sheet in * @param height the number of pages
 void setFitWidth(short width)
          Set the number of pages wide to fit the sheet in * @param width the number of pages
 void setFooterMargin(double footermargin)
          Sets the footer margin.
 void setHeaderMargin(double headermargin)
          Sets the header margin.
 void setHResolution(short resolution)
          Sets the horizontal resolution.
 void setLandscape(boolean ls)
          Set whether to print in landscape * @param ls landscape
 void setLeftToRight(boolean ltor)
          Set whether to go left to right or top down in ordering * @param ltor left to right
 void setNoColor(boolean mono)
          Set whether it is black and white * @param mono Black and white
 void setNoOrientation(boolean orientation)
          Set no orientation.
 void setNotes(boolean printnotes)
          Print the include notes * @param printnotes print the notes
 void setOptions(short options)
          Sets the options flags.
 void setPageStart(short start)
          Set the page numbering start.
 void setPaperSize(short size)
          Set the paper size.
 void setScale(short scale)
          Set the scale.
 void setUsePage(boolean page)
          Set whether to use page start * @param page Use page start
 void setValidSettings(boolean valid)
          Valid settings.
 void setVResolution(short resolution)
          Sets the vertical resolution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LETTER_PAPERSIZE

public final short LETTER_PAPERSIZE
See Also:
Constant Field Values

LEGAL_PAPERSIZE

public final short LEGAL_PAPERSIZE
See Also:
Constant Field Values

EXECUTIVE_PAPERSIZE

public final short EXECUTIVE_PAPERSIZE
See Also:
Constant Field Values

A4_PAPERSIZE

public final short A4_PAPERSIZE
See Also:
Constant Field Values

A5_PAPERSIZE

public final short A5_PAPERSIZE
See Also:
Constant Field Values

ENVELOPE_10_PAPERSIZE

public final short ENVELOPE_10_PAPERSIZE
See Also:
Constant Field Values

ENVELOPE_DL_PAPERSIZE

public final short ENVELOPE_DL_PAPERSIZE
See Also:
Constant Field Values

ENVELOPE_CS_PAPERSIZE

public final short ENVELOPE_CS_PAPERSIZE
See Also:
Constant Field Values

ENVELOPE_MONARCH_PAPERSIZE

public final short ENVELOPE_MONARCH_PAPERSIZE
See Also:
Constant Field Values
Constructor Detail

HSSFPrintSetup

protected HSSFPrintSetup(PrintSetupRecord printSetupRecord)
Constructor. Takes the low level print setup record. * @param printSetupRecord the low level print setup record

Method Detail

setPaperSize

public void setPaperSize(short size)
Set the paper size. * @param size the paper size.


setScale

public void setScale(short scale)
Set the scale. * @param scale the scale to use


setPageStart

public void setPageStart(short start)
Set the page numbering start. * @param start the page numbering start


setFitWidth

public void setFitWidth(short width)
Set the number of pages wide to fit the sheet in * @param width the number of pages


setFitHeight

public void setFitHeight(short height)
Set the number of pages high to fit the sheet in * @param height the number of pages


setOptions

public void setOptions(short options)
Sets the options flags. Not advisable to do it directly. * @param options The bit flags for the options


setLeftToRight

public void setLeftToRight(boolean ltor)
Set whether to go left to right or top down in ordering * @param ltor left to right


setLandscape

public void setLandscape(boolean ls)
Set whether to print in landscape * @param ls landscape


setValidSettings

public void setValidSettings(boolean valid)
Valid settings. I'm not for sure. * @param valid Valid


setNoColor

public void setNoColor(boolean mono)
Set whether it is black and white * @param mono Black and white


setDraft

public void setDraft(boolean d)
Set whether it is in draft mode * @param d draft


setNotes

public void setNotes(boolean printnotes)
Print the include notes * @param printnotes print the notes


setNoOrientation

public void setNoOrientation(boolean orientation)
Set no orientation. ? * @param orientation Orientation.


setUsePage

public void setUsePage(boolean page)
Set whether to use page start * @param page Use page start


setHResolution

public void setHResolution(short resolution)
Sets the horizontal resolution. * @param resolution horizontal resolution


setVResolution

public void setVResolution(short resolution)
Sets the vertical resolution. * @param resolution vertical resolution


setHeaderMargin

public void setHeaderMargin(double headermargin)
Sets the header margin. * @param headermargin header margin


setFooterMargin

public void setFooterMargin(double footermargin)
Sets the footer margin. * @param footermargin footer margin


setCopies

public void setCopies(short copies)
Sets the number of copies. * @param copies number of copies


getPaperSize

public short getPaperSize()
Returns the paper size. * @return paper size


getScale

public short getScale()
Returns the scale. * @return scale


getPageStart

public short getPageStart()
Returns the page start. * @return page start


getFitWidth

public short getFitWidth()
Returns the number of pages wide to fit sheet in. * @return number of pages wide to fit sheet in


getFitHeight

public short getFitHeight()
Returns the number of pages high to fit the sheet in. * @return number of pages high to fit the sheet in


getOptions

public short getOptions()
Returns the bit flags for the options. * @return bit flags for the options


getLeftToRight

public boolean getLeftToRight()
Returns the left to right print order. * @return left to right print order


getLandscape

public boolean getLandscape()
Returns the landscape mode. * @return landscape mode


getValidSettings

public boolean getValidSettings()
Returns the valid settings. * @return valid settings


getNoColor

public boolean getNoColor()
Returns the black and white setting. * @return black and white setting


getDraft

public boolean getDraft()
Returns the draft mode. * @return draft mode


getNotes

public boolean getNotes()
Returns the print notes. * @return print notes


getNoOrientation

public boolean getNoOrientation()
Returns the no orientation. * @return no orientation


getUsePage

public boolean getUsePage()
Returns the use page numbers. * @return use page numbers


getHResolution

public short getHResolution()
Returns the horizontal resolution. * @return horizontal resolution


getVResolution

public short getVResolution()
Returns the vertical resolution. * @return vertical resolution


getHeaderMargin

public double getHeaderMargin()
Returns the header margin. * @return header margin


getFooterMargin

public double getFooterMargin()
Returns the footer margin. * @return footer margin


getCopies

public short getCopies()
Returns the number of copies. * @return number of copies



Copyright © 2003 Apache Software Foundation.