Class SWTXHTMLRenderer

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
org.xhtmlrenderer.swt.BasicRenderer
org.xhtmlrenderer.swt.simple.SWTXHTMLRenderer
All Implemented Interfaces:
EventListener, org.eclipse.swt.events.PaintListener, org.eclipse.swt.graphics.Drawable, org.eclipse.swt.internal.SWTEventListener, FSCanvas, UserInterface

public class SWTXHTMLRenderer extends BasicRenderer
Simplified BasicRenderer, for use with XHTML documents.
  • Constructor Details

    • SWTXHTMLRenderer

      public SWTXHTMLRenderer(org.eclipse.swt.widgets.Composite parent, int style)
    • SWTXHTMLRenderer

      public SWTXHTMLRenderer(org.eclipse.swt.widgets.Composite parent, int style, UserAgentCallback uac)
  • Method Details

    • init

      protected void init()
    • setDocument

      public void setDocument(String uri)
      Loads and renders a Document given uri. The uri is resolved by the UserAgentCallback
      Overrides:
      setDocument in class BasicRenderer
    • setDocument

      public void setDocument(Document doc)
      Renders an XML Document instance. Make sure that no relative resources are needed
      Parameters:
      doc - The document to render.
    • setDocument

      public void setDocument(Document doc, String url)
      Renders a Document using a URL as a base URL for relative paths.
      Overrides:
      setDocument in class BasicRenderer
      Parameters:
      doc - The new document value
      url - The new document value
    • setDocument

      public void setDocument(InputStream stream, String url)
      Renders a Document read from an InputStream using a URL as a base URL for relative paths.
      Overrides:
      setDocument in class BasicRenderer
      Parameters:
      stream - The stream to read the Document from.
      url - The URL used to resolve relative path references.
    • setDocument

      public void setDocument(File file) throws MalformedURLException
      Renders a Document read from an InputStream using a URL as a base URL for relative paths.
      Parameters:
      file - The file to read the Document from. Relative paths will be resolved based on the file's parent directory.
      Throws:
      MalformedURLException
    • getForm

      public XhtmlForm getForm(Element e)
      Returns:
      the form corresponding to element e or null if none