|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.Printer
public final class Printer
Provides access to the Printer object.
The Printer Class provides important and very helpful properties to print the chart. Using the supported members, you will have control over the margins, paper orientation, color or pattern printing, among others. The supported methods will also allow you to prompt the user with page setup, preview, and print dialogs to ensure the user prints exactly what they want
Constructor Summary | |
---|---|
Printer()
|
Method Summary | |
---|---|
java.awt.Rectangle |
getMargins()
Gets the Margins. |
int |
getOrientation()
Gets the Orientation. |
boolean |
isCompress()
Gets the Compress. |
boolean |
isDrawBackground()
Gets the DrawBackground. |
boolean |
isForceColors()
Gets the ForceColors. |
boolean |
isUsePrinterResolution()
Gets the UsePrinterResolution. |
void |
setCompress(boolean value)
Forces Chart FX to print the chart in one page regardless of scrolling. |
void |
setDrawBackground(boolean value)
Used to instruct Chart FX to include the Background when printing a chart. |
void |
setForceColors(boolean value)
Allows you to force color printing (matching) even when the printer is B&W. |
void |
setMargins(java.awt.Rectangle value)
Gets or sets the margins, in hundredths of an inch. |
void |
setOrientation(int value)
Allows you to select a paper orientation when printing charts. |
void |
setUsePrinterResolution(boolean value)
Forces the printer to use maximum resolution when printing charts. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Printer()
Method Detail |
---|
public java.awt.Rectangle getMargins()
Gets the Margins. For more detail see setMargins(java.awt.Rectangle)
.
public int getOrientation()
Gets the Orientation. For more detail see setOrientation(int)
.
public boolean isCompress()
Gets the Compress. For more detail see setCompress(boolean)
.
public boolean isDrawBackground()
Gets the DrawBackground. For more detail see setDrawBackground(boolean)
.
public boolean isForceColors()
Gets the ForceColors. For more detail see setForceColors(boolean)
.
public boolean isUsePrinterResolution()
Gets the UsePrinterResolution. For more detail see setUsePrinterResolution(boolean)
.
public void setCompress(boolean value)
Forces Chart FX to print the chart in one page regardless of scrolling.
When you have a chart with a large number of points (Scrollable) and you print that chart. Chart FX will print as many pages as necessary. This property forces ChartFX to print the chart in just one page by recalculating the appropriate values so all the points can be fixed in one page. Please note the printed chart may have a different look if you set this property to True.ChartCore.setSerLegBox(boolean)
ChartCore.setLegendBox(boolean)
setMargins(java.awt.Rectangle)
,
setUsePrinterResolution(boolean)
public void setDrawBackground(boolean value)
Used to instruct Chart FX to include the Background when printing a chart.
By default, the background is not included with a printed chart. Setting this property to True instructs Chart FX to include the background.
Chart
public void setForceColors(boolean value)
Allows you to force color printing (matching) even when the printer is B&W.
The default setting of this property is False. This means, Chart FX will automatically print hatched B&W patterns when the printer does not support colors, this will improve the chart's readability when printed.
This behavior is particularly useful, as you don't need to preset specific patterns to the series if the target printer is a B&W printer. Chart FX will automatically print in colors if the target printer is a color printer.
When this property is set to True and the target printer is a B&W printer, the printer driver will match the chart colors to a specific grayscale pattern (not hatched). In some cases, the results are not desirable and will make the chart print out impossible to read. ChartCore.setLegendBox(boolean)
ChartCore.setSerLegBox(boolean)
setUsePrinterResolution(boolean)
public void setMargins(java.awt.Rectangle value)
Gets or sets the margins, in hundredths of an inch.
The Margins property is set in hundredths of an inch, therefore, if you set this property to 100 the corresponding margin will be set to one inch.
For more information regarding the Printing type, please refer to the Java API Documentation.
setOrientation(int)
,
setForceColors(boolean)
public void setOrientation(int value)
Allows you to select a paper orientation when printing charts.
Orientation :
Sets the page orientation for printing.Value | Description |
---|---|
Orientation.DEFAULT | Default printer orientation. |
Orientation.PORTRAIT | Prints using portrait orientation. |
Orientation.LANDSCAPE | Prints using landscape orientation. |
The setCompress(boolean)
property will force the chart to fit to one page, then you may assign the Landscape or Portrait orientations.
You can assign custom margins for printing using the setMargins(java.awt.Rectangle)
property.
setCompress(boolean)
,
setMargins(java.awt.Rectangle)
public void setUsePrinterResolution(boolean value)
Forces the printer to use maximum resolution when printing charts.
When set to True, this property will instruct Chart FX to use the maximum printer resolution to print charts. When the maximum printer resolution is used (For example, in 600dpi printer) the lines width and border width will appear thinner as the printer resolution is greater than the screen resolution.
When set to False, Chart FX will scale the chart using the same screen proportions to print the charts and the printed chart will look exactly the same (line width) as in the screen.
If this property is set to False and you are using Non True Type Fonts, this property may have an effect on how the printed charts appear.
You can set this property just before printing or anywhere in the code. For example, you may disable this property (False) in the Form Load event and when the chart is sent to printer it will take this setting.
Please note this property may be affected by settings in the Windows Printer driver. For example, if you have a 600 dpi printer set up to print at 300 dpi resolution, Chart FX will use the 300 dpi setting.
setForceColors(boolean)
,
setOrientation(int)
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |