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 Link icon

    • TLcdPrintComponentAction Link icon

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

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

      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 Link icon

    • setPrinterJob Link icon

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

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

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

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

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

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

      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 Link icon

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

      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 Link icon

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

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

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

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

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

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

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

      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 Link icon

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

      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 Link icon

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

      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 Link icon

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

      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 Link icon

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

      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 Link icon

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

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