|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Printing interface in Storm. A Pilot that has print capabilities returns an object that implements this interface via Pilot.createPrinter(). If there is no object that implements this interface, null is returned to the caller.
| Method Summary | |
void |
dispose()
Dispose of this printer |
Dimension |
getDimension()
Gets the dimension of the pilots layout in points. |
int |
getPageCount()
Gets the total number of pages for the given StormPageFormat. |
int |
getPageIndex()
Return the current page index. |
StormPageFormat |
getStormPageFormat()
Gets the StormPageFormat representing the page format
properties. |
int |
getZoom()
Deprecated. As of 6.0, replaced by StormPageFormat.getScale() |
boolean |
layoutNextPage()
Deprecated. As of 6.0, replaced by #printPage(Graphics g,int pageIndex |
void |
print(Graphics g)
Print the full Graphics rendering of the pilot view with out
pagination. |
void |
printPage(Graphics g)
Deprecated. |
void |
printPage(Graphics g,
int pageIndex)
Print the page specified by pageNumber to g. |
void |
setPageIndex(int pageIndex)
Set the current page index to pageIndex. |
void |
setPageSize(int width,
int height)
Deprecated. As of 6.0, replaced by StormPageFormat.setPageSize(ice.util.unit.Unit, ice.util.unit.Unit) |
void |
setStormPageFormat(StormPageFormat stormPageFormat)
Sets a new StormPageFormat object with the printer. |
void |
setZoom(int zoom)
Deprecated. As of 6.0, replaced by StormPageFormat.setScale(double) |
| Method Detail |
public void setStormPageFormat(StormPageFormat stormPageFormat)
throws IllegalArgumentException
StormPageFormat object with the printer. Once the
StormPageFormat object has been assigned, the
StormPrinter will recalculate the page layouts and set the
current page index to the first page.
stormPageFormat - the StormPageFormat object to be
assigned to the printer
IllegalArgumentException - a null stormPageFormat instance was passed as a parameterpublic StormPageFormat getStormPageFormat()
StormPageFormat representing the page format
properties.
StormPageFormat objectpublic int getPageCount()
StormPageFormat.
public void printPage(Graphics g,
int pageIndex)
pageNumber to g.
A zero based index of the requested page is specified by pageIndex. If
g - the context into which the page is drawnpageIndex - the zero based index of the page to be drawnpublic void print(Graphics g)
Graphics rendering of the pilot view with out
pagination.
g - Graphics object to print pageIndex topublic Dimension getDimension()
Dimension object represents the actual
width and height of the content laid out by the pilot.public void dispose()
public void printPage(Graphics g)
g.
g - the current page will be printed to the g.public void setPageIndex(int pageIndex)
pageIndex. 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.
pageIndex - the zero based index of the current index pagegetPageIndex()public int getPageIndex()
setPageIndex(int)
public void setPageSize(int width,
int height)
StormPageFormat.setPageSize(ice.util.unit.Unit, ice.util.unit.Unit)
width - width of page measured in pointsheight - height of page measured in pointspublic boolean layoutNextPage()
#printPage(Graphics g,int pageIndex
public void setZoom(int zoom)
StormPageFormat.setScale(double)
zoom - value of new zoom factorgetZoom()public int getZoom()
StormPageFormat.getScale()
setZoom(int)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||