|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.page.JCDocument
JCDocument
contains a list of pages which are governed by a flow.
Field Summary | |
static List |
BLANK_11X17
Blank (no headers or footers) 11 x 17 inch page. |
static List |
BLANK_11X8p5
Blank (no headers or footers) 11 x 8.5 inch (landscape) page. |
static List |
BLANK_8p5X11
Blank (no headers or footers) 8.5 x 11 inch page. |
static List |
BLANK_8p5X14
Blank (no headers or footers) 8.5 x 14 inch page. |
static List |
BLANK_A3
Blank (no headers or footers) A3 page. |
static List |
BLANK_A4
Blank (no headers or footers) A4 page. |
static List |
BLANK_A5
Blank (no headers or footers) A5 page. |
protected com.klg.jclass.page.JCFlow |
flow
The flow which governs the addition of content to the document. |
static int |
FLUSH_POLICY_ALWAYS_SAVE
Always saves (does not flush) all pages (default). |
static int |
FLUSH_POLICY_ON_OUTPUT
Flushes pages as they are completed and printed. |
protected int |
flushPolicy
Indicates whether pages are to be discarded once printed. |
protected int |
lastPage
For immediate-mode printing, track the last page we successfully printed. |
protected String |
name
The name of the document. |
static int |
OUTPUT_POLICY_IMMEDIATE
Outputs each page as it is completed (if all predecessors are complete). |
static int |
OUTPUT_POLICY_ON_REQUEST
Holds all completed pages in memory until the document is printed (default). |
protected int |
outputPolicy
Indicates whether pages are to be held for printing. |
protected int |
pageCount
The number of printable pages created. |
protected List |
pageList
The list of printable pages created in the document. |
protected com.klg.jclass.page.JCPrinter |
printer
The printer for which this document is being prepared. |
protected int |
startPage
The page number at which the flow should start counting. |
protected List |
tableList
A list of tables which this document is responsible for. |
protected List |
templatePages
The set of page templates available to copy for document pages. |
Constructor Summary | |
JCDocument(com.klg.jclass.page.JCPrinter printer)
Creates a document tied to a given printer. |
|
JCDocument(com.klg.jclass.page.JCPrinter printer,
List templates)
Creates a document tied to a given printer. |
|
JCDocument(List templates)
Creates a document with the specified templates. |
|
JCDocument(String name)
Creates a named document. |
Method Summary | |
void |
addFontPackage(String packagePath)
Convenience method which adds a package of AFM or TTF fonts to the list of available fonts in the PageLayout FontLibrary . |
void |
addPage(com.klg.jclass.page.JCPage page)
Adds a page to the document's page list and updates the page numbers being tracked by the flow. |
void |
addPage(com.klg.jclass.page.JCPage page,
boolean updateFlowPageNumbers,
boolean isFlowPage)
Adds a page to the document's page list, optionally updating the page numbers being tracked by the flow. |
void |
addTable(com.klg.jclass.page.JCPageTable table)
Adds a table to this document's list of owned tables. |
void |
checkOutputPage(com.klg.jclass.page.JCPage page)
(internal use only) This class handles immediate-mode printing and page flushing for completed pages, if those options are selected. |
void |
dispose()
Cleans up internal objects so JCDocument will not linger. |
com.klg.jclass.page.JCPage |
findFirstTemplate()
Finds the page template that was marked for the first page of the document. |
com.klg.jclass.page.JCFlow |
getFlow()
Gets the flow object which is printing to the document. |
int |
getFlushPolicy()
Gets the document's current policy on flushing completed (printed) pages. |
String |
getName()
Gets the name associated with the document. |
int |
getOutputPolicy()
Gets the document's current policy on outputting completed (rendered) pages. |
int |
getPageCount()
Gets the number of pages currently created within the document. |
List |
getPages()
Gets the List of pages currently created within the document. |
com.klg.jclass.page.JCPrinter |
getPrinter()
Gets the printer for which this document is being prepared. |
Graphics |
getPrinterGraphics()
Gets the printer for which this document is being prepared. |
int |
getStartingPageNumber()
Get the page number at which the flow will start counting. |
List |
getTables()
Gets the list of this document's tables. |
List |
getTemplates()
Gets the name-to-template mapping the document is using. |
void |
print()
Prints the pages of the document to the current printer. |
void |
print(int first,
int last)
Prints a range of pages from the document to the current printer. |
void |
print(com.klg.jclass.page.JCPrinter printer)
Prints the pages of the document. |
void |
print(com.klg.jclass.page.JCPrinter printer,
int first,
int last)
Prints a range of pages from the document. |
void |
setFlow(com.klg.jclass.page.JCFlow flow)
Sets the flow object which is printing to the document. |
void |
setFlushPolicy(int policy)
Sets the document's behavior for flushing printed pages. |
void |
setOutputPolicy(int policy)
Sets the document's behavior for outputting printed pages. |
void |
setPrinter(com.klg.jclass.page.JCPrinter printer)
Sets the printer whose attributes will be used to format the document. |
void |
setStartingPageNumber(int startPage)
Set the page number at which the flow should start counting. |
void |
setTemplates(List templates)
Sets the list of templates. |
com.klg.jclass.page.JCPage |
stringToTemplate(String name)
Returns the named template associated with this document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String name
protected com.klg.jclass.page.JCPrinter printer
protected List templatePages
protected List pageList
protected int pageCount
protected List tableList
protected com.klg.jclass.page.JCFlow flow
protected int flushPolicy
FLUSH_POLICY_ALWAYS_SAVE
(saves all pages).
protected int outputPolicy
OUTPUT_POLICY_ON_REQUEST
(holds all completed pages
in memory until the document is printed).
protected int startPage
protected int lastPage
public static final int FLUSH_POLICY_ALWAYS_SAVE
public static final int FLUSH_POLICY_ON_OUTPUT
public static final int OUTPUT_POLICY_ON_REQUEST
public static final int OUTPUT_POLICY_IMMEDIATE
public static final List BLANK_8p5X11
public static final List BLANK_8p5X14
public static final List BLANK_11X17
public static final List BLANK_A3
public static final List BLANK_A4
public static final List BLANK_A5
public static final List BLANK_11X8p5
Constructor Detail |
public JCDocument(String name)
name
- the name to assign to the documentpublic JCDocument(com.klg.jclass.page.JCPrinter printer)
printer
- the printer to use to format to the documentpublic JCDocument(com.klg.jclass.page.JCPrinter printer, List templates)
printer
- the printer to use to format to the documenttemplates
- list of templates to usepublic JCDocument(List templates)
templates
- a list of templates to be used in the documentMethod Detail |
public String getName()
public com.klg.jclass.page.JCPrinter getPrinter()
public void setPrinter(com.klg.jclass.page.JCPrinter printer)
printer
- a printer object to associate with this documentpublic Graphics getPrinterGraphics()
public List getTemplates()
public void setTemplates(List templates)
templates
- a list of templatespublic void dispose()
JCDocument
will not linger.
Call before setting document instance to null.
public com.klg.jclass.page.JCPage findFirstTemplate()
public void setStartingPageNumber(int startPage)
startPage
- the page number of the first page in the flowpublic int getStartingPageNumber()
public void addPage(com.klg.jclass.page.JCPage page)
page
- a new page to append to the documentpublic void addPage(com.klg.jclass.page.JCPage page, boolean updateFlowPageNumbers, boolean isFlowPage)
page
- a new page to append to the documentupdateFlowPageNumbers
- if true
, the page numbers being tracked
by the flow (for example, the current page
number, the number of pages in a section,
the number of pages in the document)
will include the page being added
with this method; if false
, they will notisFlowPage
- true
if page is part of current flow (added by methods
in JCFlow); false
if page is not part of flow (added by
user call). This information is needed to determine
whether to update page numbers when adding this page:
now, because new page is the next in the flow, or after
the next flow page has been created if this new page
is a non-flow page.public void addFontPackage(String packagePath)
FontLibrary
. All .afm, .ttf,
and .ttc files found in the specified directory and all of its
subdirectories will be added. The specified directory will
be stored for use in reading font files when they become needed.
If a font name map resource bundle property file of name "user"
and corresponding to the default locale exists in the directory
(or its subdirectories), it is also loaded and its contents added
to FontLibrary
's global font name map. (For example, for the
North American/English locale, the directory is first searched
for the file named "user_en_US.properties", then "user_en.properties"
and finally "user.properties". Font name map files outline the names
the user will refer to fonts by the and the names by which they're
referred inside the corresponding .afm or .ttf file.) See the
FontLibrary
class for methods allowing the loading of specific
font files and font name map resources bundles.
packagePath
- a String representing the absolute location of the
directory which contains both font files (.afm
or .ttf) and an optional font name map resource bundle
property file (for example, "user.properties")public int getPageCount()
public List getPages()
public com.klg.jclass.page.JCFlow getFlow()
public void setFlow(com.klg.jclass.page.JCFlow flow)
flow
- a flow object which will render to the documentpublic int getFlushPolicy()
public void setFlushPolicy(int policy)
policy
- the policy to apply to completed (output) pagespublic int getOutputPolicy()
public void setOutputPolicy(int policy)
policy
- the policy to apply to completed (rendered) pagespublic com.klg.jclass.page.JCPage stringToTemplate(String name)
name
- the name of a page template
public List getTables()
public void addTable(com.klg.jclass.page.JCPageTable table)
table
- the table to add to the listpublic void print()
public void print(com.klg.jclass.page.JCPrinter printer)
printer
- the printer to output the document topublic void print(int first, int last)
first
- the start page of the range of pages to printlast
- the end page of the range of pages to printpublic void print(com.klg.jclass.page.JCPrinter printer, int first, int last)
printer
- the printer to output the document tofirst
- the start page of the range of pages to printlast
- the end page of the range of pages to printpublic void checkOutputPage(com.klg.jclass.page.JCPage page)
page
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |