Class TLcdPrintComponentAction

java.lang.Object
com.luciad.gui.ALcdAction
com.luciad.gui.TLcdPrintComponentAction
All Implemented Interfaces:
ILcdAction, ILcdPropertyChangeSource, ActionListener, Serializable, EventListener

public class TLcdPrintComponentAction extends ALcdAction implements ILcdAction
This ILcdAction prints the contents of a given Component. If the printer and page format aren't specified, the user is presented with menus to select them.
See Also:
  • Constructor Details

    • TLcdPrintComponentAction

      public TLcdPrintComponentAction()
      Creates a new TLcdPrintComponentAction without an initial Component.
    • TLcdPrintComponentAction

      public TLcdPrintComponentAction(Component aComponent)
      Creates a new TLcdPrintComponentAction for a given initial Component.
      Parameters:
      aComponent - the component to be printed.
    • TLcdPrintComponentAction

      public TLcdPrintComponentAction(Component aComponent, PrinterJob aPrinterJob, PageFormat aPageFormat)
      Creates a Print action with a component to print and a specified PageFormat on the printed page.
      Parameters:
      aComponent - the component to be printed.
      aPrinterJob - the printer to be used, or null to let the user select one.
      aPageFormat - the page format to be used, or null to let the user select one.
  • Method Details

    • setPrinterJob

      public void setPrinterJob(PrinterJob aPrinterJob)
      Sets the printer job.
    • getPrinterJob

      public PrinterJob getPrinterJob()
      Returns the printer job.
    • setPageFormat

      public void setPageFormat(PageFormat aPageFormat)
      Sets the page format.
    • getPageFormat

      public PageFormat getPageFormat()
      Return the page format.
    • setComponent

      public void setComponent(Component aComponent)
      Sets the component to be printed.
    • getComponent

      public Component getComponent()
      Returns the component to be printed.
      See Also:
    • setOrigin

      public void setOrigin(Point aOrigin)
      Sets the origin of the component on the page. The default is null, meaning that the component is automatically centered on the page.
    • getOrigin

      public Point getOrigin()
      Returns the origin of the component on the page.
      See Also:
    • setScale

      public void setScale(double aScale)
      Sets the scale of the component on the page. A scale of 1.0 maps one unit of the component (a pixel) to one unit of the printer graphics (typically 1/72"). Larger scales increase the size of the component on the print, smaller scales decrease the size. A value of 0.0 automatically scales the component so that it fits on the imageable part of the paper. This is also the default.
    • getScale

      public double getScale()
      Returns the scale of the component on the page.
      See Also:
    • setBorder

      public void setBorder(boolean aBorder)
      Specifies whether to draw a border around the component. The default is true.
    • getBorder

      public boolean getBorder()
      Returns whether a border is drawn around the component.
    • setCropMarks

      public void setCropMarks(boolean aCropMarks)
      Specifies whether to draw crop marks on multi-page prints. The default is true.
    • getCropMarks

      public boolean getCropMarks()
      Returns whether crop marks are drawn on multi-page prints.
    • setPositioningMarks

      public void setPositioningMarks(boolean aPositioningMarks)
      Specifies whether to draw positioning marks on multi-page prints. The default is true.
    • getPositioningMarks

      public boolean getPositioningMarks()
      Returns whether positioning marks are drawn on multi-page prints.
    • setRasterizedRendering

      public void setRasterizedRendering(boolean aRasterizedRendering)
      Specifies whether to use rasterized rendering, when necessary. This technique improves memory usage of prints that contain transparent and translucent elements. Rasterized rendering is enabled by default.
    • getRasterizedRendering

      public boolean getRasterizedRendering()
      Returns whether rasterized rendering is enabled.
      See Also:
    • setLayeredRendering

      public void setLayeredRendering(boolean aLayeredRendering)
      Specifies whether to use layered rendering, when necessary. This technique improves memory usage and quality of prints that contain transparent and translucent elements. Layered rendering is enabled by default.
    • getLayeredRendering

      public boolean getLayeredRendering()
      Returns whether layered rendering is enabled.
      See Also:
    • setForceLayeredRendering

      public void setForceLayeredRendering(boolean aForceLayeredRendering)
      Specifies whether to force layered rendering, rather than only using it when necessary. While producing files that may be larger than strictly necessary, forcing layered rendering can be useful to avoid the possible small discrepancies between filled graphics as they are painted on the screen and as they are painted by the printer driver. More specifically, filled polygons or parts of polygons with zero thickness may look different on the screen and in print. Layered rendering is not forced by default.
    • getForceLayeredRendering

      public boolean getForceLayeredRendering()
      Returns whether layered rendering is forced.
      See Also:
    • setRasterizedLayerQualityFactor

      public void setRasterizedLayerQualityFactor(double aRasterizedLayerQualityFactor)
      Sets the quality factor for the rasterized layer. By default (with a factor of 1.0), when rasterization is required in the layered rendering technique, an image buffer the size of the component is created. Larger factors increase the width and height of the image buffer proportionally, increasing the quality of the rasterized layer. Of course, larger factors also increase the printing time and the size of the printer output file.
    • getRasterizedLayerQualityFactor

      public double getRasterizedLayerQualityFactor()
      Returns the quality factor for the rasterized layer.
      See Also:
    • setRasterizedLayerMaximumStripSize

      public void setRasterizedLayerMaximumStripSize(int aRasterizedLayerMaximumStripSize)
      Sets the maximum number of pixels in a strip of the rasterized layer. If the layered rendering technique performs rasterization, an image buffer with a size proportional to the size of the component is created. In order to reduce memory usage of the printing system, the full buffer can be replaced by small strips that are processed subsequently. A value of 0 indicates not to use strips. The default maximum number of pixels is 106.
    • getRasterizedLayerMaximumStripSize

      public int getRasterizedLayerMaximumStripSize()
      Returns the maximum number of pixels in a strip of the rasterized layer.
      See Also:
    • actionPerformed

      public void actionPerformed(ActionEvent aActionEvent)
      Specified by:
      actionPerformed in interface ActionListener