public class IlvPrintUtil extends Object
Modifier and Type | Field and Description |
---|---|
static RenderingHints.Key |
KEY_PRINTING
You can use this
RenderingHints.Key to mark your
Graphics2D instances as currently printing a document. |
static RenderingHints.Key |
KEY_PRINTING_TRANSFORM
You can use this
RenderingHints.Key to put on your
Graphics2D the additional AffineTransform
instance used by your printing system. |
static Object |
VALUE_PRINT_OFF
Setting this value for the
KEY_PRINTING hint on your
Graphics2D will mark it as not being used anymore for
printing. |
static Object |
VALUE_PRINT_ON
Setting this value for the
KEY_PRINTING hint on your
Graphics2D will mark it as being used for printing. |
Modifier and Type | Method and Description |
---|---|
static boolean |
isEnabledJNLPPrintingSupport()
Returns
true if JNLP support is enabled, and returns
false otherwise. |
static boolean |
isNativePrintDialog()
Returns true if the native print dialog is favored over the Swing
cross-platform print dialog.
|
static void |
setEnabledJNLPPrintingSupport(boolean enable)
Enables or disables the JNLP print support.
|
static void |
setNativePrintDialog(boolean force)
Sets whether to use a native print dialog instead of the Swing
cross-platform print dialog.
|
public static final RenderingHints.Key KEY_PRINTING
RenderingHints.Key
to mark your
Graphics2D
instances as currently printing a document.VALUE_PRINT_ON
,
VALUE_PRINT_OFF
public static final Object VALUE_PRINT_ON
KEY_PRINTING
hint on your
Graphics2D
will mark it as being used for printing.public static final Object VALUE_PRINT_OFF
KEY_PRINTING
hint on your
Graphics2D
will mark it as not being used anymore for
printing.public static final RenderingHints.Key KEY_PRINTING_TRANSFORM
RenderingHints.Key
to put on your
Graphics2D
the additional AffineTransform
instance used by your printing system.public static void setEnabledJNLPPrintingSupport(boolean enable)
enable
- If false
then the JNLP printing support will not be
activated even if the service is available.public static boolean isEnabledJNLPPrintingSupport()
true
if JNLP support is enabled, and returns
false
otherwise.
Note that this does not test whether the JNLP support is available but just tests for whether the JNLP support will be enabled if the JNLP print service is available.
public static void setNativePrintDialog(boolean force)
The cross-platform print dialog has the following advantages:
The native print dialog has the advantage that it may offer to customize printer properties that the cross-platform dialog does not offer.
A choice between both kinds of dialogs has to be made, because of Sun bug #4673406.
The cross-platform print dialog is the default.
force
- true
if the native print dialog should be used.isNativePrintDialog()
public static boolean isNativePrintDialog()
setNativePrintDialog(boolean)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.