|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.awt.print.PrintJob
The PrintJob class is the principal class that controls
printing. An application calls methods in this class to set up a job,
optionally to invoke a print dialog with the user, and then to print
the pages of the job. A PrintJob is only valid for a single job; it
cannot be reused.
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Constructor Summary | |
PrintJob()
A PrintJob object should be created using the
static method. |
|
| Method Summary | |
PageFormat |
defaultPage()
Creates a new PageFormat instance and
sets it to a default size and orientation. |
abstract PageFormat |
defaultPage(PageFormat page)
Clones the PageFormat argument and alters the
clone to describe a default page size and orientation. |
static PrintJob |
getPrintJob(PrintGraphics g)
Creates and returns a PrintJob. |
static PageFormat |
pageDialog(PageFormat page)
Displays a dialog that allows modification of a PageFormat instance.
|
static PageFormat |
pageDialog(PageFormat page,
Frame parent)
Displays a dialog that allows modification of a PageFormat instance.
|
static PageFormat |
pageDialog(PageFormat page,
Frame parent,
OrderedCollection annotations,
OrderedCollection toolbarAnnotations)
|
static PageFormat |
pageDialog(PageFormat page,
Frame appFrame,
Window parent,
OrderedCollection annotations,
OrderedCollection toolbarAnnotations)
Displays a dialog that allows modification of a PageFormat instance.
|
abstract void |
print()
Calls the PrintableInterface or PageableInterface set to actually print the set of pages |
abstract void |
setPageable(PageableInterface document)
Queries document for the number of pages and
the PageFormat and PrintableInterface for each
page held in the PageableInterface instance,
document. |
abstract void |
setPrintable(PrintableInterface printable)
Sets printable to render the pages. |
abstract void |
setPrintable(PrintableInterface printable,
PageFormat format)
Sets printable to render the pages in the specified
format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.print.Printable |
print |
| Constructor Detail |
public PrintJob()
PrintJob object should be created using the
static getPrintJob method.| Method Detail |
public static PrintJob getPrintJob(PrintGraphics g)
PrintJob.PrintJob.public abstract void setPrintable(PrintableInterface printable)
printable to render the pages. The pages in the
document to be printed by this
PrintJob are rendered by the PrintableInterface
object, printable. The PageFormat for each page
is the default page format.printable - the PrintableInterface that renders each page of
the document.
public abstract void setPrintable(PrintableInterface printable,
PageFormat format)
printable to render the pages in the specified
format. The pages in the document to be printed by
this PrintJob are rendered by the
PrintableInterface object, printable. The
PageFormat of each page is format.printable - the PrintableInterface called to render
each page of the documentformat - the size and orientation of each page to
be printed
public abstract void setPageable(PageableInterface document)
throws NullPointerException
document for the number of pages and
the PageFormat and PrintableInterface for each
page held in the PageableInterface instance,
document.document - the pages to be printed. It can not be
null.NullPointerException - the PageableInterface passed in
was null.PageFormat,
PrintableInterfacepublic static PageFormat pageDialog(PageFormat page)
PageFormat instance.
The page argument is used to initialize controls
in the page setup dialog.
If the user cancels the dialog then this method returns the
original page object unmodified.
If the user okays the dialog then this method returns a new
PageFormat object with the indicated changes.
In either case, the original page object is
not modified.page - the default PageFormat presented to the
user for modificationpage object if the dialog
is cancelled; a new PageFormat object
containing the format indicated by the user if the
dialog is acknowledged.
public abstract void print()
throws PrintException
Book,
PageableInterface,
PrintableInterface
public static PageFormat pageDialog(PageFormat page,
Frame parent)
PageFormat instance.
The page argument is used to initialize controls
in the page setup dialog.
If the user cancels the dialog then this method returns the
original page object unmodified.
If the user okays the dialog then this method returns a new
PageFormat object with the indicated changes.
In either case, the original page object is
not modified.page - the default PageFormat presented to the
user for modificationparent - the parent frame; if non-null, the dialog will be
centered over thispage object if the dialog
is cancelled; a new PageFormat object
containing the format indicated by the user if the
dialog is acknowledged.
public static PageFormat pageDialog(PageFormat page,
Frame parent,
OrderedCollection annotations,
OrderedCollection toolbarAnnotations)
public static PageFormat pageDialog(PageFormat page,
Frame appFrame,
Window parent,
OrderedCollection annotations,
OrderedCollection toolbarAnnotations)
PageFormat instance.
The page argument is used to initialize controls
in the page setup dialog.
If the user cancels the dialog then this method returns the
original page object unmodified.
If the user okays the dialog then this method returns a new
PageFormat object with the indicated changes.
In either case, the original page object is
not modified.page - the default PageFormat presented to the
user for modificationparentFrame - the parent frame; if non-null, the dialog will be
centered over this if no secondary window passed in parent parmparent - the alternate parent window; if null, the parent frame is used for
cursor changes and to center this dialogannotations - an OrderedCollection of AnnotationInterface objects
that define custom annotations for the Page Setup dialogtoolbarAnnotations - an OrderedCollection of Pair objects that define
custom toolbar elements for the Custom Header/Footer dialog invoked by the
Page Setup Dialog; the first item in each Pair specifies the text to
be displayed, and the second item in each Pair specifies an IconInterface
object that is displayed on the toolbarpage object if the dialog
is cancelled; a new PageFormat object
containing the format indicated by the user if the
dialog is acknowledged.OrderedCollection,
IconInterfacepublic abstract PageFormat defaultPage(PageFormat page)
PageFormat argument and alters the
clone to describe a default page size and orientation.page - the PageFormat to be cloned and alteredpage, altered to describe a default
PageFormat.public PageFormat defaultPage()
PageFormat instance and
sets it to a default size and orientation.PageFormat set to a default size and
orientation.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||