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 Summary
FieldsModifier and TypeFieldDescriptionprivate final Action
private final Action
private final Action
private org.eclipse.swt.widgets.MenuItem
private org.eclipse.swt.widgets.MenuItem
private final Action
private final org.eclipse.swt.widgets.Shell
private final BrowserStatus
private org.eclipse.swt.widgets.ToolItem
private org.eclipse.swt.widgets.ToolItem
private org.eclipse.swt.widgets.Text
private final SWTXHTMLRenderer
private static final org.slf4j.Logger
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.eclipse.swt.widgets.MenuItem
addActionToMenu
(org.eclipse.swt.widgets.Menu menu, Action action) private org.eclipse.swt.widgets.ToolItem
addActionToToolbar
(org.eclipse.swt.widgets.ToolBar toolbar, Action action) private void
addSeparatorToMenu
(org.eclipse.swt.widgets.Menu menu) void
back()
private org.eclipse.swt.widgets.Composite
createAddressBar
(org.eclipse.swt.widgets.CoolBar coolbar) private org.eclipse.swt.widgets.Menu
createMenu
(org.eclipse.swt.widgets.Menu parent, String text) void
Indicates document layout has complete, e.g.void
Indicates document has been requested (e.g.void
forward()
org.eclipse.swt.widgets.Shell
getShell()
getUac()
void
private org.eclipse.swt.graphics.Image
void
Called when document layout failed with an exception.void
Called when document render failed with an exception.void
private void
populateMenu
(org.eclipse.swt.widgets.Menu menu) private void
populateToolBar
(org.eclipse.swt.widgets.ToolBar toolbar) void
void
widgetDisposed
(org.eclipse.swt.events.DisposeEvent e)
-
Field Details
-
log
private static final org.slf4j.Logger log -
_shell
private final org.eclipse.swt.widgets.Shell _shell -
_xhtml
-
_status
-
_url
private org.eclipse.swt.widgets.Text _url -
_imageCache
-
_backAction
-
_forwardAction
-
_reloadAction
-
_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
- 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
-
createMenu
-
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
-
getUac
-
setStatus
-
load
-
back
public void back() -
forward
public void forward() -
widgetDisposed
public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e) - Specified by:
widgetDisposed
in interfaceorg.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 interfaceDocumentListener
-
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 interfaceDocumentListener
-
onLayoutException
Description copied from interface:DocumentListener
Called when document layout failed with an exception. AllThrowable
objects thrown (except forThreadDeath
) during layout and not otherwise handled will be provided to this method. If aDocumentListener
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 interfaceDocumentListener
-
onRenderException
Description copied from interface:DocumentListener
Called when document render failed with an exception. AllThrowable
objects thrown (except forThreadDeath
) during render and not otherwise handled will be provided to this method. If aDocumentListener
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 interfaceDocumentListener
-