Package org.xhtmlrenderer.swt
Class PrinterRenderer
java.lang.Object
org.xhtmlrenderer.swt.PrinterRenderer
- All Implemented Interfaces:
UserInterface
A renderer for an SWT Printer. Instances must be disposed with
dispose()
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.eclipse.swt.printing.Printer
private final SharedContext
-
Constructor Summary
ConstructorsConstructorDescriptionPrinterRenderer
(org.eclipse.swt.printing.Printer printer) PrinterRenderer
(org.eclipse.swt.printing.Printer printer, UserAgentCallback uac) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose resources.boolean
Gets the active attribute of the UserInterface objectboolean
Gets the focus attribute of the UserInterface objectboolean
Gets the hover attribute of the UserInterface objectprotected @Nullable Document
loadDocument
(String uri) protected LayoutContext
newLayoutcontext
(org.eclipse.swt.graphics.GC gc) protected RenderingContext
newRenderingContext
(org.eclipse.swt.graphics.GC gc) void
print
(String url, NamespaceHandler nsh, String jobName, int startPage, int endPage) static void
print
(org.eclipse.swt.printing.PrinterData printerData, String url, NamespaceHandler nsh, String jobName) static void
print
(org.eclipse.swt.printing.PrinterData printerData, Document doc, String url, NamespaceHandler nsh, String jobName) static void
print
(org.eclipse.swt.printing.Printer printer, String url, NamespaceHandler nsh, String jobName, int startPage, int endPage) static void
print
(org.eclipse.swt.printing.Printer printer, Document doc, String url, NamespaceHandler nsh, String jobName, int startPage, int endPage) void
print
(Document doc, String url, NamespaceHandler nsh, String jobName, int startPage, int endPage) static void
printDialog
(org.eclipse.swt.widgets.Shell shell, String url, NamespaceHandler nsh, String jobName) static void
printDialog
(org.eclipse.swt.widgets.Shell shell, Document doc, String url, NamespaceHandler nsh, String jobName)
-
Field Details
-
_printer
private final org.eclipse.swt.printing.Printer _printer
-
-
Constructor Details
-
PrinterRenderer
public PrinterRenderer(org.eclipse.swt.printing.Printer printer) -
PrinterRenderer
-
-
Method Details
-
dispose
public void dispose()Dispose resources. This does NOT dispose the attachedPrinter
. -
newLayoutcontext
- Returns:
- a new
LayoutContext
-
newRenderingContext
-
print
public void print(Document doc, String url, NamespaceHandler nsh, String jobName, int startPage, int endPage) -
print
-
loadDocument
-
isActive
Description copied from interface:UserInterface
Gets the active attribute of the UserInterface object- Specified by:
isActive
in interfaceUserInterface
- Parameters:
e
- PARAM- Returns:
- The active value
-
isFocus
Description copied from interface:UserInterface
Gets the focus attribute of the UserInterface object- Specified by:
isFocus
in interfaceUserInterface
- Parameters:
e
- PARAM- Returns:
- The focus value
-
isHover
Description copied from interface:UserInterface
Gets the hover attribute of the UserInterface object- Specified by:
isHover
in interfaceUserInterface
- Parameters:
e
- PARAM- Returns:
- The hover value
-
print
public static void print(org.eclipse.swt.printing.Printer printer, Document doc, String url, NamespaceHandler nsh, String jobName, int startPage, int endPage) -
print
public static void print(org.eclipse.swt.printing.Printer printer, String url, NamespaceHandler nsh, String jobName, int startPage, int endPage) -
print
public static void print(org.eclipse.swt.printing.PrinterData printerData, Document doc, String url, NamespaceHandler nsh, String jobName) -
print
public static void print(org.eclipse.swt.printing.PrinterData printerData, String url, NamespaceHandler nsh, String jobName) -
printDialog
public static void printDialog(org.eclipse.swt.widgets.Shell shell, Document doc, String url, NamespaceHandler nsh, String jobName) -
printDialog
public static void printDialog(org.eclipse.swt.widgets.Shell shell, String url, NamespaceHandler nsh, String jobName)
-