public class TLcdPrintComponentAction extends ALcdAction implements ILcdAction
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.TLcdComponentPrintable
,
Serialized FormchangeSupport
DEFAULT, LONG_DESCRIPTION, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, VISIBLE
Constructor and Description |
---|
TLcdPrintComponentAction()
Creates a new
TLcdPrintComponentAction without an initial
Component . |
TLcdPrintComponentAction(Component aComponent)
Creates a new
TLcdPrintComponentAction for a given initial
Component . |
TLcdPrintComponentAction(Component aComponent,
PrinterJob aPrinterJob,
PageFormat aPageFormat)
Creates a Print action with a component to print
and a specified PageFormat on the printed page.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent aActionEvent) |
boolean |
getBorder()
Returns whether a border is drawn around the component.
|
Component |
getComponent()
Returns the component to be printed.
|
boolean |
getCropMarks()
Returns whether crop marks are drawn on multi-page prints.
|
boolean |
getForceLayeredRendering()
Returns whether layered rendering is forced.
|
boolean |
getLayeredRendering()
Returns whether layered rendering is enabled.
|
Point |
getOrigin()
Returns the origin of the component on the page.
|
PageFormat |
getPageFormat()
Return the page format.
|
boolean |
getPositioningMarks()
Returns whether positioning marks are drawn on multi-page prints.
|
PrinterJob |
getPrinterJob()
Returns the printer job.
|
int |
getRasterizedLayerMaximumStripSize()
Returns the maximum number of pixels in a strip of the rasterized layer.
|
double |
getRasterizedLayerQualityFactor()
Returns the quality factor for the rasterized layer.
|
boolean |
getRasterizedRendering()
Returns whether rasterized rendering is enabled.
|
double |
getScale()
Returns the scale of the component on the page.
|
void |
setBorder(boolean aBorder)
Specifies whether to draw a border around the component.
|
void |
setComponent(Component aComponent)
Sets the component to be printed.
|
void |
setCropMarks(boolean aCropMarks)
Specifies whether to draw crop marks on multi-page prints.
|
void |
setForceLayeredRendering(boolean aForceLayeredRendering)
Specifies whether to force layered rendering, rather than only using it
when necessary.
|
void |
setLayeredRendering(boolean aLayeredRendering)
Specifies whether to use layered rendering, when necessary.
|
void |
setOrigin(Point aOrigin)
Sets the origin of the component on the page.
|
void |
setPageFormat(PageFormat aPageFormat)
Sets the page format.
|
void |
setPositioningMarks(boolean aPositioningMarks)
Specifies whether to draw positioning marks on multi-page prints.
|
void |
setPrinterJob(PrinterJob aPrinterJob)
Sets the printer job.
|
void |
setRasterizedLayerMaximumStripSize(int aRasterizedLayerMaximumStripSize)
Sets the maximum number of pixels in a strip of the rasterized layer.
|
void |
setRasterizedLayerQualityFactor(double aRasterizedLayerQualityFactor)
Sets the quality factor for the rasterized layer.
|
void |
setRasterizedRendering(boolean aRasterizedRendering)
Specifies whether to use rasterized rendering, when necessary.
|
void |
setScale(double aScale)
Sets the scale of the component on the page.
|
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, isTraceOn, putValue, registerInstance, removePropertyChangeListener, setClassTraceOn, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription, setTraceOn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValue, isEnabled, putValue, setEnabled
addPropertyChangeListener, removePropertyChangeListener
public TLcdPrintComponentAction()
TLcdPrintComponentAction
without an initial
Component
.public TLcdPrintComponentAction(Component aComponent)
TLcdPrintComponentAction
for a given initial
Component
.aComponent
- the component to be printed.public TLcdPrintComponentAction(Component aComponent, PrinterJob aPrinterJob, PageFormat aPageFormat)
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.public void setPrinterJob(PrinterJob aPrinterJob)
public PrinterJob getPrinterJob()
public void setPageFormat(PageFormat aPageFormat)
public PageFormat getPageFormat()
public void setComponent(Component aComponent)
public Component getComponent()
setComponent(Component)
public void setOrigin(Point aOrigin)
null
, meaning that the component is automatically centered
on the page.public Point getOrigin()
setOrigin(Point)
public void setScale(double aScale)
public double getScale()
setScale(double)
public void setBorder(boolean aBorder)
true
.public boolean getBorder()
public void setCropMarks(boolean aCropMarks)
true
.public boolean getCropMarks()
public void setPositioningMarks(boolean aPositioningMarks)
true
.public boolean getPositioningMarks()
public void setRasterizedRendering(boolean aRasterizedRendering)
public boolean getRasterizedRendering()
setRasterizedRendering(boolean)
public void setLayeredRendering(boolean aLayeredRendering)
public boolean getLayeredRendering()
setLayeredRendering(boolean)
public void setForceLayeredRendering(boolean aForceLayeredRendering)
public boolean getForceLayeredRendering()
setForceLayeredRendering(boolean)
public void setRasterizedLayerQualityFactor(double aRasterizedLayerQualityFactor)
public double getRasterizedLayerQualityFactor()
setRasterizedLayerQualityFactor(double)
public void setRasterizedLayerMaximumStripSize(int aRasterizedLayerMaximumStripSize)
public int getRasterizedLayerMaximumStripSize()
setRasterizedLayerMaximumStripSize(int)
public void actionPerformed(ActionEvent aActionEvent)
actionPerformed
in interface ActionListener