Class PrinterRenderer

java.lang.Object
org.xhtmlrenderer.swt.PrinterRenderer
All Implemented Interfaces:
UserInterface

public class PrinterRenderer extends Object implements UserInterface
A renderer for an SWT Printer. Instances must be disposed with dispose().
  • Field Details

    • _printer

      private final org.eclipse.swt.printing.Printer _printer
    • _sharedContext

      private final SharedContext _sharedContext
  • Constructor Details

    • PrinterRenderer

      public PrinterRenderer(org.eclipse.swt.printing.Printer printer)
    • PrinterRenderer

      public PrinterRenderer(org.eclipse.swt.printing.Printer printer, UserAgentCallback uac)
  • Method Details

    • dispose

      public void dispose()
      Dispose resources. This does NOT dispose the attached Printer.
    • newLayoutcontext

      protected LayoutContext newLayoutcontext(org.eclipse.swt.graphics.GC gc)
      Returns:
      a new LayoutContext
    • newRenderingContext

      protected RenderingContext newRenderingContext(org.eclipse.swt.graphics.GC gc)
    • print

      public void print(Document doc, String url, NamespaceHandler nsh, String jobName, int startPage, int endPage)
    • print

      public void print(String url, NamespaceHandler nsh, String jobName, int startPage, int endPage)
    • loadDocument

      protected @Nullable Document loadDocument(String uri)
    • isActive

      public boolean isActive(Element e)
      Description copied from interface: UserInterface
      Gets the active attribute of the UserInterface object
      Specified by:
      isActive in interface UserInterface
      Parameters:
      e - PARAM
      Returns:
      The active value
    • isFocus

      public boolean isFocus(Element e)
      Description copied from interface: UserInterface
      Gets the focus attribute of the UserInterface object
      Specified by:
      isFocus in interface UserInterface
      Parameters:
      e - PARAM
      Returns:
      The focus value
    • isHover

      public boolean isHover(Element e)
      Description copied from interface: UserInterface
      Gets the hover attribute of the UserInterface object
      Specified by:
      isHover in interface UserInterface
      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)