|
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.PageArea | +--com.klg.jclass.page.JCFrame
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 |
protected static JCUnit.Measure FLEXIBLE_SIZE
protected com.klg.jclass.page.JCDrawStyle border
protected int columnCount
protected JCUnit.Measure columnSpace
protected JCUnit.Measure columnWidth
protected JCUnit.Margins margin
protected List renderList
protected JCUnit.Margins clipMask
protected JCUnit.Measure yExtent
protected com.klg.jclass.page.JCFlowInfo info
protected int floatAlignment
protected com.klg.jclass.page.JCPage page
public static final String HEADER
public static final String FOOTER
Constructor Detail |
public JCFrame()
public JCFrame(com.klg.jclass.page.JCDocument doc)
doc
- the document to which the frame will belongpublic JCFrame(String name)
name
- the name of the framepublic JCFrame(String name, com.klg.jclass.page.JCDocument doc)
doc
- the document to which this frame belongsname
- the name of the framepublic JCFrame(String name, JCUnit.Point location, JCUnit.Dimension size)
name
- the name of the framelocation
- the origin of the frame on the pagesize
- the dimensions of the framepublic JCFrame(String name, com.klg.jclass.page.JCDocument doc, JCUnit.Point location, JCUnit.Dimension size)
doc
- the document to which this frame will belongname
- the name of the framelocation
- the origin of the frame on the pagesize
- the dimensions of the frameMethod Detail |
public int getAlignment()
getAlignment
in interface com.klg.jclass.page.render.Floatable
public void setAlignment(int alignment)
alignment
- alignment of this frame within anotherpublic com.klg.jclass.page.JCDrawStyle getBorder()
public void setBorder(com.klg.jclass.page.JCDrawStyle border)
border
- drawing style object to define the frame's borderpublic JCUnit.Margins getClipMask()
public void setClipMask(JCUnit.Margins clip)
clip
- the clip mask to apply when drawing the cellpublic int getColumnCount()
public void setColumnCount(int columnCount)
columnCount
- number of columns of text to createpublic JCUnit.Measure getColumnWidth()
public JCUnit.Measure getColumnSpace()
public void setColumnSpace(JCUnit.Measure columnSpace)
columnSpace
- white space between columns in the framepublic JCUnit.Margins getMargins()
public void setMargins(JCUnit.Margins margins)
margins
- white space surrounding the contents of the framepublic void setPage(com.klg.jclass.page.JCPage page)
page
- the page on which this frame is being placedpublic void setSize(JCUnit.Dimension size)
setSize
in class PageArea
size
- new size of the framepublic com.klg.jclass.page.JCFlowInfo getInfo()
getFlowInfo()
public void print(com.klg.jclass.page.JCTextStyle style, String text) throws EndOfFrameException
style
- the style to apply to the new texttext
- the text to be flowed
EndOfFrameException
public void print(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.TextMacro macro) throws EndOfFrameException
style
- the style to apply to the macromacro
- the macro to be added to the flow
EndOfFrameException
public void print(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.render.MacroRender macro) throws EndOfFrameException
style
- the style to apply to the macromacro
- a render object encapsulating the macro to be added to the flow
EndOfFrameException
public void print(com.klg.jclass.page.JCTextStyle style, String text, JCUnit.Point location)
style
- the style to apply to the new texttext
- the text to be placed in the framelocation
- the origin point for the textprotected void printWithNewlines(com.klg.jclass.page.JCTextStyle style, String text) throws EndOfFrameException
style
- the style to apply to the new texttext
- the text to be printed in the frame
EndOfFrameException
public void print(com.klg.jclass.page.JCPageTable table) throws EndOfFrameException
table
- the table to draw
EndOfFrameException
public void print(com.klg.jclass.page.JCPageTable table, int firstRow, int firstColumn) throws EndOfFrameException
table
- the table to drawfirstRow
- the row of the table to start drawing fromfirstColumn
- the first column of the table to be output in the start row
EndOfFrameException
public void print(com.klg.jclass.page.JCPageTable table, int firstRow, int firstColumn, int last_row, int last_column) throws EndOfFrameException
table
- the table to drawfirstRow
- the row of the table to start drawing fromfirstColumn
- the first column of the table to be output in the start rowlast_row
- the row of the table to stop drawing atlast_column
- the last column of the table to be output
EndOfFrameException
public void tab(com.klg.jclass.page.JCTextStyle style)
style
- the style which contains the list of tab stops to usepublic com.klg.jclass.page.JCTab nextTab(com.klg.jclass.page.JCTextStyle style)
frame.tab()
were called at this point.
style
- the style which contains the list of tab stops to use
public void floatImage(Image image)
floatImage()
method assumes a default size based on
the pixel size of the image and centres the image in the frame.
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 centres 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 centres the icon in the frame.
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 centres 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 centres the component's image.
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 centres the
component in the frame.
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 centres
the image 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 centres
the image.
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 pageprotected void addFloat(com.klg.jclass.page.render.ImageRender render)
render
- a render object encapsulating the floating objectpublic void embedImage(com.klg.jclass.page.JCTextStyle style, Image image) throws EndOfFrameException
embedImage()
method assumes a default size based on the pixel size of the
image, and centres the image vertically on the current line.
image
- the Image to be embedded in the current linestyle
-
EndOfFrameException
public void embedImage(com.klg.jclass.page.JCTextStyle style, Image image, int alignment) throws EndOfFrameException
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 linestyle
-
EndOfFrameException
public void embedImage(com.klg.jclass.page.JCTextStyle style, Image image, JCUnit.Dimension size) throws EndOfFrameException
embedImage()
method centres 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 pagestyle
-
EndOfFrameException
public void embedImage(com.klg.jclass.page.JCTextStyle style, Image image, int alignment, JCUnit.Dimension size) throws EndOfFrameException
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 pagestyle
-
EndOfFrameException
public void embedIcon(com.klg.jclass.page.JCTextStyle style, Icon icon) throws EndOfFrameException
embedIcon()
method assumes a default size based on the pixel size of the
icon, and centres the icon vertically on the current line.
ImageIcon
class.
icon
- the Icon to be embedded in the current linestyle
-
EndOfFrameException
public void embedIcon(com.klg.jclass.page.JCTextStyle style, Icon icon, int alignment) throws EndOfFrameException
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 linestyle
-
EndOfFrameException
public void embedIcon(com.klg.jclass.page.JCTextStyle style, Icon icon, JCUnit.Dimension size) throws EndOfFrameException
embedIcon()
method centres 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 pagestyle
-
EndOfFrameException
public void embedIcon(com.klg.jclass.page.JCTextStyle style, Icon icon, int alignment, JCUnit.Dimension size) throws EndOfFrameException
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 pagestyle
-
EndOfFrameException
public void embedComponent(com.klg.jclass.page.JCTextStyle style, Component c) throws EndOfFrameException
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.
c
- the Component to be embedded in the current linestyle
-
EndOfFrameException
public void embedComponent(com.klg.jclass.page.JCTextStyle style, Component c, int alignment) throws EndOfFrameException
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 linestyle
-
EndOfFrameException
public void embedComponent(com.klg.jclass.page.JCTextStyle style, Component c, JCUnit.Dimension size) throws EndOfFrameException
embedComponent()
method centres 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 pagestyle
-
EndOfFrameException
public void embedComponent(com.klg.jclass.page.JCTextStyle style, Component c, int alignment, JCUnit.Dimension size) throws EndOfFrameException
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 pagestyle
-
EndOfFrameException
protected JCUnit.Dimension sizeComponent(Component c, Graphics gc, int width, int height)
c
- gc
- height
- width
-
public void embedEPS(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.EPSImage eps) throws EndOfFrameException
embedEPS()
method centres 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 linestyle
-
EndOfFrameException
public void embedEPS(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.EPSImage eps, int alignment) throws EndOfFrameException
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 linestyle
-
EndOfFrameException
public void embedEPS(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.EPSImage eps, JCUnit.Dimension size) throws EndOfFrameException
embedEPS()
method centres 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 pagestyle
-
EndOfFrameException
public void embedEPS(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.EPSImage eps, int alignment, JCUnit.Dimension size) throws EndOfFrameException
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 pagestyle
-
EndOfFrameException
public void pasteImage(Image image, JCUnit.Point origin)
pasteImage()
method assumes a default size based on the pixel size of the
image.
image
- the Image to be pasted into this frameorigin
- the point at which to place the imagepublic void pasteImage(Image image, JCUnit.Dimension size, JCUnit.Point origin)
image
- the Image to be pasted into this framesize
- the dimensions of the image as it is to appear on the pageorigin
- the point at which to place the imagepublic void pasteIcon(Icon icon, JCUnit.Point origin)
pasteIcon()
method assumes a default size based on the pixel size of the
icon.
icon
- the Icon to be pasted into this frameorigin
- the point at which to place the iconpublic void pasteIcon(Icon icon, JCUnit.Dimension size, JCUnit.Point origin)
icon
- the Icon to be pasted into this framesize
- the dimensions of the icon as it is to appear on the pageorigin
- the point at which to place the iconpublic void pasteComponent(Component c, JCUnit.Point origin)
pasteComponent()
method assumes a default size based on
the pixel size of the component from its current geometry.
c
- the component to be pasted into this frameorigin
- the point at which to place the componentpublic void pasteComponent(Component c, JCUnit.Dimension size, JCUnit.Point origin)
c
- the component to be pasted into this framesize
- the dimensions of the component as it is to appear on the pageorigin
- the point at which to place the componentpublic void pasteEPS(com.klg.jclass.page.EPSImage eps, JCUnit.Point origin)
pasteEPS()
method assumes a size has been provided to the
eps image object.
eps
- the EPSImage
to be pasted into this frameorigin
- the point at which to place the eps imagepublic void pasteEPS(com.klg.jclass.page.EPSImage eps, JCUnit.Dimension size, JCUnit.Point origin)
eps
- the EPSImage
to be pasted into this framesize
- the dimensions of the eps image as it is to appear on the pageorigin
- the point at which to place the eps imagepublic void hRule(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.JCDrawStyle dstyle, double percent_width) throws EndOfFrameException
style
- a text style defining the column positioning (indents, spacing)dstyle
- a drawing style which defines the rule's appearancepercent_width
- the percentage of the width of the column the rule is wide
EndOfFrameException
public void hRule(com.klg.jclass.page.JCTextStyle style, com.klg.jclass.page.JCDrawStyle dstyle, JCUnit.Measure rule_length) throws EndOfFrameException
style
- a text style defining the column positioning (indents, spacing)dstyle
- a drawing style which defines the rule's appearancerule_length
- the length of the rule
EndOfFrameException
public void newLine(com.klg.jclass.page.JCTextStyle style)
style
- the current style which determines the required line spacingpublic void newParagraph(com.klg.jclass.page.JCTextStyle style)
style
- the current style which determines the required line spacingprotected void newLine(com.klg.jclass.page.JCTextStyle style, boolean paragraph)
newLine
(JCTextStyle
) or
newParagraph
(JCTextStyle
) instead
style
- the current style which determines the required line spacingparagraph
- true
if the next line begins a new paragraphprotected void doLineBreak(com.klg.jclass.page.JCTextStyle style, boolean paragraph)
style
- the current style which determines the required line spacingparagraph
- true
if the next line begins a new paragraphprotected void doLineBreak(com.klg.jclass.page.JCTextStyle style, boolean paragraph, boolean endOfFrame)
style
- the current style which determines the required line spacingparagraph
- true
if the next line begins a new paragraphendOfFrame
- true
if this is the last line of the framepublic void newColumn(com.klg.jclass.page.JCTextStyle style) throws EndOfFrameException
style
- the current style which determines the required line spacing
EndOfFrameException
public JCUnit.Measure getFirstLineOffset(com.klg.jclass.page.JCTextStyle style)
style
- the current style of text being printed
public JCUnit.Point getInsertionPoint()
public void setInsertionPoint(JCUnit.Point point)
point
- the new insertion pointpublic JCUnit.Measure getCurrentAscender()
public JCUnit.Measure getCurrentDescender()
public JCUnit.Measure getCurrentBaseline()
public int getCurrentColumn()
public com.klg.jclass.page.JCFlowInfo getFlowInfo()
public void addFloats(List floatObjectList)
floatObjectList
- a list of objects which float in the flow (for example, images)public void setCurrentLine(List oldCurrentList) throws EndOfFrameException
oldCurrentList
- a list of objects which were the old current line
EndOfFrameException
public void drawCircle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point center, JCUnit.Measure radius)
style
- the drawing style used to specify the appearance of the figurecenter
- the origin of the circleradius
- a measure specifying the radius of the circlepublic void fillCircle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point center, JCUnit.Measure radius)
style
- the drawing style used to specify the appearance of the figurecenter
- the origin of the circleradius
- a measure specifying the radius of the circlepublic void drawRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point origin, JCUnit.Dimension size)
style
- the drawing style used to specify the appearance of the figureorigin
- the location of the rectanglesize
- the dimensions of the rectanglepublic void drawRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint)
style
- the drawing style used to specify the appearance of the figurestartPoint
- the first point of the rectangleendPoint
- the diagonal corner of the rectanglepublic void fillRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point origin, JCUnit.Dimension size)
style
- the drawing style used to specify the appearance of the figureorigin
- the location of the rectanglesize
- the dimensions of the rectanglepublic void fillRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint)
style
- the drawing style used to specify the appearance of the figurestartPoint
- the first point of the rectangleendPoint
- the diagonal corner of the rectanglepublic void drawLine(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint)
style
- the drawing style used to specify the appearance of the figurestartPoint
- the first point of the lineendPoint
- the end point of the linepublic void drawLine(com.klg.jclass.page.JCDrawStyle style, List pointList)
style
- the drawing style used to specify the appearance of the figurepointList
- a list of points from which to create the linepublic void drawLine(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point[] points)
style
- the drawing style used to specify the appearance of the figurepoints
- an array of points from which to create the linepublic void drawPolygon(com.klg.jclass.page.JCDrawStyle style, List pointList)
style
- the drawing style used to specify the appearance of the figurepointList
- a list of points from which to create the polygonpublic void drawPolygon(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point[] points)
style
- the drawing style used to specify the appearance of the figurepoints
- an array of points from which to create the polygonpublic void fillPolygon(com.klg.jclass.page.JCDrawStyle style, List pointList)
style
- the drawing style used to specify the appearance of the figurepointList
- a list of points from which to create the polygonpublic void fillPolygon(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point[] points)
style
- the drawing style used to specify the appearance of the figurepoints
- an array of points from which to create the polygonpublic void drawRoundedRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point origin, JCUnit.Dimension size, JCUnit.Measure r)
style
- the drawing style used to specify the appearance of the figureorigin
- the location of the rectanglesize
- the dimensions of the rectangler
- the radius of the corner arcspublic void drawRoundedRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint, JCUnit.Measure r)
style
- the drawing style used to specify the appearance of the figurestartPoint
- the first point of the rectangleendPoint
- the diagonal corner of the rectangler
- the radius of the corner arcspublic void fillRoundedRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point origin, JCUnit.Dimension size, JCUnit.Measure r)
style
- the drawing style used to specify the appearance of the figureorigin
- the location of the rectanglesize
- the dimensions of the rectangler
- public void fillRoundedRectangle(com.klg.jclass.page.JCDrawStyle style, JCUnit.Point startPoint, JCUnit.Point endPoint, JCUnit.Measure r)
style
- the drawing style used to specify the appearance of the figurestartPoint
- the first point of the rectangleendPoint
- the diagonal corner of the rectangler
- the radius of the corner arcspublic void complete()
public void calcLayoutStatus()
calcLayoutStatus
in class PageArea
public void updateLayoutStatus(com.klg.jclass.page.JCFlow flow, com.klg.jclass.page.JCPage page)
updateLayoutStatus
in class PageArea
flow
- the document flow in which the macro appearspage
- the page on which the macro is placedprotected List getRenderList()
public Object clone()
clone
in class Object
public void draw(Graphics2D gc)
draw
in class PageArea
gc
- the graphics into which to draw the frameprotected void initialiseInfo()
protected void initialiseInfo(boolean paragraph)
FlowInfo
parameters for the frame.
paragraph
- indicates if the first line begins a new paragraph
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |