|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.storm.print.AbstractStormPrinter
Defines common behaviors for pilot printers.
| Field Summary | |
protected int |
currentPageIndex
|
protected int |
numberOfPages
Number of pages that can be printed. |
protected StormPageFormat |
pageFormat
StormPageFormat - store page formating information for print. |
| Constructor Summary | |
AbstractStormPrinter()
Default Constructor: A new StormPageFormat object is associated with the printer with values defined in the StormPageFormat default constructor. |
|
AbstractStormPrinter(StormPageFormat pageFormat)
Default Constructor: A StormPageFormat is passed into the constructor. |
|
| Method Summary | |
abstract void |
dispose()
Dispose of this printer |
abstract Dimension |
getDimension()
Gets the dimension of the pilots layout in points. |
abstract int |
getPageCount()
Instance variable numberOfPages should be maintained by
this mehtod. |
int |
getPageIndex()
Return the current page index. |
StormPageFormat |
getStormPageFormat()
Gets the StormPageFormat representing the page format
properties. |
abstract int |
getZoom()
Gets the zoom factor of the pilots viewport. |
boolean |
layoutNextPage()
Layout the next page. |
abstract void |
print(Graphics g)
Print the full Graphics rendering of the pilot view with out
pagination. |
void |
printPage(Graphics g)
Print the currently laid out page to the Graphics context g. |
abstract void |
printPage(Graphics g,
int pageIndex)
Print the specified pageIndex. |
void |
setPageIndex(int pageIndex)
Set the current page index to pageIndex. |
void |
setPageSize(int width,
int height)
Sets the paper size. |
void |
setStormPageFormat(StormPageFormat stormPageFormat)
The Page layout will only be recalculated if the stormPageFormat differs from the previous value. |
abstract void |
setZoom(int zoom)
Set the zoom factor of the pilots viewport. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected StormPageFormat pageFormat
protected int numberOfPages
protected int currentPageIndex
| Constructor Detail |
public AbstractStormPrinter()
public AbstractStormPrinter(StormPageFormat pageFormat)
| Method Detail |
public void setStormPageFormat(StormPageFormat stormPageFormat)
throws IllegalArgumentException
stormPageFormat differs from the previous value.
setStormPageFormat in interface StormPrinterstormPageFormat - the StormPageFormat object to be
assigned to the printer
IllegalArgumentException - a null stormPageFormat instance was passed as a parameterpublic abstract int getZoom()
StormPrinter
getZoom in interface StormPrinterStormPrinter.setZoom(int)public StormPageFormat getStormPageFormat()
StormPrinterStormPageFormat representing the page format
properties.
getStormPageFormat in interface StormPrinterStormPageFormat objectpublic abstract int getPageCount()
numberOfPages should be maintained by
this mehtod.
getPageCount in interface StormPrinterpublic abstract void dispose()
StormPrinter
dispose in interface StormPrinterpublic void printPage(Graphics g)
StormPrinterg.
printPage in interface StormPrinterg - the current page will be printed to the g.
public abstract void printPage(Graphics g,
int pageIndex)
pageIndex.
printPage in interface StormPrinterg - the context into which the page is drawnpageIndex - the zero based index of the page to be drawnpublic abstract void print(Graphics g)
StormPrinterGraphics rendering of the pilot view with out
pagination.
print in interface StormPrinterg - Graphics object to print pageIndex topublic abstract Dimension getDimension()
StormPrinter
getDimension in interface StormPrinterDimension object represents the actual
width and height of the content laid out by the pilot.public boolean layoutNextPage()
StormPrinter
layoutNextPage in interface StormPrinter
public void setPageSize(int width,
int height)
StormPrinter
setPageSize in interface StormPrinterwidth - width of page measured in pointsheight - height of page measured in pointspublic void setPageIndex(int pageIndex)
StormPrinterpageIndex. If the
pageIndex is less than zero, the index is set to the first
page index. If the pageIndex is greater than
getPageCount() then the last page index is set as the
currentPage.
setPageIndex in interface StormPrinterpageIndex - the zero based index of the current index pageStormPrinter.getPageIndex()public int getPageIndex()
StormPrinter
getPageIndex in interface StormPrinterStormPrinter.setPageIndex(int)public abstract void setZoom(int zoom)
StormPrinter
setZoom in interface StormPrinterzoom - value of new zoom factorStormPrinter.getZoom()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||