|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javawisdom.util.print.JPrinter
Field Summary | |
static int |
A2_Envelop
A2 Envelop (4.38 x 5.75 in.) |
static int |
A3
A3 (297 x 420 mm) |
static int |
A4
A4 (210 x 297 mm) |
static int |
A5
A5 (148 x 210 mm) |
static int |
A6_Card
A6 Card (105 x 148.5 mm) |
static int |
B5_JIS
B5(JIS) (182 x 257 mm) |
static int |
C6_Envelop
C6 Envelop (114 x 162 mm)") |
static java.lang.String |
CURRENT_DATE
Current date. |
static java.lang.String |
CURRENT_TIME
Displays the current time. |
static int |
CUSTOM
The paper type CUSTOM |
static java.lang.String |
DateTime
DateTime |
static int |
DL_Envelop
DL Envelop (220 x 110 mm) |
static int |
Envelop_10
10# Envelop (4.125 x 9.5 in.) |
static int |
Executive
Executive (7.25 x 10.5 in.) |
static int |
Index_Card
Index Card (4 x 6 in.) |
static int |
Index_Card2
Index Card (5 x 8 in.) |
static int |
Invite_Envelop
Invite Envelop (220 x 220 mm) |
static int |
Italy_Envelop
Italy Envelop (110 x 230 mm) |
static int |
JP_Card
JP Card (100 x 148 mm) |
static int |
LANDSCAPE
The orientation of page |
static int |
Ledger
Ledger (11 x 17 in.) |
static int |
Legal
Legal (8.5 x 14 in.) |
static int |
Letter
Letter (8.5 x 11 in.) |
static java.lang.String |
PAGE_NO
Current page number PAGE_NO |
static int |
PORTRAIT
The orientation of page |
static int |
Tabloid
Tabloid (17 x 11 in.) |
static java.lang.String |
TOTAL_PAGES
Total pages. |
Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
JPrinter()
Default constructor |
Method Summary | |
void |
addPrinterListener(com.javawisdom.util.print.PrinterListener printerlistener)
|
double |
getBottomMargin()
Returns the value of the bottom margin |
int |
getBufferSize()
Returns the whole buffer size which the printer job will take place |
java.lang.String |
getCenterFooter()
|
java.lang.String |
getCenterHeader()
Returns the value of the center header |
double |
getFactPageHeight()
Returns the value of the in fact page height |
double |
getFactPageWidth()
Returns the value of the page width |
double |
getGapAboveFooter()
Returns the value of gap above footer |
double |
getGapBelowHeader()
Returns the value of the gap below the header |
double |
getImageablePaperHeight()
|
double |
getImageablePaperWidth()
|
java.lang.String |
getLeftFooter()
Returns the left footer |
java.lang.String |
getLeftHeader()
Returns the value of the left header |
double |
getLeftMargin()
Returns the value of the left margin |
int |
getNoOfCopies()
|
int |
getNoOfPages()
|
int |
getPageOrientation()
|
double |
getPaperHeight()
Returns the value of the page height |
double |
getPaperWidth()
Returns the value of the page width |
int |
getPapeType()
|
java.lang.String |
getPort()
Returns the printer port |
java.awt.Dimension |
getPreferredSize()
|
java.lang.String |
getPrintJobName()
Returns the print job name |
java.lang.String |
getRightFooter()
Returns the value of the roght footer |
java.lang.String |
getRightHeader()
Returns the value of the right header |
double |
getRightMargin()
|
double |
getTopMargin()
Returuns the value of the top margin |
boolean |
isPrintDirect()
|
boolean |
isShowLineAboveFooter()
Returns the flag which indicates whether shows line above footer or not |
boolean |
isShowLineBelowHeader()
Returns whether shows line below header |
boolean |
isShowPrintDialog()
Returns whether shows print dialog or noe |
boolean |
isSinglePage()
Returns Whether the component will be printed in a single page or mot |
void |
pageSetup()
To set up the page |
void |
pageSetup(java.awt.Frame frame)
Sets up print page |
void |
preview()
Preview the printing page(s) |
void |
preview(java.awt.Frame frame)
Displays the preview dialog |
void |
print()
Call this method to execute the printing job |
void |
print(byte[] abyte0)
Reads the contents of bytes array and send it to the printer for print outs. |
void |
print(byte[] bytes,
java.lang.String port)
Reads the contents of bytes array and send it to the specified printer port for print outs. |
void |
print(java.io.FileInputStream fileinputstream)
Reads the contents from FileInputStream and send it to the printer for print outs. |
void |
print(java.io.FileInputStream fileinputstream,
java.lang.String port)
Reads the contents from FileInputStream and send it to the specified printer port for print outs. |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pageformat,
int pageindex)
Prints the page at the specified index into the specified Graphics context in the specified format |
void |
print(int pageIndex)
Prints the page at the specified page index |
void |
print(int startpageIndex,
int endpageIndex)
Prints the pages from startPageIndex(inclusive) to the endPageIndex(inclusive) |
void |
setAWTTextArea(java.awt.TextArea textarea)
Sets the AWTTextArea |
void |
setBottomMargin(double bMargin)
|
void |
setBufferSize(int size)
|
void |
setCenterFooter(java.lang.String centerfooter)
Sets the value of the center footer |
void |
setCenterHeader(java.lang.String header)
Sets the value of the center header |
void |
setComponent(java.awt.Component ct)
Sets the component |
void |
setGapAboveFooter(double gap)
Sets the value of the gap above footer |
void |
setGapBelowHeader(double gapbelowHeader)
Sets the value of gap below header of the page |
void |
setJTable(javax.swing.JTable jtable)
Sets hte jtable |
void |
setJTextArea(javax.swing.JTextArea jtextarea)
Sets the JTextArea |
void |
setJTextPane(javax.swing.JTextPane jtextpane)
Sets the JtestPane |
void |
setLeftFooter(java.lang.String leftfooter)
Sets the left footer |
void |
setLeftHeader(java.lang.String leftheader)
Sets the value of left header |
void |
setLeftMargin(double leftmargin)
Sets the value of the left margin |
void |
setNoOfCopies(int copies)
Sets how many copies to print |
void |
setPageOrientation(int i)
Sets the the page orientation |
void |
setPaperSize(double width,
double height)
Sets the pape size |
void |
setPapeType(int pageType)
Sets the value of pape type property |
void |
setPort(java.lang.String font)
|
void |
setPrintDirect(boolean flag)
|
void |
setPrintJobName(java.lang.String printjobname)
|
void |
setRightFooter(java.lang.String rightfooter)
Sets the value of the right footer |
void |
setRightHeader(java.lang.String rightheader)
Sets the value of the right header |
void |
setRightMargin(double rightmargin)
Sets the value of the right margin |
void |
setShowLineAboveFooter(boolean flag)
|
void |
setShowLineBelowHeader(boolean flag)
|
void |
setShowPrintDialog(boolean flag)
|
void |
setSinglePage(boolean flag)
|
void |
setTopMargin(double topmargin)
Sets the value of the top margin |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int A3
public static int A4
public static int A5
public static int B5_JIS
public static int Letter
public static int Legal
public static int Ledger
public static int Tabloid
public static int Executive
public static int Invite_Envelop
public static int Italy_Envelop
public static int Envelop_10
public static int A2_Envelop
public static int DL_Envelop
public static int C6_Envelop
public static int Index_Card
public static int Index_Card2
public static int JP_Card
public static int A6_Card
public static int CUSTOM
CUSTOM
public static java.lang.String CURRENT_TIME
public static java.lang.String TOTAL_PAGES
public static java.lang.String PAGE_NO
PAGE_NO
public static java.lang.String CURRENT_DATE
public static java.lang.String DateTime
DateTime
public static int PORTRAIT
public static int LANDSCAPE
Constructor Detail |
public JPrinter()
Method Detail |
public java.lang.String getLeftFooter()
public boolean isShowLineBelowHeader()
public boolean isShowPrintDialog()
public double getGapAboveFooter()
public void print(byte[] bytes, java.lang.String port)
bytes
- The specified bytes arrayport
- The specified printer portpublic void setLeftFooter(java.lang.String leftfooter)
leftfooter
- The left footerpublic void setGapBelowHeader(double gapbelowHeader)
gapbelowHeader
- The gap below headerpublic void setJTable(javax.swing.JTable jtable)
jtable
- The jtablepublic void preview(java.awt.Frame frame)
frame
- The framepublic boolean isShowLineAboveFooter()
public void setTopMargin(double topmargin)
topmargin
- The value of the top marginpublic void setJTextPane(javax.swing.JTextPane jtextpane)
jtextpane
- The JTextPanepublic void setNoOfCopies(int copies)
copies
- The No of Copiespublic void setLeftHeader(java.lang.String leftheader)
leftheader
- The left headerpublic java.lang.String getCenterHeader()
public void setShowLineBelowHeader(boolean flag)
flag
- Whether shows line below header or notpublic void setRightFooter(java.lang.String rightfooter)
rightfooter
- The right footerpublic void setCenterFooter(java.lang.String centerfooter)
centerfooter
- The center footerpublic boolean isSinglePage()
public void setBufferSize(int size)
size
- The Buffer sizepublic void setBottomMargin(double bMargin)
bMargin
- The value of the bottom marginpublic int getNoOfPages()
public void print(java.io.FileInputStream fileinputstream, java.lang.String port)
fileinputstream
- The file input streamport
- The port printpublic java.lang.String getCenterFooter()
public void setCenterHeader(java.lang.String header)
header
- The value of the center headerpublic void setGapAboveFooter(double gap)
gap
- The
value of thegap above footerpublic void print(int pageIndex)
pageIndex
- the page indexpublic int getBufferSize()
public void setPrintJobName(java.lang.String printjobname)
printjobname
- The print job namepublic void setRightHeader(java.lang.String rightheader)
rightheader
- The value of the right headerpublic void setLeftMargin(double leftmargin)
leftmargin
- The value of the eft marginpublic void setJTextArea(javax.swing.JTextArea jtextarea)
jtextarea
- The JtextAreapublic void addPrinterListener(com.javawisdom.util.print.PrinterListener printerlistener)
printerlistener
- The printlistenerpublic void preview()
public double getPaperHeight()
public java.lang.String getPort()
public double getPaperWidth()
public void pageSetup()
public void setRightMargin(double rightmargin)
rightmargin
- The value of the right marginpublic int print(java.awt.Graphics g, java.awt.print.PageFormat pageformat, int pageindex)
print
in interface java.awt.print.Printable
g
- The graphicspageformat
- The page formatpageindex
- The page indexpublic void setAWTTextArea(java.awt.TextArea textarea)
textarea
- The text areapublic double getFactPageHeight()
public int getPapeType()
public void setShowLineAboveFooter(boolean flag)
flag
- Whether shows line above footerpublic double getRightMargin()
public int getNoOfCopies()
public void setComponent(java.awt.Component ct)
ct
- The componentpublic void print(int startpageIndex, int endpageIndex)
startpageIndex
- The start Page IndexendpageIndex
- The end Page Indexpublic void setSinglePage(boolean flag)
flag
- Whether to be a single page or notpublic void setPapeType(int pageType)
pageType
- public void setPrintDirect(boolean flag)
flag
- Whether to print directly or notpublic java.lang.String getRightHeader()
public double getImageablePaperWidth()
public void print(java.io.FileInputStream fileinputstream)
fileinputstream
- The specified FileInputStreampublic void print(byte[] abyte0)
abyte0
- The specified bytes arrypublic void pageSetup(java.awt.Frame frame)
frame
- The framepublic boolean isPrintDirect()
public void setPaperSize(double width, double height)
width
- The page widthheight
- The page height public java.lang.String getPrintJobName()
public double getBottomMargin()
public void setShowPrintDialog(boolean flag)
flag
- Whether shows dialog or notpublic void setPageOrientation(int i)
i
- The page orientationpublic double getTopMargin()
public double getLeftMargin()
public java.lang.String getRightFooter()
public double getImageablePaperHeight()
public java.lang.String getLeftHeader()
public double getFactPageWidth()
public int getPageOrientation()
public void print()
public java.awt.Dimension getPreferredSize()
public void setPort(java.lang.String font)
font
- The type of fontpublic double getGapBelowHeader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |