|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqat.gui.PrintManager
Constructor Summary | |
PrintManager(java.lang.String printJobTitle,
javax.swing.JFrame f)
|
Method Summary | |
void |
endPrint()
This function must be called to end the print job correctly. |
static java.lang.String |
fill(char c,
int len)
|
boolean |
getBorder()
|
java.awt.Color |
getColor()
This function returns the color text is currently being printed in |
java.awt.Font |
getFont()
|
int |
getFontSize()
|
int |
getFontStyle()
|
java.awt.Graphics |
getGraphics()
This function returns the Graphics object of the current page, to allow direct manipulation or printing onto the printer canvas |
int |
getPageHeight()
|
int |
getPageNumber()
|
int |
getPageWidth()
|
boolean |
getWrap()
|
void |
newLine()
This prints a blank line |
void |
newPage()
This function generates a new page, and sends the previous one to the printer. |
static java.lang.String |
padLeft(java.lang.String s,
char c,
int len)
|
static java.lang.String |
padRight(java.lang.String s,
char c,
int len)
|
void |
print(int x,
int y,
java.lang.String s)
This function prints the string s at the co-ord (x,y). |
void |
print(java.lang.String s)
This function prints text, continuing from position of the last text printed. |
void |
printHeader()
|
void |
printLine(char c)
|
void |
println(java.lang.String s)
This writes out the string s at the current position, and then positions output to start on the next line. |
void |
setBorder(boolean val)
This function prints a border around the current page |
void |
setColor(java.awt.Color c)
This functions sets the color of the text to print |
void |
setFont(java.awt.Font f)
This method sets the font used to print the text. |
void |
setFontSize(int size)
|
void |
setFontStyle(int style)
|
void |
setHeader(java.lang.String h)
|
void |
setHeader(java.lang.String[] h)
|
void |
setWrap(boolean wrap)
This function sets whether text too long for the current line is wrapped or not |
boolean |
startPrint()
Returns true if the print is Okayed by the user, else if user selected cancel, this function returns false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PrintManager(java.lang.String printJobTitle, javax.swing.JFrame f)
Method Detail |
public void println(java.lang.String s)
public void print(java.lang.String s)
public void print(int x, int y, java.lang.String s)
public void setBorder(boolean val)
public boolean getBorder()
public void setWrap(boolean wrap)
public boolean getWrap()
public void newLine()
public void newPage()
public void printHeader()
public void printLine(char c)
public void setHeader(java.lang.String[] h)
public void setHeader(java.lang.String h)
public static java.lang.String fill(char c, int len)
public static java.lang.String padRight(java.lang.String s, char c, int len)
public static java.lang.String padLeft(java.lang.String s, char c, int len)
public boolean startPrint()
public void endPrint()
public void setColor(java.awt.Color c)
public java.awt.Color getColor()
public void setFont(java.awt.Font f)
public java.awt.Font getFont()
public void setFontStyle(int style)
public int getFontStyle()
public void setFontSize(int size)
public int getFontSize()
public int getPageNumber()
public int getPageHeight()
public int getPageWidth()
public java.awt.Graphics getGraphics()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |