|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Graphics | +--voji.utils.CopyGraphics | +--voji.utils.PageGraphics
This class coveres another Graphics
object
giving printing attributes and a page number to it.
The page number is counted automatically.
Field Summary | |
protected int |
pageNumber
The current page number |
protected java.awt.PrintJob |
printJob
The covered print job |
Constructor Summary | |
PageGraphics(java.awt.PrintJob printJob)
Creates a new PageGraphics instance
covering the given print job |
Method Summary | |
java.awt.Graphics |
create()
Creates a new PageGraphics instance as a copy
of the current object |
int |
getPageNumber()
Returns the current page number |
java.awt.PrintJob |
getPrintJob()
Returns the PrintJob object from which this PrintGraphics object originated |
void |
setGraphics(java.awt.Graphics graphics)
Sets the current sub Graphics object.
|
void |
setPageNumber(int number)
Sets the current page number. |
int |
toPixels(double length)
Returns the number of pixels of the given length |
java.lang.String |
toString()
Returns a String object representing this object's value |
Methods inherited from class voji.utils.CopyGraphics |
addGraphics, addGraphics, clearRect, clipRect, copyArea, dispose, drawArc, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolyline, drawRoundRect, drawString, drawString, fillArc, fillOval, fillPolygon, fillRect, fillRoundRect, finalize, getClip, getClipBounds, getColor, getFont, getFontMetrics, removeGraphics, setClip, setClip, setColor, setFont, setPaintMode, setXORMode, translate |
Methods inherited from class java.awt.Graphics |
create, draw3DRect, drawBytes, drawChars, drawPolygon, drawRect, fill3DRect, fillPolygon, getClipBounds, getClipRect, getFontMetrics, hitClip |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.awt.PrintJob printJob
protected int pageNumber
Constructor Detail |
public PageGraphics(java.awt.PrintJob printJob)
PageGraphics
instance
covering the given print job
printJob
- the PrintJob
to coverMethod Detail |
public java.awt.Graphics create()
PageGraphics
instance as a copy
of the current object
create
in class CopyGraphics
public java.lang.String toString()
String
object representing this object's value
toString
in class CopyGraphics
public java.awt.PrintJob getPrintJob()
getPrintJob
in interface java.awt.PrintGraphics
public int toPixels(double length)
length
- the length using the current page resolutions
length
public int getPageNumber()
public void setPageNumber(int number)
number
- the new page numbersetGraphics(Graphics)
public void setGraphics(java.awt.Graphics graphics)
Graphics
object.
Each direct or indirect call to this function
increases the current page number.
setGraphics
in class CopyGraphics
graphics
- the new sub Graphics
object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |