JClass PageLayout

PreviousNextIndex

Appendix  A

JClass PageLayout Design Elements

Page Templates  Controlling Flow   Standard Styles  Alignment  Indents

Tab Alignment  Table Style  Line Style  Cell Alignment

This appendix summarizes JClass PageLayout design elements.

A.1 Page Templates

Default Page Templates

Default Template

Description

Blank_A3

Creates a blank (no headers or footers) page of standard ISO A3 size.

Blank_A4

Creates a blank (no headers or footers) page of standard ISO A4 size.

Blank_A5

Creates a blank (no headers or footers) page of standard ISO A5 size.

Blank_8p5x11

Creates a blank (no headers or footers) page of standard US Letter size.

Blank_8p5x14

Creates a blank (no headers or footers) page of standard US Legal size.

Blank_11x17

Creates a blank (no headers or footers) page of standard Tabloid size.

Template Elements and Attributes

Element

Attributes

Child Elements

<JCPAGETEMPLATE>

TITLE: An optional attribute that names this page template.

<PAGE>

<PAGE>

NAME: Required. The name of this page type, referenced by other page definitions using the <FLOWPAGE> tag.

UNIT: The unit of measurement used to plot out this page. Choose from inches, points, cm, cms, centimetres, and centimeters. The default is inches.

COLOR: Optional. Specifies a default background color for this page using hexadecimal notation or a color from com.klg.jclass.util.swing.JCSwingTypeConverter.

ORIENTATION: Choose from automatic, portrait, and landscape.

FIRST: A Boolean attribute that indicates whether or not this page template is used for the first page in the document. The default is false.

<LOCATION>, <SIZE>, <FRAME>+, <FLOWFRAME>*, <FLOWPAGE>, <FLOWSECTION>

<FRAME>

NAME: Required. The name of this frame type, referenced by other page definitions using the <FLOWFRAME> tag.

UNIT: The unit of measurement used to plot out this frame. Choose from inches, points, cm, cms, centimetres, and centimeters. The default is inches.

COLOR: Optional. Specifies a default background color for this frame using hexadecimal notation or a color from com.klg.jclass.util.swing.JCSwingTypeConverter.

<LOCATION>, <SIZE>, <BORDER>?, <COLUMN>?

<LOCATION>

X: Required. Specifies the distance of the page or frame from the left-hand page edge.

Y: Required. Specifies the distance of the page or frame from the top of the page.

None.

<SIZE>

WIDTH: Required. Specifies the width of the page or frame, measured in the units defined by the <UNIT> tag.

HEIGHT: Required. Specifies the height of the page or frame, measured in the units defined by the <UNIT> tag.

None.

<BORDER>

TYPE: Specifies the style used to draw a frame border. Choose from blank, broken, dashed, double, none, plain, regular, or single. The default is blank.

COLOR: Specifies the border color using either hexadecimal notation or a color from java.awt.Color. The default is black.

THICKNESS: Optional. Specifies the border width in pixels. The default is 0.1.

None.

<COLUMN>

COUNT: Required. Specifies the number of columns in the frame.

SPACING: Optional. Specifies the amount of space left between columns, measured in the units defined by the <UNIT> tag.

None.

<FLOWFRAME>

NAME: Required. Specifies the name of a frame to be added to the sequence of frames to which the document will flow content.

None.

<FLOWPAGE>

NAME: Required. Specifies the name of the page to which the flow is to progress when a new page is begun.

None.

<FLOWSECTION>

NAME: Required. Specifies the name of the page to which the flow is to progress when a new section is begun.

None.

+ Required and repeatable.
* Optional and repeatable.
? Optional and non-repeatable.

A.2 Controlling Flow

Frame Method

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.

Flow Method

JCFlow Method

Description

print()

Renders the specified content to the flow.

newLine()

Ends the current line and begins a new line.

newParagraph()

Begins a new paragraph.

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.

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.

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.

A.3 Standard Styles

Style

Appearance

BOLD

Left-aligned, single-spaced, 10 pt. bold Times New Roman.

BOLD_ITALIC

Left-aligned, single-spaced, 10 pt. bold, italic Times New Roman.

CODE

Left-aligned, single-spaced, 10 pt. plain Courier.

CODE_INDENTED

Left-aligned, single-spaced, 10 pt. plain Courier with left, right, and paragraph indents of 0.25".

DEFAULT_HEADER

Center-aligned, single-spaced, 14 pt. bold Times New Roman.

DEFAULT_TEXT

Left-aligned, single-spaced, 12 pt. plain Times New Roman.

HEADING

Left-aligned, single-spaced, 10 pt. plain Helvetica.

HEADING_BOLD

Left-aligned, single-spaced, 10 pt. bold Helvetica.

HEADING1

Left-aligned, single-spaced, 18 pt. bold Helvetica.

HEADING2

Left-aligned, single-spaced, 18 pt. plain Helvetica.

HEADING3

Left-aligned, single-spaced, 16 pt. bold Helvetica.

HEADING4

Left-aligned, single-spaced, 16 pt. plain Helvetica.

HEADING5

Left-aligned, single-spaced, 14 pt. bold Helvetica.

HEADING6

Left-aligned, single-spaced, 14 pt. plain Helvetica.

HEADING7

Left-aligned, single-spaced, 12 pt. bold Helvetica.

INDENTED

Left-aligned, single-spaced, 10 pt. plain Times New Roman, with left, right, and paragraph indents of 0.25".

ITALIC

Left-aligned, single-spaced, 10 pt. italic Times New Roman.

NORMAL

Left-aligned, single-spaced, 10 pt. plain Times New Roman.

PLAIN

Left-aligned, single-spaced, 10 pt. plain Times New Roman.

A.4 Alignment

Parameter

Result

ALIGNMENT_LEFT

Paragraph text is left aligned.

ALIGNMENT_RIGHT

Paragraph text is right aligned.

ALIGNMENT_CENTER

Paragraph text is center aligned.

ALIGNMENT_JUSTIFY

Paragraph text is left and right aligned.

A.5 Indents

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.

A.6 Tab Alignment

Field

Result

TAB_ALIGNMENT_CENTER

Aligns an equal amount of text on either side of the tab stop.

TAB_ALIGNMENT_LEFT

Aligns the left side (beginning) of the text with the tab stop.

TAB_ALIGNMENT_RIGHT

Aligns the right side (end) of the text with the tab stop.

TAB_ALIGNMENT_DECIMAL

Aligns a decimal or period (.) in the text with the tab stop. Primarily used for aligning columns of numbers.

A.7 Table Style

Style Name

Description

Image

Default

  • thin left, right, top, bottom, horizontal, and column borders
  • no column shading
  • regular heading font
  • Style0

  • no left, right, top, bottom, horizontal, or column borders
  • no column shading
  • regular heading font
  • Style 1

  • thin header border; no other borders
  • no column shading
  • regular heading font
  • Style 2

  • thin header border; thick top and bottom borders; no other borders
  • no column shading
  • regular heading font
  • Style 3

  • thick top, bottom, and header borders; thin horizontal borders; no column border
  • no column shading
  • regular heading font
  • Style 4

  • no left, right, top, bottom, horizontal, or column borders
  • header colored (black); reverse type for header text
  • no column shading
  • Style 5

  • thick right, left, top, bottom, and header borders; no column or horizontal borders
  • header colored (black); reverse type for header text
  • no column shading
  • Style 6

  • thick right, left, top, bottom and header borders; thin horizontal and column borders
  • header colored (black); reverse type for header text
  • no column shading
  • Style 7

  • thick right, left, top, bottom and header borders; no horizontal or column borders
  • header colored (gray); reverse type for header text
  • no column shading
  • Style 8

  • thick right, left, top, bottom, and header borders; thin horizontal and column borders
  • header colored (gray); reverse type for header text
  • no column shading
  • Style 9

  • thin header border; thick top, and bottom borders; no right, left, horizontal, and column borders
  • header colored (gray); reverse type for header text
  • no column shading
  • Style 10

  • thick right, left, top, and bottom borders; no header, horizontal, and column borders
  • regular heading font
  • no column shading
  • Style 11

  • no right, left, top, and bottom borders; thin header, horizontal, and column borders
  • plain headers
  • no column shading
  • Style 12

  • thick right, left, top, bottom, and header borders; no horizontal or column borders
  • header colored (gray); reverse type for header text
  • gray column shading
  • Style 13

  • thick right, left, top, bottom, and header borders; thin horizontal border; no column borders
  • header colored (black); reverse type for header text
  • no column shading
  • Style 14

  • thin right, left, top, bottom, and horizontal borders; thick header border; no column border
  • plain header
  • no column shading
  • Style 15

  • thin right, left, top, bottom, header, and column borders; no horizontal border
  • plain header
  • no column shading
  • Style 16

  • thin left and horizontal borders; thick top border; no bottom, right, and header borders; thin border between last two columns
  • header colored (dark gray); reverse type for header text
  • no column shading
  • alternate row shading (light gray and dark gray)
  • Style 17

  • thin left and horizontal borders; thick top border; no bottom, right and header borders; thin border between last two columns
  • header reverse type
  • alternate row shading (light gray and dark gray)
  • A.8 Line Style

    LINE_TYPE_BROKEN

    Applies a dotted line to the table border.

    LINE_TYPE_DOUBLE

    Applies a double line to the table border.

    LINE_TYPE_NONE

    Blanks out the table border.

    LINE_TYPE_SINGLE

    Applies a single line to the table border.

    A.9 Cell Alignment

    CELL_ALIGNMENT_CENTER

    Aligns cell text to the middle of the row.

    CELL_ALIGNMENT_TOP

    Aligns cell text to the top of the row.

    CELL_ALIGNMENT_BOTTOM

    Aligns cell text to the bottom of the row.

    CELL_ALIGNMENT_NONE

    No specific cell alignment.


    PreviousNextIndex