Class Browser

java.lang.Object
org.xhtmlrenderer.demo.browser.swt.Browser
All Implemented Interfaces:
EventListener, org.eclipse.swt.events.DisposeListener, org.eclipse.swt.internal.SWTEventListener, DocumentListener

@ParametersAreNonnullByDefault public class Browser extends Object implements org.eclipse.swt.events.DisposeListener, DocumentListener
  • Field Details

    • log

      private static final org.slf4j.Logger log
    • _shell

      private final org.eclipse.swt.widgets.Shell _shell
    • _xhtml

      private final SWTXHTMLRenderer _xhtml
    • _status

      private final BrowserStatus _status
    • _url

      private org.eclipse.swt.widgets.Text _url
    • _imageCache

      private final Map<String,org.eclipse.swt.graphics.Image> _imageCache
    • _backAction

      private final Action _backAction
    • _forwardAction

      private final Action _forwardAction
    • _reloadAction

      private final Action _reloadAction
    • _homeAction

      private final Action _homeAction
    • _miBack

      private org.eclipse.swt.widgets.MenuItem _miBack
    • _miForward

      private org.eclipse.swt.widgets.MenuItem _miForward
    • _tiBack

      private org.eclipse.swt.widgets.ToolItem _tiBack
    • _tiForward

      private org.eclipse.swt.widgets.ToolItem _tiForward
    • USER_GUIDE_URL

      private static final String USER_GUIDE_URL
      See Also:
  • Constructor Details

    • Browser

      public Browser(org.eclipse.swt.widgets.Display display)
  • Method Details

    • createAddressBar

      private org.eclipse.swt.widgets.Composite createAddressBar(org.eclipse.swt.widgets.CoolBar coolbar)
    • populateMenu

      private void populateMenu(org.eclipse.swt.widgets.Menu menu)
    • populateToolBar

      private void populateToolBar(org.eclipse.swt.widgets.ToolBar toolbar)
    • loadImage

      @Nullable @CheckReturnValue private org.eclipse.swt.graphics.Image loadImage(@Nullable String icon)
    • createMenu

      private org.eclipse.swt.widgets.Menu createMenu(org.eclipse.swt.widgets.Menu parent, String text)
    • addActionToMenu

      private org.eclipse.swt.widgets.MenuItem addActionToMenu(org.eclipse.swt.widgets.Menu menu, Action action)
    • addSeparatorToMenu

      private void addSeparatorToMenu(org.eclipse.swt.widgets.Menu menu)
    • addActionToToolbar

      private org.eclipse.swt.widgets.ToolItem addActionToToolbar(org.eclipse.swt.widgets.ToolBar toolbar, Action action)
    • openAndDispatch

      public void openAndDispatch()
    • getShell

      public org.eclipse.swt.widgets.Shell getShell()
    • getRenderer

      public SWTXHTMLRenderer getRenderer()
    • getUac

      public BrowserUserAgent getUac()
    • setStatus

      public void setStatus(String message)
    • load

      public void load(String url)
    • back

      public void back()
    • forward

      public void forward()
    • widgetDisposed

      public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e)
      Specified by:
      widgetDisposed in interface org.eclipse.swt.events.DisposeListener
    • documentLoaded

      public void documentLoaded()
      Description copied from interface: DocumentListener
      Indicates document layout has complete, e.g. document is fully "loaded" for display; this is not a callback for the document source (e.g. XML) being loaded. This method will be called on every layout run (including, for example, after panel resizes).
      Specified by:
      documentLoaded in interface DocumentListener
    • documentStarted

      public void documentStarted()
      Description copied from interface: DocumentListener
      Indicates document has been requested (e.g. a new document is going to be loaded). This will be called before any activity takes place for the document.
      Specified by:
      documentStarted in interface DocumentListener
    • onLayoutException

      public void onLayoutException(Throwable t)
      Description copied from interface: DocumentListener
      Called when document layout failed with an exception. All Throwable objects thrown (except for ThreadDeath) during layout and not otherwise handled will be provided to this method. If a DocumentListener has been defined an XHTML panel, the listener is entirely responsible for handling the exception. No other action will be taken.
      Specified by:
      onLayoutException in interface DocumentListener
    • onRenderException

      public void onRenderException(Throwable t)
      Description copied from interface: DocumentListener
      Called when document render failed with an exception. All Throwable objects thrown (except for ThreadDeath) during render and not otherwise handled will be provided to this method. If a DocumentListener has been defined an XHTML panel, the listener is entirely responsible for handling the exception. No other action will be taken.
      Specified by:
      onRenderException in interface DocumentListener