com.lowagie.text.rtf.document
Class RtfPageSetting

java.lang.Object
  extended by com.lowagie.text.rtf.RtfElement
      extended by com.lowagie.text.rtf.document.RtfPageSetting
All Implemented Interfaces:
RtfBasicElement, RtfExtendedElement

public class RtfPageSetting
extends RtfElement
implements RtfExtendedElement

The RtfPageSetting stores the page size / page margins for a RtfDocument. INTERNAL CLASS - NOT TO BE USED DIRECTLY

Version:
$Version:$
Author:
Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
 
Fields inherited from class com.lowagie.text.rtf.RtfElement
document, inHeader, inTable
 
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
 
Constructor Summary
RtfPageSetting(RtfDocument doc)
          Constructs a new RtfPageSetting object belonging to a RtfDocument.
 
Method Summary
 int getMarginBottom()
          Gets the bottom margin
 int getMarginLeft()
          Gets the left margin
 int getMarginRight()
          Gets the right margin
 int getMarginTop()
          Gets the top margin
 int getPageHeight()
          Gets the page height
 int getPageWidth()
          Gets the page width
 void setMarginBottom(int marginBottom)
          Sets the bottom margin
 void setMarginLeft(int marginLeft)
          Sets the left margin to use
 void setMarginRight(int marginRight)
          Sets the right margin to use
 void setMarginTop(int marginTop)
          Sets the top margin to use
 void setPageHeight(int pageHeight)
          Sets the page height to use
 void setPageSize(Rectangle pageSize)
          Set the page size to use.
 void setPageWidth(int pageWidth)
          Sets the page width to use
 byte[] writeDefinition()
          Writes the page size / page margin definition
 byte[] writeSectionDefinition()
          Writes the definition part for a new section
 
Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.lowagie.text.rtf.RtfBasicElement
setInHeader, setInTable, setRtfDocument, write
 

Constructor Detail

RtfPageSetting

public RtfPageSetting(RtfDocument doc)
Constructs a new RtfPageSetting object belonging to a RtfDocument.

Parameters:
doc - The RtfDocument this RtfPageSetting belongs to
Method Detail

writeDefinition

public byte[] writeDefinition()
Writes the page size / page margin definition

Specified by:
writeDefinition in interface RtfExtendedElement
Returns:
A byte array with the page size / page margin definition

writeSectionDefinition

public byte[] writeSectionDefinition()
Writes the definition part for a new section

Returns:
A byte array containing the definition for a new section

getMarginBottom

public int getMarginBottom()
Gets the bottom margin

Returns:
Returns the bottom margin

setMarginBottom

public void setMarginBottom(int marginBottom)
Sets the bottom margin

Parameters:
marginBottom - The bottom margin to use

getMarginLeft

public int getMarginLeft()
Gets the left margin

Returns:
Returns the left margin

setMarginLeft

public void setMarginLeft(int marginLeft)
Sets the left margin to use

Parameters:
marginLeft - The left margin to use

getMarginRight

public int getMarginRight()
Gets the right margin

Returns:
Returns the right margin

setMarginRight

public void setMarginRight(int marginRight)
Sets the right margin to use

Parameters:
marginRight - The right margin to use

getMarginTop

public int getMarginTop()
Gets the top margin

Returns:
Returns the top margin

setMarginTop

public void setMarginTop(int marginTop)
Sets the top margin to use

Parameters:
marginTop - The top margin to use

getPageHeight

public int getPageHeight()
Gets the page height

Returns:
Returns the page height

setPageHeight

public void setPageHeight(int pageHeight)
Sets the page height to use

Parameters:
pageHeight - The page height to use

getPageWidth

public int getPageWidth()
Gets the page width

Returns:
Returns the page width

setPageWidth

public void setPageWidth(int pageWidth)
Sets the page width to use

Parameters:
pageWidth - The page width to use

setPageSize

public void setPageSize(Rectangle pageSize)
Set the page size to use. This method will use guessFormat to try to guess the correct page format. If no format could be guessed, the sizes from the pageSize are used and the landscape setting is determined by comparing width and height;

Parameters:
pageSize - The pageSize to use


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.