|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjsynoptic.base.PrintFormat
public class PrintFormat
A base class for printing synoptics. It manages 3 printing modes : to printer to file using postscript printing to image Paper size and orientation is taken into account for all these 3 modes
| Nested Class Summary | |
|---|---|
class |
PrintFormat.PrintException
Printing generic exception |
| Field Summary | |
|---|---|
protected static java.util.HashMap |
formatsMap
|
static int |
IMAGE_FILE_MODE
|
protected java.awt.print.PageFormat |
pageFormat
|
static int |
PRINTER_FILE_MODE
|
static int |
PRINTER_MODE
|
| Constructor Summary | |
|---|---|
PrintFormat()
Default prining context is A4 landscape |
|
| Method Summary | |
|---|---|
java.awt.print.PageFormat |
getFormat()
Get paper size |
java.lang.String[] |
getKnownPapers()
Get known papers |
void |
print(DiagramComponent comp,
int mode,
java.lang.String dest)
|
protected void |
printImage(java.io.File f,
DiagramComponent comp)
Printing to an image |
void |
printPrinter(javax.print.PrintService ps,
DiagramComponent comp)
Printing to a printer or a postscipt file |
boolean |
setOrientation(java.lang.String orientation)
Set paper orientation |
boolean |
setPaper(java.lang.String paperName)
Set paper name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.HashMap formatsMap
public static final int PRINTER_MODE
public static final int PRINTER_FILE_MODE
public static final int IMAGE_FILE_MODE
protected java.awt.print.PageFormat pageFormat
| Constructor Detail |
|---|
public PrintFormat()
| Method Detail |
|---|
public java.lang.String[] getKnownPapers()
public boolean setPaper(java.lang.String paperName)
paperName - (A4, A3, ...)
public boolean setOrientation(java.lang.String orientation)
orientation: - can be either a PORTRAIT, a LANDSCAPE or a REVERSE_LANDSCAPE
public java.awt.print.PageFormat getFormat()
public void print(DiagramComponent comp,
int mode,
java.lang.String dest)
throws PrintFormat.PrintException
comp - mode - dest -
PrintFormat.PrintException
public void printPrinter(javax.print.PrintService ps,
DiagramComponent comp)
throws PrintFormat.PrintException
ps - comp -
PrintFormat.PrintException
protected void printImage(java.io.File f,
DiagramComponent comp)
throws PrintFormat.PrintException,
java.io.IOException
f - comp -
PrintFormat.PrintException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||