JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.page
Class JCFrame

java.lang.Object
  |
  +--com.klg.jclass.page.PageArea
        |
        +--com.klg.jclass.page.JCFrame
All Implemented Interfaces:
Cloneable, com.klg.jclass.page.render.Floatable

public class JCFrame
extends PageArea
implements Cloneable, com.klg.jclass.page.render.Floatable

A JCFrame represents a part of a page (or another JCFrame) into which the page's content is drawn.


Field Summary
protected  com.klg.jclass.page.JCDrawStyle border
          Specifies the border style, thickness, color, etc.
protected  JCUnit.Margins clipMask
          If different from the frame size, the rectangular region to display.
protected  int columnCount
          The number of columns of text which are laid out in the frame.
protected  JCUnit.Measure columnSpace
          The amount of space to allow for a gutter between columns.
protected  JCUnit.Measure columnWidth
          A derived quantity determined by frame width, column count, and separation.
protected static JCUnit.Measure FLEXIBLE_SIZE
          A large value used internatlly to mark a frame as having a flexible size.
protected  int floatAlignment
          Determines the horizontal alignment of this frame as a floating object.
static String FOOTER
          The standard name for a footer frame on a page.
static String HEADER
          The standard name for a header frame on a page.
protected  com.klg.jclass.page.JCFlowInfo info
          Flow information contains current state and pending additions.
protected  JCUnit.Margins margin
          The amount of space to be left for margins on each side of the frame.
protected  com.klg.jclass.page.JCPage page
          Stores the page on which this frame will be printed.
protected  List renderList
          A list of all the graphical objects which are rendered in this frame.
protected  JCUnit.Measure yExtent
          This variable tracks the furthest position drawn to.
 
Fields inherited from class com.klg.jclass.page.PageArea
background, color, document, frameList, layoutStatus, location, name, size
 
Constructor Summary
JCFrame()
          Creates a new zero-sized frame.
JCFrame(com.klg.jclass.page.JCDocument doc)
          Creates a new blank frame.
JCFrame(String name)
          Creates a new named frame.
JCFrame(String name, com.klg.jclass.page.JCDocument doc)
          Creates a new named frame.
JCFrame(String name, com.klg.jclass.page.JCDocument doc, JCUnit.Point location, JCUnit.Dimension size)
          Creates a new frame at a given position.
JCFrame(String name, JCUnit.Point location, JCUnit.Dimension size)
          Creates a new frame at a given position.
 
Method Summary
protected  void addFloat(com.klg.jclass.page.render.ImageRender render)
          Adds a floating object to this frame; pastes it immediately, if possible.
 void addFloats(List floatObjectList)
          Adds a list of objects to the floating objects which are pending.
 void calcLayoutStatus()
          Checks the render objects on the page to determine the layout status.
 Object clone()
          Returns a frame which is a deep copy of this one (copies included frames).
 void complete()
          Completes any pending actions on the frame (for example, current line).
protected  void doLineBreak(com.klg.jclass.page.JCTextStyle style, boolean paragraph)
          Advances to a new line (pasting down the current line).
protected  void doLineBreak(com.klg.jclass.page.JCTextStyle style, boolean paragraph, boolean endOfFrame)
          Advances to a new line (pasting down the current line).
 void draw(Graphics2D gc)
          Draws the frame and its contents.
 void drawCircle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point center, JCUnit.Measure radius)
          Draws a circle given a centre point and radius.
 void drawLine(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point[] points)
          Draws a line given an array of points.
 void drawLine(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint)
          Draws a line between two given points.
 void drawLine(com.klg.jclass.page.JCDrawStyle style, List pointList)
          Draws a line given a list of points.
 void drawPolygon(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point[] points)
          Draws a polygon given an array of points (the sequence of points will automatically be closed).
 void drawPolygon(com.klg.jclass.page.JCDrawStyle style, List pointList)
          Draws a polygon given a list of points (the sequence of points will automatically be closed).
 void drawRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point origin, JCUnit.Dimension size)
          Draws a rectangle given a start point and size.
 void drawRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint)
          Draws a rectangle given a start point and end point.
 void drawRoundedRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point origin, JCUnit.Dimension size, JCUnit.Measure r)
          Draws a rounded-corner rectangle given a start point, size, and corner radius.
 void drawRoundedRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint, JCUnit.Measure r)
          Draws a rounded-corner rectangle given a start point, end point, and arc radius.
 void embedComponent(com.klg.jclass.page.JCTextStyle style, Component c)
          Adds a component's drawn image to the document as part of the current line (the component's image may wrap if there isn't enough horizontal space).
 void embedComponent(com.klg.jclass.page.JCTextStyle style, Component c, int alignment)
          Adds a component's drawn image to the document as part of the current line (the component image may wrap if there isn't enough horizontal space).
 void embedComponent(com.klg.jclass.page.JCTextStyle style, Component c, int alignment, JCUnit.Dimension size)
          Adds a component's drawn image to the document as part of the current line (the component image may wrap if there isn't enough horizontal space).
 void embedComponent(com.klg.jclass.page.JCTextStyle style, Component c, JCUnit.Dimension size)
          Adds a component's drawn image to the document as part of the current line (the component image may wrap if there isn't enough horizontal space).
 void embedEPS(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.EPSImage eps)
          Adds an Encapsulated PostScript image to the document as part of the current line (the eps image may wrap if there isn't enough horizontal space).
 void embedEPS(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.EPSImage eps, int alignment)
          Adds an Encapsulated PostScript image to the document as part of the current line (the eps image may wrap if there isn't enough horizontal space).
 void embedEPS(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.EPSImage eps, int alignment, JCUnit.Dimension size)
          Add an Encapsulated PostScript image to the document as part of the current line (the eps image may wrap if there isn't enough horizontal space).
 void embedEPS(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.EPSImage eps, JCUnit.Dimension size)
          Adds an Encapsulated PostScript image to the document as part of the current line (the eps image may wrap if there isn't enough horizontal space).
 void embedIcon(com.klg.jclass.page.JCTextStyle style, Icon icon)
          Adds an icon to the document as part of the current line (the icon may wrap if there isn't enough horizontal space).
 void embedIcon(com.klg.jclass.page.JCTextStyle style, Icon icon, int alignment)
          Adds an icon to the document as part of the current line (the icon may wrap if there isn't enough horizontal space).
 void embedIcon(com.klg.jclass.page.JCTextStyle style, Icon icon, int alignment, JCUnit.Dimension size)
          Adds an icon to the document as part of the current line (the icon may wrap if there isn't enough horizontal space).
 void embedIcon(com.klg.jclass.page.JCTextStyle style, Icon icon, JCUnit.Dimension size)
          Adds an icon to the document as part of the current line (the icon may wrap if there isn't enough horizontal space).
 void embedImage(com.klg.jclass.page.JCTextStyle style, Image image)
          Adds an image to the document as part of the current line (the image may wrap if there isn't enough horizontal space).
 void embedImage(com.klg.jclass.page.JCTextStyle style, Image image, int alignment)
          Adds an image to the document as part of the current line (the image may wrap if there isn't enough horizontal space).
 void embedImage(com.klg.jclass.page.JCTextStyle style, Image image, int alignment, JCUnit.Dimension size)
          Adds an image to the document as part of the current line (the image may wrap if there isn't enough horizontal space).
 void embedImage(com.klg.jclass.page.JCTextStyle style, Image image, JCUnit.Dimension size)
          Adds an image to the document as part of the current line (the image may wrap if there isn't enough horizontal space).
 void fillCircle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point center, JCUnit.Measure radius)
          Draws a filled circle given a centre point and radius.
 void fillPolygon(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point[] points)
          Draws a filled polygon given an array of points (the sequence of points will automatically be closed).
 void fillPolygon(com.klg.jclass.page.JCDrawStyle style, List pointList)
          Draws a filled polygon given a list of points (the sequence of points will automatically be closed).
 void fillRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point origin, JCUnit.Dimension size)
          Draws a filled rectangle given a start point and size.
 void fillRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint)
          Draws a filled rectangle given a start point and end point.
 void fillRoundedRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point origin, JCUnit.Dimension size, JCUnit.Measure r)
          Draws a filled rounded rectangle given a start point, size, and corner radius.
 void fillRoundedRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint, JCUnit.Measure r)
          Draws a filled rounded rectangle given a start point, end point, and arc radius.
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 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 this).
 int getAlignment()
          Gets the horizontal floating alignment of this frame within its parent frame.
 com.klg.jclass.page.JCDrawStyle getBorder()
          Gets the style which determines how the frame's border is drawn.
 JCUnit.Margins getClipMask()
          Gets the mask which controls the portion of the frame which is drawn.
 int getColumnCount()
          Gets the number of columns of text to display in the frame.
 JCUnit.Measure getColumnSpace()
          Gets the space to leave between columns of text.
 JCUnit.Measure getColumnWidth()
          Gets the width of columns of text in this frame.
 JCUnit.Measure getCurrentAscender()
          Gets the size of the largest ascender among objects flowed to the current line.
 JCUnit.Measure getCurrentBaseline()
          Gets the baseline of the current line as adjusted for the ascender height.
 int getCurrentColumn()
          Gets the column position within the frame.
 JCUnit.Measure getCurrentDescender()
          Gets the largest descender among objects flowed to the current line.
 JCUnit.Measure getFirstLineOffset(com.klg.jclass.page.JCTextStyle style)
          Calculates the extra top offset required for the first line of a frame.
 com.klg.jclass.page.JCFlowInfo getFlowInfo()
          Returns the flow structure, which controls the flow in this frame.
 com.klg.jclass.page.JCFlowInfo getInfo()
          Deprecated. this method is superceded by getFlowInfo()
 JCUnit.Point getInsertionPoint()
          Returns the point in the frame at which text is being flowed.
 JCUnit.Margins getMargins()
          Gets the margin spacing defined for the perimeter of the frame.
protected  List getRenderList()
          Gets the list of render objects which have been placed in this frame.
 void hRule(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.JCDrawStyle dstyle, double percent_width)
          Draws a horizontal line on a new line in the current column.
 void hRule(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.JCDrawStyle dstyle, JCUnit.Measure rule_length)
          Draws a horizontal line on a new line in the current column.
protected  void initialiseInfo()
          Computes the info fields necessary to print to the frame.
protected  void initialiseInfo(boolean paragraph)
          Computes the FlowInfo parameters for the frame.
 void newColumn(com.klg.jclass.page.JCTextStyle style)
          Moves the insertion point to the top of the next column.
 void newLine(com.klg.jclass.page.JCTextStyle style)
          Advances to a new line (hard line break).
protected  void newLine(com.klg.jclass.page.JCTextStyle style, boolean paragraph)
          Deprecated. Use newLine(JCTextStyle) or newParagraph(JCTextStyle) instead
 void newParagraph(com.klg.jclass.page.JCTextStyle style)
          Advances to a new line (starting a new paragraph).
 com.klg.jclass.page.JCTab nextTab(com.klg.jclass.page.JCTextStyle style)
          Determines what the next tab position is - the one that the insertion point would traverse to if frame.tab() were called at this point.
 void pasteComponent(Component c, JCUnit.Dimension size, JCUnit.Point origin)
          Pastes the drawn image of a component at the given location in the frame.
 void pasteComponent(Component c, JCUnit.Point origin)
          Pastes the drawn image of a component at the given location in the frame.
 void pasteEPS(com.klg.jclass.page.EPSImage eps, JCUnit.Dimension size, JCUnit.Point origin)
          Pastes an Encapsulated PostScript image at the given location in the frame.
 void pasteEPS(com.klg.jclass.page.EPSImage eps, JCUnit.Point origin)
          Pastes an Encapsulated PostScript image at the given location in the frame.
 void pasteIcon(Icon icon, JCUnit.Dimension size, JCUnit.Point origin)
          Pastes an icon at the given location in the frame.
 void pasteIcon(Icon icon, JCUnit.Point origin)
          Pastes an icon at the given location in the frame.
 void pasteImage(Image image, JCUnit.Dimension size, JCUnit.Point origin)
          Pastes an image at the given location in the frame.
 void pasteImage(Image image, JCUnit.Point origin)
          Pastes an image at the given location in the frame.
 void print(com.klg.jclass.page.JCPageTable table)
          Draws a table in the current frame.
 void print(com.klg.jclass.page.JCPageTable table, int firstRow, int firstColumn)
          Draws a table in the current frame starting in the given position.
 void print(com.klg.jclass.page.JCPageTable table, int firstRow, int firstColumn, int last_row, int last_column)
          Draws a table in the current frame starting in the given position.
 void print(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.render.MacroRender macro)
          Flows a rendered text macro into this frame.
 void print(com.klg.jclass.page.JCTextStyle style, String text)
          Flows text into this frame.
 void print(com.klg.jclass.page.JCTextStyle style, String text, JCUnit.Point location)
          Prints text into this frame at a given position without flowing.
 void print(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.TextMacro macro)
          Flows a text macro into this frame.
protected  void printWithNewlines(com.klg.jclass.page.JCTextStyle style, String text)
          Flows text, which may have embedded newline characters, into this frame such that the newlines are performed.
 void setAlignment(int alignment)
          Sets the horizontal alignment of this frame as a floating object in another frame.
 void setBorder(com.klg.jclass.page.JCDrawStyle border)
          Sets the style object which determines how the frame's border is drawn.
 void setClipMask(JCUnit.Margins clip)
          Sets the mask which controls the portion of the frame which is drawn.
 void setColumnCount(int columnCount)
          Specifies the number of columns of text to display in the frame.
 void setColumnSpace(JCUnit.Measure columnSpace)
          Specifies the space to leave between columns of text.
 void setCurrentLine(List oldCurrentList)
          Copies a previous current line to this frame's current line.
 void setInsertionPoint(JCUnit.Point point)
          Sets a new location for inserting flowed objects.
 void setMargins(JCUnit.Margins margins)
          Specifies the margin spacing for the perimeter of the frame.
 void setPage(com.klg.jclass.page.JCPage page)
          Sets the page on which this frame (and its descendants) appears.
 void setSize(JCUnit.Dimension size)
          Changes the size of the frame.
protected  JCUnit.Dimension sizeComponent(Component c, Graphics gc, int width, int height)
          Sets up the size of a component that has been added to the document.
 void tab(com.klg.jclass.page.JCTextStyle style)
          Advances the insertion point to the next tab position.
 void updateLayoutStatus(com.klg.jclass.page.JCFlow flow, com.klg.jclass.page.JCPage page)
          Attempts to evaluate unresolved macros in this frame according to the given information (page and flow determine the current context).
 
Methods inherited from class com.klg.jclass.page.PageArea
drawEvalWatermark, getBackground, getColor, getDocument, getFrameList, getLayoutStatus, getLocation, getName, getSize, setColor, setDocument, setFrameList, setLayoutStatus, setLocation, setName, stringToFrame
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.klg.jclass.page.render.Floatable
getLocation, getSize
 

Field Detail

FLEXIBLE_SIZE

protected static JCUnit.Measure FLEXIBLE_SIZE
A large value used internatlly to mark a frame as having a flexible size.


border

protected com.klg.jclass.page.JCDrawStyle border
Specifies the border style, thickness, color, etc.


columnCount

protected int columnCount
The number of columns of text which are laid out in the frame.


columnSpace

protected JCUnit.Measure columnSpace
The amount of space to allow for a gutter between columns.


columnWidth

protected JCUnit.Measure columnWidth
A derived quantity determined by frame width, column count, and separation.


margin

protected JCUnit.Margins margin
The amount of space to be left for margins on each side of the frame.


renderList

protected List renderList
A list of all the graphical objects which are rendered in this frame.


clipMask

protected JCUnit.Margins clipMask
If different from the frame size, the rectangular region to display.


yExtent

protected JCUnit.Measure yExtent
This variable tracks the furthest position drawn to.


info

protected com.klg.jclass.page.JCFlowInfo info
Flow information contains current state and pending additions.


floatAlignment

protected int floatAlignment
Determines the horizontal alignment of this frame as a floating object.


page

protected com.klg.jclass.page.JCPage page
Stores the page on which this frame will be printed.


HEADER

public static final String HEADER
The standard name for a header frame on a page.

See Also:
Constant Field Values

FOOTER

public static final String FOOTER
The standard name for a footer frame on a page.

See Also:
Constant Field Values
Constructor Detail

JCFrame

public JCFrame()
Creates a new zero-sized frame.


JCFrame

public JCFrame(com.klg.jclass.page.JCDocument doc)
Creates a new blank frame.

Parameters:
doc - the document to which the frame will belong

JCFrame

public JCFrame(String name)
Creates a new named frame.

Parameters:
name - the name of the frame

JCFrame

public JCFrame(String name,
               com.klg.jclass.page.JCDocument doc)
Creates a new named frame.

Parameters:
doc - the document to which this frame belongs
name - the name of the frame

JCFrame

public JCFrame(String name,
               JCUnit.Point location,
               JCUnit.Dimension size)
Creates a new frame at a given position.

Parameters:
name - the name of the frame
location - the origin of the frame on the page
size - the dimensions of the frame

JCFrame

public JCFrame(String name,
               com.klg.jclass.page.JCDocument doc,
               JCUnit.Point location,
               JCUnit.Dimension size)
Creates a new frame at a given position.

Parameters:
doc - the document to which this frame will belong
name - the name of the frame
location - the origin of the frame on the page
size - the dimensions of the frame
Method Detail

getAlignment

public int getAlignment()
Gets the horizontal floating alignment of this frame within its parent frame.

Specified by:
getAlignment in interface com.klg.jclass.page.render.Floatable
Returns:
alignment of this frame to its parent

setAlignment

public void setAlignment(int alignment)
Sets the horizontal alignment of this frame as a floating object in another frame.

Parameters:
alignment - alignment of this frame within another

getBorder

public com.klg.jclass.page.JCDrawStyle getBorder()
Gets the style which determines how the frame's border is drawn.

Returns:
draw style object which defines the frame's border

setBorder

public void setBorder(com.klg.jclass.page.JCDrawStyle border)
Sets the style object which determines how the frame's border is drawn.

Parameters:
border - drawing style object to define the frame's border

getClipMask

public JCUnit.Margins getClipMask()
Gets the mask which controls the portion of the frame which is drawn.

Returns:
the clip mask to apply when drawing the cell

setClipMask

public void setClipMask(JCUnit.Margins clip)
Sets the mask which controls the portion of the frame which is drawn.

Parameters:
clip - the clip mask to apply when drawing the cell

getColumnCount

public int getColumnCount()
Gets the number of columns of text to display in the frame.

Returns:
number of columns in the frame

setColumnCount

public void setColumnCount(int columnCount)
Specifies the number of columns of text to display in the frame.

Parameters:
columnCount - number of columns of text to create

getColumnWidth

public JCUnit.Measure getColumnWidth()
Gets the width of columns of text in this frame.

Returns:
width of text columns in this frame

getColumnSpace

public JCUnit.Measure getColumnSpace()
Gets the space to leave between columns of text.

Returns:
white space between columns in the frame

setColumnSpace

public void setColumnSpace(JCUnit.Measure columnSpace)
Specifies the space to leave between columns of text.

Parameters:
columnSpace - white space between columns in the frame

getMargins

public JCUnit.Margins getMargins()
Gets the margin spacing defined for the perimeter of the frame.

Returns:
white space surrounding the contents of the frame

setMargins

public void setMargins(JCUnit.Margins margins)
Specifies the margin spacing for the perimeter of the frame.

Parameters:
margins - white space surrounding the contents of the frame

setPage

public void setPage(com.klg.jclass.page.JCPage page)
Sets the page on which this frame (and its descendants) appears.

Parameters:
page - the page on which this frame is being placed

setSize

public void setSize(JCUnit.Dimension size)
Changes the size of the frame.

Overrides:
setSize in class PageArea
Parameters:
size - new size of the frame

getInfo

public com.klg.jclass.page.JCFlowInfo getInfo()
Deprecated. this method is superceded by getFlowInfo()

Gets the flow information object.

Returns:
the information on the current state of flowing to this frame

print

public void print(com.klg.jclass.page.JCTextStyle style,
                  String text)
           throws EndOfFrameException
Flows text into this frame.

Parameters:
style - the style to apply to the new text
text - the text to be flowed
Throws:
EndOfFrameException

print

public void print(com.klg.jclass.page.JCTextStyle style,
                  com.klg.jclass.page.TextMacro macro)
           throws EndOfFrameException
Flows a text macro into this frame.

Parameters:
style - the style to apply to the macro
macro - the macro to be added to the flow
Throws:
EndOfFrameException

print

public void print(com.klg.jclass.page.JCTextStyle style,
                  com.klg.jclass.page.render.MacroRender macro)
           throws EndOfFrameException
Flows a rendered text macro into this frame.

Parameters:
style - the style to apply to the macro
macro - a render object encapsulating the macro to be added to the flow
Throws:
EndOfFrameException

print

public void print(com.klg.jclass.page.JCTextStyle style,
                  String text,
                  JCUnit.Point location)
Prints text into this frame at a given position without flowing.

Parameters:
style - the style to apply to the new text
text - the text to be placed in the frame
location - the origin point for the text

printWithNewlines

protected void printWithNewlines(com.klg.jclass.page.JCTextStyle style,
                                 String text)
                          throws EndOfFrameException
Flows text, which may have embedded newline characters, into this frame such that the newlines are performed.

Parameters:
style - the style to apply to the new text
text - the text to be printed in the frame
Throws:
EndOfFrameException

print

public void print(com.klg.jclass.page.JCPageTable table)
           throws EndOfFrameException
Draws a table in the current frame.

Parameters:
table - the table to draw
Throws:
EndOfFrameException

print

public void print(com.klg.jclass.page.JCPageTable table,
                  int firstRow,
                  int firstColumn)
           throws EndOfFrameException
Draws a table in the current frame starting in the given position.

Parameters:
table - the table to draw
firstRow - the row of the table to start drawing from
firstColumn - the first column of the table to be output in the start row
Throws:
EndOfFrameException

print

public void print(com.klg.jclass.page.JCPageTable table,
                  int firstRow,
                  int firstColumn,
                  int last_row,
                  int last_column)
           throws EndOfFrameException
Draws a table in the current frame starting in the given position.

Parameters:
table - the table to draw
firstRow - the row of the table to start drawing from
firstColumn - the first column of the table to be output in the start row
last_row - the row of the table to stop drawing at
last_column - the last column of the table to be output
Throws:
EndOfFrameException

tab

public void tab(com.klg.jclass.page.JCTextStyle style)
Advances the insertion point to the next tab position.

Parameters:
style - the style which contains the list of tab stops to use

nextTab

public com.klg.jclass.page.JCTab nextTab(com.klg.jclass.page.JCTextStyle style)
Determines what the next tab position is - the one that the insertion point would traverse to if frame.tab() were called at this point.

Parameters:
style - the style which contains the list of tab stops to use
Returns:
the tab location which is next after the current insertion point

floatImage

public 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 this). This form of the floatImage() method assumes a default size based on the pixel size of the image and centres the image in the frame.

Parameters:
image - the Image to be floated in the document

floatImage

public 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 this). This form of the floatImage() method assumes a default size based on the pixel size of the image.

Parameters:
image - the Image to be floated in the document
alignment - the horizontal alignment of the image in the frame

floatImage

public 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 this). This form of the floatImage() method centres the image in the frame.

Parameters:
image - the Image to be floated in the document
size - the dimensions of the image as it is to appear on the page

floatImage

public 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 this).

Parameters:
image - the Image to be floated in the document
alignment - the horizontal alignment of the image in the frame
size - the dimensions of the image as it is to appear on the page

floatIcon

public 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 this). This form of the floatIcon() method assumes a default size based on the pixel size of the icon and centres the icon in the frame.
This method only accepts instances of the ImageIcon class.

Parameters:
icon - the Icon to be floated in the document

floatIcon

public 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 this). This form of the floatIcon() method assumes a default size based on the pixel size of the icon.
This method only accepts instances of the ImageIcon class.

Parameters:
icon - the Icon to be floated in the document
alignment - the horizontal alignment of the icon in the frame

floatIcon

public 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 this). This form of the floatIcon() method centres the icon in the frame.
This method only accepts instances of the ImageIcon class.

Parameters:
icon - the Icon to be floated in the document
size - the dimensions of the icon as it is to appear on the page

floatIcon

public 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 this).
This method only accepts instances of the ImageIcon class.

Parameters:
icon - the Icon to be floated in the document
alignment - the horizontal alignment of the icon in the frame
size - the dimensions of the icon as it is to appear on the page

floatComponent

public 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). This form of the floatComponent() method assumes a default size based on the pixel size of the component from its current geometry and centres the component's image.

Parameters:
c - the Component to be floated in the document

floatComponent

public 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). This form of the floatComponent() method assumes a default size based on the pixel size of the component from its current geometry.

Parameters:
c - the Component to be floated in the document
alignment - the horizontal alignment of the component in the frame

floatComponent

public 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 this). This form of the floatComponent() method centres the component in the frame.

Parameters:
c - the Component to be floated in the document
size - the dimensions of the component as it is to appear on the page

floatComponent

public 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 this).

Parameters:
c - the component to be floated in the document
alignment - the horizontal alignment of the component in the frame
size - the dimensions of the component as it is to appear on the page

floatEPS

public 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 this). This form of the floatEPS() method centres the image and assumes the EPSImage object has a size set.

Parameters:
eps - the EPS image to be floated in the document

floatEPS

public 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 this). This form of the floatEPS() method assumes the EPSImage object has a size set.

Parameters:
eps - the EPS image to be floated in the document
alignment - the horizontal alignment of the image in the frame

floatEPS

public 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 this). This form of the floatEPS() method centres the image.

Parameters:
eps - the Image to be floated in the document
size - the dimensions of the image as it is to appear on the page

floatEPS

public 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 this).

Parameters:
eps - the EPS image to be floated in the document
alignment - the horizontal alignment of the image in the frame
size - the dimensions of the image as it is to appear on the page

addFloat

protected void addFloat(com.klg.jclass.page.render.ImageRender render)
Adds a floating object to this frame; pastes it immediately, if possible.

Parameters:
render - a render object encapsulating the floating object

embedImage

public void embedImage(com.klg.jclass.page.JCTextStyle style,
                       Image image)
                throws EndOfFrameException
Adds an image to the document as part of the current line (the image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the image. This form of the embedImage() method assumes a default size based on the pixel size of the image, and centres the image vertically on the current line.

Parameters:
image - the Image to be embedded in the current line
style -
Throws:
EndOfFrameException

embedImage

public void embedImage(com.klg.jclass.page.JCTextStyle style,
                       Image image,
                       int alignment)
                throws EndOfFrameException
Adds an image to the document as part of the current line (the image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the image. This form of the embedImage() method assumes a default size based on the pixel size of the image.

Parameters:
image - the Image to be embedded in the current line
alignment - the vertical alignment of the image on the current line
style -
Throws:
EndOfFrameException

embedImage

public void embedImage(com.klg.jclass.page.JCTextStyle style,
                       Image image,
                       JCUnit.Dimension size)
                throws EndOfFrameException
Adds an image to the document as part of the current line (the image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the image. This form of the embedImage() method centres the image vertically on the current line.

Parameters:
image - the Image to be embedded in the current line
size - the dimensions of the image as it is to appear on the page
style -
Throws:
EndOfFrameException

embedImage

public void embedImage(com.klg.jclass.page.JCTextStyle style,
                       Image image,
                       int alignment,
                       JCUnit.Dimension size)
                throws EndOfFrameException
Adds an image to the document as part of the current line (the image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the image.

Parameters:
image - the Image to be embedded in the current line
alignment - the vertical alignment of the image on the current line
size - the dimensions of the image as it is to appear on the page
style -
Throws:
EndOfFrameException

embedIcon

public void embedIcon(com.klg.jclass.page.JCTextStyle style,
                      Icon icon)
               throws EndOfFrameException
Adds an icon to the document as part of the current line (the icon may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the icon. This form of the embedIcon() method assumes a default size based on the pixel size of the icon, and centres the icon vertically on the current line.
This method only accepts instances of the ImageIcon class.

Parameters:
icon - the Icon to be embedded in the current line
style -
Throws:
EndOfFrameException

embedIcon

public void embedIcon(com.klg.jclass.page.JCTextStyle style,
                      Icon icon,
                      int alignment)
               throws EndOfFrameException
Adds an icon to the document as part of the current line (the icon may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the icon. This form of the embedIcon() method assumes a default size based on the pixel size of the icon.
This method only accepts instances of the ImageIcon class.

Parameters:
icon - the Icon to be embedded in the current line
alignment - the vertical alignment of the icon on the current line
style -
Throws:
EndOfFrameException

embedIcon

public void embedIcon(com.klg.jclass.page.JCTextStyle style,
                      Icon icon,
                      JCUnit.Dimension size)
               throws EndOfFrameException
Adds an icon to the document as part of the current line (the icon may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the icon. This form of the embedIcon() method centres the icon vertically on the current line.
This method only accepts instances of the ImageIcon class.

Parameters:
icon - the Icon to be embedded in the current line
size - the dimensions of the icon as it is to appear on the page
style -
Throws:
EndOfFrameException

embedIcon

public void embedIcon(com.klg.jclass.page.JCTextStyle style,
                      Icon icon,
                      int alignment,
                      JCUnit.Dimension size)
               throws EndOfFrameException
Adds an icon to the document as part of the current line (the icon may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the icon.
This method only accepts instances of the ImageIcon class.

Parameters:
icon - the Icon to be embedded in the current line
alignment - the vertical alignment of the icon on the current line
size - the dimensions of the icon as it is to appear on the page
style -
Throws:
EndOfFrameException

embedComponent

public void embedComponent(com.klg.jclass.page.JCTextStyle style,
                           Component c)
                    throws EndOfFrameException
Adds a component's drawn image to the document as part of the current line (the component's image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the component drawing. This form of the embedComponent() method assumes a default size based on the pixel size of the component from its current geometry, and centres the component vertically on the current line.

Parameters:
c - the Component to be embedded in the current line
style -
Throws:
EndOfFrameException

embedComponent

public void embedComponent(com.klg.jclass.page.JCTextStyle style,
                           Component c,
                           int alignment)
                    throws EndOfFrameException
Adds a component's drawn image to the document as part of the current line (the component image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the component drawing. This form of the embedComponent() method assumes a default size based on the pixel size of the component from its current geometry.

Parameters:
c - the component to be embedded in the current line
alignment - the vertical alignment of the component on the current line
style -
Throws:
EndOfFrameException

embedComponent

public void embedComponent(com.klg.jclass.page.JCTextStyle style,
                           Component c,
                           JCUnit.Dimension size)
                    throws EndOfFrameException
Adds a component's drawn image to the document as part of the current line (the component image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the component drawing. This form of the embedComponent() method centres the component vertically on the current line.

Parameters:
c - the component to be embedded in the current line
size - the dimensions of the component as it is to appear on the page
style -
Throws:
EndOfFrameException

embedComponent

public void embedComponent(com.klg.jclass.page.JCTextStyle style,
                           Component c,
                           int alignment,
                           JCUnit.Dimension size)
                    throws EndOfFrameException
Adds a component's drawn image to the document as part of the current line (the component image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the component drawing.

Parameters:
c - the component to be embedded in the current line
alignment - the vertical alignment of the component on the current line
size - the dimensions of the component as it is to appear on the page
style -
Throws:
EndOfFrameException

sizeComponent

protected JCUnit.Dimension sizeComponent(Component c,
                                         Graphics gc,
                                         int width,
                                         int height)
Sets up the size of a component that has been added to the document. If the component has a size, it is kept. If it doesn't, either the defaults are used (width, height) specified in this method's parameters or, if they are also zero, the component's preferred size is used.

Parameters:
c -
gc -
height -
width -
Returns:

embedEPS

public void embedEPS(com.klg.jclass.page.JCTextStyle style,
                     com.klg.jclass.page.EPSImage eps)
              throws EndOfFrameException
Adds an Encapsulated PostScript image to the document as part of the current line (the eps image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the image. This form of the embedEPS() method centres the eps image vertically on the current line and assumes a size has been provided to the eps image object.

Parameters:
eps - the EPS image to be embedded in the current line
style -
Throws:
EndOfFrameException

embedEPS

public void embedEPS(com.klg.jclass.page.JCTextStyle style,
                     com.klg.jclass.page.EPSImage eps,
                     int alignment)
              throws EndOfFrameException
Adds an Encapsulated PostScript image to the document as part of the current line (the eps image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the image. This form of the embedEPS() method assumes a size has been provided to the eps image object.

Parameters:
eps - the EPS image to be embedded in the current line
alignment - the vertical alignment of the image on the current line
style -
Throws:
EndOfFrameException

embedEPS

public void embedEPS(com.klg.jclass.page.JCTextStyle style,
                     com.klg.jclass.page.EPSImage eps,
                     JCUnit.Dimension size)
              throws EndOfFrameException
Adds an Encapsulated PostScript image to the document as part of the current line (the eps image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the image. This form of the embedEPS() method centres the eps image vertically on the current line.

Parameters:
eps - the Image to be embedded in the current line
size - the dimensions of the image as it is to appear on the page
style -
Throws:
EndOfFrameException

embedEPS

public void embedEPS(com.klg.jclass.page.JCTextStyle style,
                     com.klg.jclass.page.EPSImage eps,
                     int alignment,
                     JCUnit.Dimension size)
              throws EndOfFrameException
Add an Encapsulated PostScript image to the document as part of the current line (the eps image may wrap if there isn't enough horizontal space). The height of the current line will be adjusted to accomodate the image.

Parameters:
eps - the EPS image to be embedded in the current line
alignment - the vertical alignment of the image on the current line
size - the dimensions of the image as it is to appear on the page
style -
Throws:
EndOfFrameException

pasteImage

public void pasteImage(Image image,
                       JCUnit.Point origin)
Pastes an image at the given location in the frame. This form of the pasteImage() method assumes a default size based on the pixel size of the image.

Parameters:
image - the Image to be pasted into this frame
origin - the point at which to place the image

pasteImage

public void pasteImage(Image image,
                       JCUnit.Dimension size,
                       JCUnit.Point origin)
Pastes an image at the given location in the frame.

Parameters:
image - the Image to be pasted into this frame
size - the dimensions of the image as it is to appear on the page
origin - the point at which to place the image

pasteIcon

public void pasteIcon(Icon icon,
                      JCUnit.Point origin)
Pastes an icon at the given location in the frame. This form of the pasteIcon() method assumes a default size based on the pixel size of the icon.

Parameters:
icon - the Icon to be pasted into this frame
origin - the point at which to place the icon

pasteIcon

public void pasteIcon(Icon icon,
                      JCUnit.Dimension size,
                      JCUnit.Point origin)
Pastes an icon at the given location in the frame.

Parameters:
icon - the Icon to be pasted into this frame
size - the dimensions of the icon as it is to appear on the page
origin - the point at which to place the icon

pasteComponent

public void pasteComponent(Component c,
                           JCUnit.Point origin)
Pastes the drawn image of a component at the given location in the frame. This form of the pasteComponent() method assumes a default size based on the pixel size of the component from its current geometry.

Parameters:
c - the component to be pasted into this frame
origin - the point at which to place the component

pasteComponent

public void pasteComponent(Component c,
                           JCUnit.Dimension size,
                           JCUnit.Point origin)
Pastes the drawn image of a component at the given location in the frame.

Parameters:
c - the component to be pasted into this frame
size - the dimensions of the component as it is to appear on the page
origin - the point at which to place the component

pasteEPS

public void pasteEPS(com.klg.jclass.page.EPSImage eps,
                     JCUnit.Point origin)
Pastes an Encapsulated PostScript image at the given location in the frame. This form of the pasteEPS() method assumes a size has been provided to the eps image object.

Parameters:
eps - the EPSImage to be pasted into this frame
origin - the point at which to place the eps image

pasteEPS

public void pasteEPS(com.klg.jclass.page.EPSImage eps,
                     JCUnit.Dimension size,
                     JCUnit.Point origin)
Pastes an Encapsulated PostScript image at the given location in the frame.

Parameters:
eps - the EPSImage to be pasted into this frame
size - the dimensions of the eps image as it is to appear on the page
origin - the point at which to place the eps image

hRule

public void hRule(com.klg.jclass.page.JCTextStyle style,
                  com.klg.jclass.page.JCDrawStyle dstyle,
                  double percent_width)
           throws EndOfFrameException
Draws a horizontal line on a new line in the current column.

Parameters:
style - a text style defining the column positioning (indents, spacing)
dstyle - a drawing style which defines the rule's appearance
percent_width - the percentage of the width of the column the rule is wide
Throws:
EndOfFrameException

hRule

public void hRule(com.klg.jclass.page.JCTextStyle style,
                  com.klg.jclass.page.JCDrawStyle dstyle,
                  JCUnit.Measure rule_length)
           throws EndOfFrameException
Draws a horizontal line on a new line in the current column.

Parameters:
style - a text style defining the column positioning (indents, spacing)
dstyle - a drawing style which defines the rule's appearance
rule_length - the length of the rule
Throws:
EndOfFrameException

newLine

public void newLine(com.klg.jclass.page.JCTextStyle style)
Advances to a new line (hard line break).

Parameters:
style - the current style which determines the required line spacing

newParagraph

public void newParagraph(com.klg.jclass.page.JCTextStyle style)
Advances to a new line (starting a new paragraph).

Parameters:
style - the current style which determines the required line spacing

newLine

protected void newLine(com.klg.jclass.page.JCTextStyle style,
                       boolean paragraph)
Deprecated. Use newLine(JCTextStyle) or newParagraph(JCTextStyle) instead

Advances to a new line (pasting down the current line).

Parameters:
style - the current style which determines the required line spacing
paragraph - true if the next line begins a new paragraph

doLineBreak

protected void doLineBreak(com.klg.jclass.page.JCTextStyle style,
                           boolean paragraph)
Advances to a new line (pasting down the current line).

Parameters:
style - the current style which determines the required line spacing
paragraph - true if the next line begins a new paragraph

doLineBreak

protected void doLineBreak(com.klg.jclass.page.JCTextStyle style,
                           boolean paragraph,
                           boolean endOfFrame)
Advances to a new line (pasting down the current line).

Parameters:
style - the current style which determines the required line spacing
paragraph - true if the next line begins a new paragraph
endOfFrame - true if this is the last line of the frame

newColumn

public void newColumn(com.klg.jclass.page.JCTextStyle style)
               throws EndOfFrameException
Moves the insertion point to the top of the next column.

Parameters:
style - the current style which determines the required line spacing
Throws:
EndOfFrameException

getFirstLineOffset

public JCUnit.Measure getFirstLineOffset(com.klg.jclass.page.JCTextStyle style)
Calculates the extra top offset required for the first line of a frame.

Parameters:
style - the current style of text being printed
Returns:
the amount of offset to add to the first line of text

getInsertionPoint

public JCUnit.Point getInsertionPoint()
Returns the point in the frame at which text is being flowed.

Returns:
the current insertion point for text and flowed images

setInsertionPoint

public void setInsertionPoint(JCUnit.Point point)
Sets a new location for inserting flowed objects.

Parameters:
point - the new insertion point

getCurrentAscender

public JCUnit.Measure getCurrentAscender()
Gets the size of the largest ascender among objects flowed to the current line.

Returns:
the line's tallest ascender

getCurrentDescender

public JCUnit.Measure getCurrentDescender()
Gets the largest descender among objects flowed to the current line.

Returns:
the magnitude of the line's largest descender

getCurrentBaseline

public JCUnit.Measure getCurrentBaseline()
Gets the baseline of the current line as adjusted for the ascender height.

Returns:
the frame position of the baseline of text in the current line

getCurrentColumn

public int getCurrentColumn()
Gets the column position within the frame.

Returns:
number of the current column

getFlowInfo

public com.klg.jclass.page.JCFlowInfo getFlowInfo()
Returns the flow structure, which controls the flow in this frame.

Returns:
the attributes of the flow in this frame

addFloats

public void addFloats(List floatObjectList)
Adds a list of objects to the floating objects which are pending.

Parameters:
floatObjectList - a list of objects which float in the flow (for example, images)

setCurrentLine

public void setCurrentLine(List oldCurrentList)
                    throws EndOfFrameException
Copies a previous current line to this frame's current line.

Parameters:
oldCurrentList - a list of objects which were the old current line
Throws:
EndOfFrameException

drawCircle

public void drawCircle(com.klg.jclass.page.JCDrawStyle style,
                       JCUnit.Point center,
                       JCUnit.Measure radius)
Draws a circle given a centre point and radius.

Parameters:
style - the drawing style used to specify the appearance of the figure
center - the origin of the circle
radius - a measure specifying the radius of the circle

fillCircle

public void fillCircle(com.klg.jclass.page.JCDrawStyle style,
                       JCUnit.Point center,
                       JCUnit.Measure radius)
Draws a filled circle given a centre point and radius.

Parameters:
style - the drawing style used to specify the appearance of the figure
center - the origin of the circle
radius - a measure specifying the radius of the circle

drawRectangle

public void drawRectangle(com.klg.jclass.page.JCDrawStyle style,
                          JCUnit.Point origin,
                          JCUnit.Dimension size)
Draws a rectangle given a start point and size.

Parameters:
style - the drawing style used to specify the appearance of the figure
origin - the location of the rectangle
size - the dimensions of the rectangle

drawRectangle

public void drawRectangle(com.klg.jclass.page.JCDrawStyle style,
                          JCUnit.Point startPoint,
                          JCUnit.Point endPoint)
Draws a rectangle given a start point and end point.

Parameters:
style - the drawing style used to specify the appearance of the figure
startPoint - the first point of the rectangle
endPoint - the diagonal corner of the rectangle

fillRectangle

public void fillRectangle(com.klg.jclass.page.JCDrawStyle style,
                          JCUnit.Point origin,
                          JCUnit.Dimension size)
Draws a filled rectangle given a start point and size.

Parameters:
style - the drawing style used to specify the appearance of the figure
origin - the location of the rectangle
size - the dimensions of the rectangle

fillRectangle

public void fillRectangle(com.klg.jclass.page.JCDrawStyle style,
                          JCUnit.Point startPoint,
                          JCUnit.Point endPoint)
Draws a filled rectangle given a start point and end point.

Parameters:
style - the drawing style used to specify the appearance of the figure
startPoint - the first point of the rectangle
endPoint - the diagonal corner of the rectangle

drawLine

public void drawLine(com.klg.jclass.page.JCDrawStyle style,
                     JCUnit.Point startPoint,
                     JCUnit.Point endPoint)
Draws a line between two given points.

Parameters:
style - the drawing style used to specify the appearance of the figure
startPoint - the first point of the line
endPoint - the end point of the line

drawLine

public void drawLine(com.klg.jclass.page.JCDrawStyle style,
                     List pointList)
Draws a line given a list of points.

Parameters:
style - the drawing style used to specify the appearance of the figure
pointList - a list of points from which to create the line

drawLine

public void drawLine(com.klg.jclass.page.JCDrawStyle style,
                     JCUnit.Point[] points)
Draws a line given an array of points.

Parameters:
style - the drawing style used to specify the appearance of the figure
points - an array of points from which to create the line

drawPolygon

public void drawPolygon(com.klg.jclass.page.JCDrawStyle style,
                        List pointList)
Draws a polygon given a list of points (the sequence of points will automatically be closed).

Parameters:
style - the drawing style used to specify the appearance of the figure
pointList - a list of points from which to create the polygon

drawPolygon

public void drawPolygon(com.klg.jclass.page.JCDrawStyle style,
                        JCUnit.Point[] points)
Draws a polygon given an array of points (the sequence of points will automatically be closed).

Parameters:
style - the drawing style used to specify the appearance of the figure
points - an array of points from which to create the polygon

fillPolygon

public void fillPolygon(com.klg.jclass.page.JCDrawStyle style,
                        List pointList)
Draws a filled polygon given a list of points (the sequence of points will automatically be closed).

Parameters:
style - the drawing style used to specify the appearance of the figure
pointList - a list of points from which to create the polygon

fillPolygon

public void fillPolygon(com.klg.jclass.page.JCDrawStyle style,
                        JCUnit.Point[] points)
Draws a filled polygon given an array of points (the sequence of points will automatically be closed).

Parameters:
style - the drawing style used to specify the appearance of the figure
points - an array of points from which to create the polygon

drawRoundedRectangle

public void drawRoundedRectangle(com.klg.jclass.page.JCDrawStyle style,
                                 JCUnit.Point origin,
                                 JCUnit.Dimension size,
                                 JCUnit.Measure r)
Draws a rounded-corner rectangle given a start point, size, and corner radius.

Parameters:
style - the drawing style used to specify the appearance of the figure
origin - the location of the rectangle
size - the dimensions of the rectangle
r - the radius of the corner arcs

drawRoundedRectangle

public void drawRoundedRectangle(com.klg.jclass.page.JCDrawStyle style,
                                 JCUnit.Point startPoint,
                                 JCUnit.Point endPoint,
                                 JCUnit.Measure r)
Draws a rounded-corner rectangle given a start point, end point, and arc radius.

Parameters:
style - the drawing style used to specify the appearance of the figure
startPoint - the first point of the rectangle
endPoint - the diagonal corner of the rectangle
r - the radius of the corner arcs

fillRoundedRectangle

public void fillRoundedRectangle(com.klg.jclass.page.JCDrawStyle style,
                                 JCUnit.Point origin,
                                 JCUnit.Dimension size,
                                 JCUnit.Measure r)
Draws a filled rounded rectangle given a start point, size, and corner radius.

Parameters:
style - the drawing style used to specify the appearance of the figure
origin - the location of the rectangle
size - the dimensions of the rectangle
r -

fillRoundedRectangle

public void fillRoundedRectangle(com.klg.jclass.page.JCDrawStyle style,
                                 JCUnit.Point startPoint,
                                 JCUnit.Point endPoint,
                                 JCUnit.Measure r)
Draws a filled rounded rectangle given a start point, end point, and arc radius.

Parameters:
style - the drawing style used to specify the appearance of the figure
startPoint - the first point of the rectangle
endPoint - the diagonal corner of the rectangle
r - the radius of the corner arcs

complete

public void complete()
Completes any pending actions on the frame (for example, current line).


calcLayoutStatus

public void calcLayoutStatus()
Checks the render objects on the page to determine the layout status.

Overrides:
calcLayoutStatus in class PageArea

updateLayoutStatus

public void updateLayoutStatus(com.klg.jclass.page.JCFlow flow,
                               com.klg.jclass.page.JCPage page)
Attempts to evaluate unresolved macros in this frame according to the given information (page and flow determine the current context).

Overrides:
updateLayoutStatus in class PageArea
Parameters:
flow - the document flow in which the macro appears
page - the page on which the macro is placed

getRenderList

protected List getRenderList()
Gets the list of render objects which have been placed in this frame.

Returns:
a list of render objects pasted in this frame

clone

public Object clone()
Returns a frame which is a deep copy of this one (copies included frames).

Overrides:
clone in class Object
Returns:
a new frame which is the same as this

draw

public void draw(Graphics2D gc)
Draws the frame and its contents.

Overrides:
draw in class PageArea
Parameters:
gc - the graphics into which to draw the frame

initialiseInfo

protected void initialiseInfo()
Computes the info fields necessary to print to the frame.


initialiseInfo

protected void initialiseInfo(boolean paragraph)
Computes the FlowInfo parameters for the frame.

Parameters:
paragraph - indicates if the first line begins a new paragraph

Copyright © 2004 Quest Software Inc..
All rights reserved.