public class PrintChart
extends java.lang.Object
implements java.awt.print.Printable
Modifier and Type | Field and Description |
---|---|
static java.awt.print.PageFormat |
pgFormat
Stores the page format (landscape or portrait) chosen by User in EditPrefs.
|
static java.awt.Font |
printFont
The font to use for printing charts, which will be different from the
font used in the ChartPanel.
|
static java.awt.Font |
tinyFont |
Constructor and Description |
---|
PrintChart(javax.swing.JScrollPane js,
boolean whole)
Construct a PrintChart object ready for printing
|
Modifier and Type | Method and Description |
---|---|
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int page) |
void |
printTheChart()
Make sure this print request is valid, then print yourself, guided by
the settings in the static variables.
|
public static java.awt.Font printFont
public static java.awt.Font tinyFont
public static java.awt.print.PageFormat pgFormat
public PrintChart(javax.swing.JScrollPane js, boolean whole)
js
- the window pane to be printedwhole
- do we print the whole pane, or just the visible portion?public void printTheChart()
public int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int page) throws java.awt.print.PrinterException
print
in interface java.awt.print.Printable
java.awt.print.PrinterException