|
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.JCFlow
JCFlow controls the flow of rendered content from frame to frame, page to page, and section to section.
Field Summary | |
protected com.klg.jclass.page.JCDrawStyle |
currentDrawStyle
The style applied to graphics being rendered. |
protected com.klg.jclass.page.JCFrame |
currentFrame
The active frame on the page currently receiving the contents of the flow. |
protected com.klg.jclass.page.JCPage |
currentPage
The page currently receiving the contents of the flow. |
protected int |
currentPageNumber
User-controllable page numbering (not absolute number). |
protected int |
currentSectionNumber
The number of the current section in the document. |
protected com.klg.jclass.page.JCTextStyle |
currentTextStyle
The style applied to text being rendered. |
protected int |
deferredPageCount
Count of user-added, non-flow pages that are waiting to be added into the full page count. |
protected com.klg.jclass.page.JCDocument |
document
The document to which this flow belongs. |
protected int |
documentPageCount
The number of pages in the document (running count). |
protected int |
documentTotalPages
The total number of pages in the document (final count). |
protected Vector |
floatList
The list of large objects which are to be floated into the flow. |
static int |
FLOW_ACTIVE
|
static int |
FLOW_COMPLETE
|
static int |
FLOW_INIT
|
protected List |
flowFrameList
An iterator over the list of flow frames on the current page. |
protected com.klg.jclass.util.JCListenerList |
flowListeners
The listeners for flow events. |
protected int |
flowStatus
Indicates if flow has ended. |
protected int |
nextFrameIndex
The index in the flow frame list of the next frame. |
protected boolean |
sectionComplete
Indicates if current section has ended. |
protected int |
sectionPageCount
The number of pages in the current section (running count). |
protected int |
sectionTotalPages
The total number of pages in the current section (final count). |
protected int |
startingPageNumber
The number of the first page in the document -- used to start counting at numbers other than one. |
Constructor Summary | |
JCFlow(com.klg.jclass.page.JCDocument doc)
Creates a flow for the given document. |
|
JCFlow(com.klg.jclass.page.JCDocument doc,
com.klg.jclass.page.JCFlowListener fl)
Creates a flow for the given document. |
|
JCFlow(com.klg.jclass.page.JCDocument doc,
com.klg.jclass.page.JCFlowListener fl,
List templates)
Creates a flow for the document using the given page templates and registers the given FlowListener for JCFlow events. |
|
JCFlow(com.klg.jclass.page.JCDocument doc,
List templates)
Creates a flow for the document using the given page templates. |
Method Summary | |
void |
addFlowListener(com.klg.jclass.page.JCFlowListener listener)
Adds a listener for flow events. |
protected void |
deferCountingNewPage(com.klg.jclass.page.JCPage newPage)
Tracks the number of pages added but not yet part of the page count. |
void |
embedComponent(Component c)
Adds a component's drawn image to the document as part of the current line. |
void |
embedComponent(Component c,
int alignment)
Adds a component's drawn image to the document as part of the current line. |
void |
embedComponent(Component c,
int alignment,
JCUnit.Dimension size)
Adds a component's drawn image to the document as part of the current line. |
void |
embedComponent(Component c,
JCUnit.Dimension size)
Adds a component's drawn image to the document as part of the current line. |
void |
embedEPS(com.klg.jclass.page.EPSImage eps)
Adds an Encapsulated PostScript image to the document as part of the current line. |
void |
embedEPS(com.klg.jclass.page.EPSImage eps,
int alignment)
Adds an Encapsulated PostScript image to the document as part of the current line. |
void |
embedEPS(com.klg.jclass.page.EPSImage eps,
int alignment,
JCUnit.Dimension size)
Adds an Encapsulated PostScript image to the document as part of the current line. |
void |
embedEPS(com.klg.jclass.page.EPSImage eps,
JCUnit.Dimension size)
Adds an Encapsulated PostScript image to the document as part of the current line. |
void |
embedIcon(Icon icon)
Adds an icon to the document as part of the current line. |
void |
embedIcon(Icon icon,
int alignment)
Adds an icon to the document as part of the current line. |
void |
embedIcon(Icon icon,
int alignment,
JCUnit.Dimension size)
Adds an icon to the document as part of the current line. |
void |
embedIcon(Icon icon,
JCUnit.Dimension size)
Adds an icon to the document as part of the current line. |
void |
embedImage(Image image)
Adds an image to the document as part of the current line. |
void |
embedImage(Image image,
int alignment)
Adds an image to the document as part of the current line. |
void |
embedImage(Image image,
int alignment,
JCUnit.Dimension size)
Adds an image to the document as part of the current line. |
void |
embedImage(Image image,
JCUnit.Dimension size)
Adds an image to the document as part of the current line. |
void |
endFlow()
Completes the document so it can be printed. |
protected void |
fireFrameCompleted(com.klg.jclass.page.JCFrame frame)
Convenience method to fire the FRAME_COMPLETE event . |
void |
floatComponent(Component c)
Adds a component's drawn image to the document so it is added in the next space it fits (subject to the existence of other floating objects that may precede this). |
void |
floatComponent(Component c,
int alignment)
Adds a component's drawn image to the document so it is added in the next space it fits (subject to the existence of other floating objects that may precede this). |
void |
floatComponent(Component c,
int alignment,
JCUnit.Dimension size)
Adds a component's drawn image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatComponent(Component c,
JCUnit.Dimension size)
Adds a component's drawn image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatEPS(com.klg.jclass.page.EPSImage eps)
Adds an Encapsulated PostScript (EPS) image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatEPS(com.klg.jclass.page.EPSImage eps,
int alignment)
Adds an Encapsulated PostScript (EPS) image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatEPS(com.klg.jclass.page.EPSImage eps,
int alignment,
JCUnit.Dimension size)
Adds an Encapsulated PostScript (EPS) image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatEPS(com.klg.jclass.page.EPSImage eps,
JCUnit.Dimension size)
Adds an Encapsulated PostScript (EPS) image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatIcon(Icon icon)
Adds an icon to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatIcon(Icon icon,
int alignment)
Adds an icon to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatIcon(Icon icon,
int alignment,
JCUnit.Dimension size)
Adds an icon to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatIcon(Icon icon,
JCUnit.Dimension size)
Adds an icon to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatImage(Image image)
Adds an image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatImage(Image image,
int alignment)
Adds an image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatImage(Image image,
int alignment,
JCUnit.Dimension size)
Adds an image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
void |
floatImage(Image image,
JCUnit.Dimension size)
Adds an image to the document so it is added in the next space it fits, subject to the existence of other floating objects that may precede it. |
com.klg.jclass.page.JCDrawStyle |
getCurrentDrawStyle()
Gets the draw style being applied to rendered graphics. |
com.klg.jclass.page.JCFrame |
getCurrentFrame()
Gets the frame of the current page receiving data. |
com.klg.jclass.page.JCPage |
getCurrentPage()
Gets the current page receiving printed data. |
int |
getCurrentPageNumber()
Gets the current page number. |
int |
getCurrentSectionNumber()
Gets the current section number. |
com.klg.jclass.page.JCTextStyle |
getCurrentTextStyle()
Gets the text style being applied to rendered text. |
int |
getDocumentTotalPages()
Gets the total number of pages in the document. |
int |
getSectionPageNumber()
Gets the page number of current section. |
int |
getSectionTotalPages()
Gets the total number of pages in the current section. |
List |
getTemplates()
Gets a list of the template pages in the flow. |
void |
hRule(double percent_width)
Draws a horizontal line across the column/frame below the current line. |
void |
hRule(JCUnit.Measure rule_length)
Draws a horizontal line across the column/frame below the current line. |
boolean |
isFlowActive()
Indicates if document flow is active. |
boolean |
isFlowComplete()
Indicates if document flow has ended. |
boolean |
isSectionComplete()
Indicates if current section has ended. |
void |
newColumn()
Advances the text flow to a new column. |
void |
newFrame()
Advances the text flow to a new frame. |
void |
newLine()
Advances the text flow to a new line. |
void |
newPage()
Advances the text flow to a new page. |
void |
newParagraph()
Advances the text flow to a new line, starting a new paragraph. |
void |
newSection()
Advances the text flow to a new Section. |
void |
print(com.klg.jclass.page.JCPageTable table)
Prints a table to the flow (beginning at the insertion point). |
protected void |
print(com.klg.jclass.page.JCPageTable table,
int current_row,
int current_column,
int last_row,
int last_column)
Begins the process of printing the specified sub-table to the flow (beginning at the insertion point). |
protected void |
print(com.klg.jclass.page.JCPageTable table,
int current_row,
int current_column,
int last_row,
int last_column,
boolean newFlow)
Prints the specified sub-table to the flow (beginning at the insertion point). |
void |
print(String text)
Prints a line of text to the flow at the current insertion point. |
void |
print(com.klg.jclass.page.TextMacro macro)
Prints a text macro. |
void |
removeFlowListener(com.klg.jclass.page.JCFlowListener listener)
Removes a listener for flow events. |
void |
setCurrentDrawStyle(com.klg.jclass.page.JCDrawStyle style)
Sets the draw style in which graphical objects are to be rendered. |
void |
setCurrentPageNumber(int number)
Assigns the current, user-defined page number (not the absolute page number). |
void |
setCurrentSectionNumber(int number)
Assigns a number to the current section. |
void |
setCurrentTextStyle(com.klg.jclass.page.JCTextStyle style)
Sets the text style in which text is to be rendered. |
void |
tab()
Moves to the next tab position on the current line. |
protected void |
updatePageNumbers(com.klg.jclass.page.JCPage newPage)
Updates the page numbers being tracked by the flow, including the current page number and the page counts for the section and the document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.klg.jclass.page.JCDocument document
protected com.klg.jclass.page.JCPage currentPage
protected com.klg.jclass.page.JCFrame currentFrame
protected int currentPageNumber
protected int currentSectionNumber
protected int startingPageNumber
protected com.klg.jclass.page.JCTextStyle currentTextStyle
protected com.klg.jclass.page.JCDrawStyle currentDrawStyle
protected List flowFrameList
protected int nextFrameIndex
protected Vector floatList
protected int documentPageCount
protected int sectionPageCount
protected int documentTotalPages
protected int sectionTotalPages
protected com.klg.jclass.util.JCListenerList flowListeners
protected int flowStatus
protected boolean sectionComplete
protected int deferredPageCount
public static final int FLOW_INIT
public static final int FLOW_ACTIVE
public static final int FLOW_COMPLETE
Constructor Detail |
public JCFlow(com.klg.jclass.page.JCDocument doc)
doc
- a document for which to initialize the flowpublic JCFlow(com.klg.jclass.page.JCDocument doc, com.klg.jclass.page.JCFlowListener fl)
doc
- a document for which to initialize the flowfl
- a FlowListener
to notify of flow eventspublic JCFlow(com.klg.jclass.page.JCDocument doc, List templates)
doc
- a document for which to initialize the flowtemplates
- a list of page templates to use in the documentpublic JCFlow(com.klg.jclass.page.JCDocument doc, com.klg.jclass.page.JCFlowListener fl, List templates)
FlowListener
for JCFlow
events.
doc
- a document for which to initialize the flowfl
- a FlowListener
to notify of flow eventstemplates
- a list of page templates to use in the documentJCFlowEvent
,
JCFlowListener
Method Detail |
public boolean isFlowComplete()
true
if flow has endedpublic boolean isFlowActive()
true
if flow has endedpublic boolean isSectionComplete()
true
if flow has endedpublic int getSectionTotalPages()
public int getSectionPageNumber()
public int getDocumentTotalPages()
public int getCurrentPageNumber()
public void setCurrentPageNumber(int number)
number
- the number of the current pagepublic int getCurrentSectionNumber()
public void setCurrentSectionNumber(int number)
number
- the number of the current sectionpublic com.klg.jclass.page.JCPage getCurrentPage()
public com.klg.jclass.page.JCFrame getCurrentFrame()
public com.klg.jclass.page.JCTextStyle getCurrentTextStyle()
public void setCurrentTextStyle(com.klg.jclass.page.JCTextStyle style)
style
- a text style for formatting printed textpublic com.klg.jclass.page.JCDrawStyle getCurrentDrawStyle()
public void setCurrentDrawStyle(com.klg.jclass.page.JCDrawStyle style)
style
- a draw style for formatting printed graphicspublic List getTemplates()
public void print(String text)
text
- String to flow to the documentpublic void print(com.klg.jclass.page.TextMacro macro)
macro
- the macro to add to the flowpublic void print(com.klg.jclass.page.JCPageTable table)
table
- the table to paste into the flowprotected void print(com.klg.jclass.page.JCPageTable table, int current_row, int current_column, int last_row, int last_column)
table
- the table to paste into the flowlast_row
- last_column
- current_row
- current_column
- protected void print(com.klg.jclass.page.JCPageTable table, int current_row, int current_column, int last_row, int last_column, boolean newFlow)
table
- the table to paste into the flownewFlow
- true
if a new flow frame has just begun; false
if in the
current flow framelast_row
- last_column
- current_row
- current_column
- public void tab()
public void floatImage(Image image)
floatImage()
method assumes a default size based on
the pixel size of the image, and takes the horizontal alignment from the
current text style.
image
- the Image to be floated in the documentpublic void floatImage(Image image, int alignment)
floatImage()
method assumes a default size based on
the pixel size of the image.
image
- the Image to be floated in the documentalignment
- the horizontal alignment of the image in the framepublic void floatImage(Image image, JCUnit.Dimension size)
floatImage()
method uses the current text style to
specify the horizontal aligment of the image in the frame
image
- the Image to be floated in the documentsize
- the dimensions of the image as it is to appear on the pagepublic void floatImage(Image image, int alignment, JCUnit.Dimension size)
image
- the Image to be floated in the documentalignment
- the horizontal alignment of the image in the framesize
- the dimensions of the image as it is to appear on the pagepublic void floatIcon(Icon icon)
floatIcon()
method assumes a default size based on
the pixel size of the icon, and takes the horizontal alignment from the
current text style.
ImageIcon
class.
icon
- the Icon to be floated in the documentpublic void floatIcon(Icon icon, int alignment)
floatIcon()
method assumes a default size based on
the pixel size of the icon.
ImageIcon
class.
icon
- the Icon to be floated in the documentalignment
- the horizontal alignment of the icon in the framepublic void floatIcon(Icon icon, JCUnit.Dimension size)
floatIcon()
method uses the current text style to
specify the horizontal aligment of the icon in the frame.
ImageIcon
class.
icon
- the Icon to be floated in the documentsize
- the dimensions of the icon as it is to appear on the pagepublic void floatIcon(Icon icon, int alignment, JCUnit.Dimension size)
ImageIcon
class.
icon
- the Icon to be floated in the documentalignment
- the horizontal alignment of the icon in the framesize
- the dimensions of the icon as it is to appear on the pagepublic void floatComponent(Component c)
floatComponent()
method assumes a default
size based on the pixel size of the component from its current geometry,
and takes the horizontal alignment from the current text style.
c
- the Component to be floated in the documentpublic void floatComponent(Component c, int alignment)
floatComponent()
method assumes a default
size based on the pixel size of the component from its current geometry.
c
- the Component to be floated in the documentalignment
- the horizontal alignment of the component in the framepublic void floatComponent(Component c, JCUnit.Dimension size)
floatComponent()
method takes the
horizontal alignment from the current text style.
c
- the Component to be floated in the documentsize
- the dimensions of the component as it is to appear on the pagepublic void floatComponent(Component c, int alignment, JCUnit.Dimension size)
c
- the Component to be floated in the documentalignment
- the horizontal alignment of the component in the framesize
- the dimensions of the component as it is to appear on the pagepublic void floatEPS(com.klg.jclass.page.EPSImage eps)
floatEPS()
method takes
the horizontal alignment from the current text style and assumes the
EPSImage
object has a size set.
eps
- the EPS image to be floated in the documentpublic void floatEPS(com.klg.jclass.page.EPSImage eps, int alignment)
floatEPS()
method assumes
the EPSImage
object has a size set.
eps
- the EPS image to be floated in the documentalignment
- the horizontal alignment of the image in the framepublic void floatEPS(com.klg.jclass.page.EPSImage eps, JCUnit.Dimension size)
floatEPS()
method takes
the horizontal alignment from the current text style.
eps
- the Image to be floated in the documentsize
- the dimensions of the image as it is to appear on the pagepublic void floatEPS(com.klg.jclass.page.EPSImage eps, int alignment, JCUnit.Dimension size)
eps
- the EPS image to be floated in the documentalignment
- the horizontal alignment of the image in the framesize
- the dimensions of the image as it is to appear on the pagepublic void embedImage(Image image)
embedImage()
method assumes a default size based on the pixel size of the
image, and centers the image vertically on the current line.
image
- the Image to be embedded in the current linepublic void embedImage(Image image, int alignment)
embedImage()
method assumes a default size based on the pixel size of the
image.
image
- the Image to be embedded in the current linealignment
- the vertical alignment of the image on the current linepublic void embedImage(Image image, JCUnit.Dimension size)
embedImage()
method centers the image vertically on the current line.
image
- the Image to be embedded in the current linesize
- the dimensions of the image as it is to appear on the pagepublic void embedImage(Image image, int alignment, JCUnit.Dimension size)
image
- the Image to be embedded in the current linealignment
- the vertical alignment of the image on the current linesize
- the dimensions of the image as it is to appear on the pagepublic void embedIcon(Icon icon)
embedIcon()
method assumes a default size based on the pixel size of the
icon, and centers the icon vertically on the current line.
ImageIcon
class.
icon
- the Icon to be embedded in the current linepublic void embedIcon(Icon icon, int alignment)
embedIcon()
method assumes a default size based on the pixel size of the
icon.
ImageIcon
class.
icon
- the Icon to be embedded in the current linealignment
- the vertical alignment of the icon on the current linepublic void embedIcon(Icon icon, JCUnit.Dimension size)
embedIcon()
method centers the icon vertically on the current line.
ImageIcon
class.
icon
- the Icon to be embedded in the current linesize
- the dimensions of the icon as it is to appear on the pagepublic void embedIcon(Icon icon, int alignment, JCUnit.Dimension size)
ImageIcon
class.
icon
- the Icon to be embedded in the current linealignment
- the vertical alignment of the icon on the current linesize
- the dimensions of the icon as it is to appear on the pagepublic void embedComponent(Component c)
embedComponent()
method assumes a default size
based on the pixel size of the component from its current geometry, and
centers the component vertically on the current line.
c
- the Component to be embedded in the current linepublic void embedComponent(Component c, int alignment)
embedComponent()
method assumes a default size
based on the pixel size of the component from its current geometry.
c
- the Component to be embedded in the current linealignment
- the vertical alignment of the component on the current linepublic void embedComponent(Component c, JCUnit.Dimension size)
embedComponent()
method centers the component
vertically on the current line.
c
- the Component to be embedded in the current linesize
- the dimensions of the component as it is to appear on the pagepublic void embedComponent(Component c, int alignment, JCUnit.Dimension size)
c
- the Component to be embedded in the current linealignment
- the vertical alignment of the component on the current linesize
- the dimensions of the component as it is to appear on the pagepublic void embedEPS(com.klg.jclass.page.EPSImage eps)
embedEPS()
method centers the eps image vertically on the
current line and assumes a size has been provided to the eps image object.
eps
- the EPS image to be embedded in the current linepublic void embedEPS(com.klg.jclass.page.EPSImage eps, int alignment)
embedEPS()
method assumes a size has been provided to the eps
image object.
eps
- the EPS image to be embedded in the current linealignment
- the vertical alignment of the image on the current linepublic void embedEPS(com.klg.jclass.page.EPSImage eps, JCUnit.Dimension size)
embedEPS()
method centers the eps image vertically on the
current line.
eps
- the Image to be embedded in the current linesize
- the dimensions of the image as it is to appear on the pagepublic void embedEPS(com.klg.jclass.page.EPSImage eps, int alignment, JCUnit.Dimension size)
eps
- the EPS image to be embedded in the current linealignment
- the vertical alignment of the image on the current linesize
- the dimensions of the image as it is to appear on the pagepublic void hRule(double percent_width)
percent_width
- the percentage of the width of the column that the line
coverspublic void hRule(JCUnit.Measure rule_length)
rule_length
- the length of the linepublic void newLine()
public void newParagraph()
public void newColumn()
public void newFrame()
public void newPage()
public void newSection()
public void endFlow()
public void addFlowListener(com.klg.jclass.page.JCFlowListener listener)
listener
- JCFlowEvent
,
JCFlowListener
public void removeFlowListener(com.klg.jclass.page.JCFlowListener listener)
listener
- protected void fireFrameCompleted(com.klg.jclass.page.JCFrame frame)
FRAME_COMPLETE event
.
frame
- instance of the frame completedprotected void updatePageNumbers(com.klg.jclass.page.JCPage newPage)
JCDocument.addPage()
so that
all added pages affect the page number counts. It is also called
by JCFlow.endPage()
in the case that any user added pages have
been deferred.
newPage
- the newly created added page (may be null if method is
called from a method that does not create a page but only
wishes to add in deferred pages to the page count)protected void deferCountingNewPage(com.klg.jclass.page.JCPage newPage)
newPage
- the newly created/added page that is to be deferred from page
counting for the moment; if non-null, its page number will
be set with the correct page number
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |