Chart FX for Java 6.5

SoftwareFX.ChartFX
Class Printer

java.lang.Object
  extended by SoftwareFX.ChartFX.Printer

public final class Printer
extends java.lang.Object

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

Printer

public Printer()
Method Detail

getMargins

public java.awt.Rectangle getMargins()

Gets the Margins. For more detail see setMargins(java.awt.Rectangle).


getOrientation

public int getOrientation()

Gets the Orientation. For more detail see setOrientation(int).


isCompress

public boolean isCompress()

Gets the Compress. For more detail see setCompress(boolean).


isDrawBackground

public boolean isDrawBackground()

Gets the DrawBackground. For more detail see setDrawBackground(boolean).


isForceColors

public boolean isForceColors()

Gets the ForceColors. For more detail see setForceColors(boolean).


isUsePrinterResolution

public boolean isUsePrinterResolution()

Gets the UsePrinterResolution. For more detail see setUsePrinterResolution(boolean).


setCompress

public void setCompress(boolean value)

Forces Chart FX to print the chart in one page regardless of scrolling.

Remarks:
  • 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)

  • See Also:
    setMargins(java.awt.Rectangle), setUsePrinterResolution(boolean)

    setDrawBackground

    public void setDrawBackground(boolean value)

    Used to instruct Chart FX to include the Background when printing a chart.

    Remarks:
  • By default, the background is not included with a printed chart. Setting this property to True instructs Chart FX to include the background.

  • See Also:
    Chart

    setForceColors

    public void setForceColors(boolean value)

    Allows you to force color printing (matching) even when the printer is B&W.

    Remarks:
  • 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)

  • See Also:
    setUsePrinterResolution(boolean)

    setMargins

    public void setMargins(java.awt.Rectangle value)

    Gets or sets the margins, in hundredths of an inch.

    Remarks:
  • 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.

  • See Also:
    setOrientation(int), setForceColors(boolean)

    setOrientation

    public void setOrientation(int value)

    Allows you to select a paper orientation when printing charts.

    Values:
    Orientation : Sets the page orientation for printing.
    ValueDescription
    Orientation.DEFAULTDefault printer orientation.
    Orientation.PORTRAITPrints using portrait orientation.
    Orientation.LANDSCAPEPrints using landscape orientation.

    Remarks:
  • 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.

  • See Also:
    setCompress(boolean), setMargins(java.awt.Rectangle)

    setUsePrinterResolution

    public void setUsePrinterResolution(boolean value)

    Forces the printer to use maximum resolution when printing charts.

    Remarks:
  • 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.

  • See Also:
    setForceColors(boolean), setOrientation(int)

    http://www.softwarefx.com

    2007 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.