JClass PageLayout

PreviousNextIndex

Appendix  B

JClass PageLayout Commonly Used Methods

JCDrawStyle  JCFlow  JCFlowEvents  JCFlowListener  JCFrame  JCPageTable

JCPageTemplate  JCPrintEvent  JCPrintListener  JCTab  JCTextStyle  JCUnit.Margins

MathMatrix  MathScalar  MathValue  MathVector

This appendix summarizes JClass PageLayout commonly used methods in alphabetical order.

B.1 JCDrawStyle

Method

Description

setDashLength

Controls the length of the dashes and the spaces between them when line type is set to LINE_TYPE_BROKEN.

setForegroundColor

Controls the color of the line.

setLineSpacing

In a multi-line style, such as LINE_TYPE_DOUBLE, controls the amount of space left between the lines.

setLineType

Selects the appearance of the line. Options include:

LINE_TYPE_BROKEN

LINE_TYPE_DOUBLE

LINE_TYPE_SINGLE

setLineWidth

Uses JCUnit.Measure to control the width of the line.

B.2 JCFlow

Method

Description

embedEPS()

Imports the image specified by EPSImage and places it on the current line of text.

embedIcon()

Imports the image specified by javax.swing.icon and places it on the current line of text.

embedImage()

Imports the image specified by java.awt.Image and places it on the current line of text.

floatEPS()

Imports the image specified by EPSImage and places it on its own line.

floatIcon()

Imports the image specified by javax.swing.icon and places it on its own line.

floatImage()

Imports the image specified by java.awt.Image and places it on its own line.

JCFrame.pasteEPS()

Imports the image specified by EPSImage and locks it to a specified location on the page.

JCFrame.pasteIcon()

Imports the image specified by javax.swing.icon and locks it to a specified location on the page.

JCFrame.pasteImage()

Imports the image specified by java.awt.Image and locks it to a specified location on the page.

newColumn()

Advances the text flow to the top of the next column, in the next frame if necessary.

newFrame()

Advances the text flow to the next frame, generating a new page if necessary.

newLine()

Ends the current line and begins a new line.

newPage()

Creates a new page based on the current page's FlowPageTemplate, and directs the flow to the first frame of the new page's FlowFrameList.

newParagraph()

Begins a new paragraph.

newSection()

Creates a new section based on the current section's FlowSectionTemplate, and directs the flow to the first frame of the new page's FlowFrameList.

print()

Renders the specified content to the flow.

B.3 JCFlowEvents

Method

Description

getCurrentPageArea()

The current PageArea on which the event occurred.

getNextElementName()

The name of the next PageArea to be processed.

getNextPageArea()

The next page relative to where the event occurred.

getSource()

The source of the event, the current JCFlow where the event occurred.

B.4 JCFlowListener

Method

Description

frameBegin()

Invoked before the flow to a frame begins.

frameComplete()

Invoked when the flow to a frame is complete, that is, when all macros in the frame have been evaluated.

frameEnd()

Invoked when the flow is transferred to another frame.

pageBegin()

Invoked before the flow to a page begins.

pageComplete()

Invoked when the flow to a page is complete, that is, when all macros on this page have been evaluated.

pageEnd()

Invoked when the flow is transferred to another page.

B.5 JCFrame

Method

Description

newColumn()

Generates a column break and advances the text to the next column in the specified frame. Throws an EndOfFrameException in the last (only) column of a frame.

newLine()

Ends the current line and transfers the flow to a new line. Throws an EndOfFrameException if there is not enough room to print the text.

print()

Renders the specified content to this frame. Throws an EndOfFrameException if there is not enough room to print the text.

B.6 JCPageTable

Method

Description

setAllBorders()

Applies the style to every border in the table.

setBottomBorder()

Applies the style to the bottom border of the table's last row.

setColumnBorder()

Applies the style to all column borders, except for the perimeter borders Left and Right.

setEdgeBorders()

Applies the style to all borders on the perimeter of the table (Top, Bottom, Left, and Right).

setHeaderBorder()

Applies the style to the border between the header table and the table's first row.

setHorizontalBorder()

Applies the style to the Top, Bottom, and header borders.

setInternalBorders()

Applies the style to all row and column borders except for the perimeter borders.

setLeftBorder()

Applies the style to the border on the table's left-hand side.

setRightBorder()

Applies the style to the border on the table's right-hand side.

setRowBorder()

Applies the style to all table row borders except for the header border and the perimeter borders Top and Bottom.

setTopBorder()

Applies the style to the top border of the table's first row. If there is a header table, applies the style to the top row of the header.

setVerticalBorders()

Applies the style to column, Left, and Right borders.

B.7 JCPageTemplate

Method

Description

importTemplates(JCDocument
doc, File xmlfile)

Reads from java.io.File to import an XML template and apply it to the specified JCDocument.

importTemplates(JCDocument
doc, InputSource input)

Reads from org.xml.sax.InputSource to import an XML template and apply it to the specified JCDocument.

importTemplates(JCDocument
doc, Reader reader)

Reads from java.io.Reader to import an XML template and apply it to the specified JCDocument.

loadTemplates(File xmlfile)

Reads from java.io.File to load the XML template without applying it to a specific document.

loadTemplates(InputSource
input)

Reads from org.xml.sax.InputSource to load the XML template without applying it to a specific document.

loadTemplates(Reader reader)

Reads from java.io.Reader to load the XML template without applying it to a specific document.

B.8 JCPrintEvent

Method

Description

getEventId()

Returns the eventId. The returned value is one of JCPrintEvent.BEGIN_PAGE, JCPrintEvent.END_PAGE, JCPrintEvent.OPEN_DOCUMENT, or JCPrintEvent.CLOSE_DOCUMENT,

getPageNumber()

Returns the page number or -1 if not applicable.

B.9 JCPrintListener

Method

Description

beginPage()

Invoked before a page has been printed.

closeDocument()

Invoked after a document has been printed.

endPage()

Invoked after a page has printed.

openDocument()

Invoked before a document has been printed.

B.10 JCTab

Method

Description

addTab()

Adds a tab to the style in the location specified.

setTabs()

Adds a list of identically aligned tabs to the style.

B.11 JCTextStyle

Method

Description

setLeftIndent()

Defines the amount of space between the left side of the frame and the left edge of every line in the paragraph except for the first line.

setParagraphIndent()

Defines the amount of space between the left side of the frame and the left edge of the first line in the paragraph.

setRightIndent()

Defines the amount of space between the right side of the frame and the right edge of the paragraph.

B.12 JCUnit.Margins

Method

Description

setBottom()

Sets the bottom margin to the width of the given JCUnit.Measure.

setLeft()

Sets the left margin to the width of the given JCUnit.Measure.

setRight()

Sets the right margin to the width of the given JCUnit.Measure.

setTop()

Sets the top margin to the width of the given JCUnit.Measure.

B.13 MathMatrix

Method

Description

getValueAt()

Retrieves the value at a particular row, column pair of index values in the matrix.

matrixValue()

Gets the contents of this MathValue as an array of Numbers.

numberValue()

Throws an UnsupportedOperationException.

setValueAt()

Sets the value at a particular row, column pair of index values in the matrix.

toString()

Outputs the value of this vector as a String.

vectorValue()

Throws an UnsupportedOperationException.

B.14 MathScalar

Method

Description

matrixValue()

Throws an UnsupportedOperationException.

numberValue()

Gets the contents of this MathValue as a Number.

toString()

Returns a String representation of this value.

vectorValue()

Throws an UnsupportedOperationException.

B.15 MathValue

Method

Description

evaluate()

Satisfies the Expression interface by returning the stored value. No evaluation is required because no operation is implied.

getDataFormat()

Retrieves the NumberFormat associated with this data.

matrixValue()

Gets the contents of this MathValue as a matrix of Numbers.

numberValue()

Gets the contents of this MathValue as a Number.

setDataFormat()

Sets a NumberFormat to use on the contents of this MathValue.

vectorValue()

Gets the contents of this MathValue as a vector of Numbers.

B.16 MathVector

Method

Description

getValueAt()

Retrieves the value at a particular index in the vector.

matrixValue()

Throws an UnsupportedOperationException.

numberValue()

Throws an UnsupportedOperationException.

setValueAt()

Sets the value at a particular index in the vector.

toString()

Outputs the value of this vector as a String.

vectorValue()

Gets the contents of this MathValue as a vector of Numbers.


PreviousNextIndex