|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.mif.MifBook
public class MifBook
class representing a MIF document. The document is built up by calling various methods and then finally output to given filehandle using output method.
Field Summary | |
---|---|
static String |
EOL
Constant for the end-of-line String, used in building mif output. |
static String |
TAB
Constant for the tab String, used in building mif output. |
Constructor Summary | |
---|---|
MifBook(org.apache.commons.logging.Log logger)
Creates an empty MIF document. |
Method Summary | |
---|---|
void |
addImage(String url,
int x,
int y,
int w,
int h)
Creates a new image. |
void |
addToStream(String s)
Adds a given string to the output. |
void |
createFrame(int x,
int y,
int w,
int h)
Creates a new anchored frame. |
void |
createPage()
|
void |
createTable()
|
void |
createTextRect(int numCols)
Creates a new text rectangle. |
void |
endTable()
Switch the reference back from the table to the current textflow. |
int |
getNewId()
Returns the next available id for this document. |
static String |
mifEncode(String val)
Encode a String using the MIF encoding. |
void |
output(OutputStream stream)
|
void |
setBlockProp(int startIndent,
int endIndent)
|
void |
setColumnProp(int colWidth)
Add a column to the current table. |
void |
setCurrent(String current)
|
void |
setDocumentHeightWidth(int height,
int width)
|
void |
setTextRectProp(int left,
int top,
int width,
int height)
Sets the properties of the current text rectangle. |
void |
startCell(int rowSpan,
int colSpan)
|
void |
startLine()
Starts a new line. |
void |
startRow()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EOL
public static final String TAB
Constructor Detail |
---|
public MifBook(org.apache.commons.logging.Log logger)
logger
- The logger to use for user messages.Method Detail |
---|
public static final String mifEncode(String val)
val
- The unencoded String.
public void createPage()
createPage
in interface org.axsl.mif.MifBook
public void addToStream(String s)
s
- The String to add to the output.public void output(OutputStream stream) throws org.axsl.output.OutputException
output
in interface org.axsl.mif.MifBook
org.axsl.output.OutputException
public void setDocumentHeightWidth(int height, int width)
setDocumentHeightWidth
in interface org.axsl.mif.MifBook
public void createTextRect(int numCols)
numCols
- The number of columns in the new rectangle.public void setTextRectProp(int left, int top, int width, int height)
left
- The x coordinate, in millipoints (??).top
- The y coordinate, in millipoints (??).width
- The width, in millipoints (??).height
- The height, in millipoints (??).public void startLine()
public void setBlockProp(int startIndent, int endIndent)
setBlockProp
in interface org.axsl.mif.MifBook
public void createFrame(int x, int y, int w, int h)
x
- The x coordinate, in millipoints (??).y
- The y coordinate, in millipoints (??).w
- The width, in millipoints (??).h
- The height, in millipoints (??).public void addImage(String url, int x, int y, int w, int h)
url
- The URL to the image content.x
- The x coordinate, in millipoints (??).y
- The y coordinate, in millipoints (??).w
- The width, in millipoints (??).h
- The height, in millipoints (??).public void createTable()
createTable
in interface org.axsl.mif.MifBook
public void setColumnProp(int colWidth)
colWidth
- The width of the new column.public void setCurrent(String current)
setCurrent
in interface org.axsl.mif.MifBook
public void startRow()
startRow
in interface org.axsl.mif.MifBook
public void startCell(int rowSpan, int colSpan)
startCell
in interface org.axsl.mif.MifBook
public void endTable()
public int getNewId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |