Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.swt.browser
Class Browser  view Browser download Browser.java

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended byorg.eclipse.swt.browser.Browser
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class Browser
extends org.eclipse.swt.widgets.Composite

Instances of this class implement the browser user interface metaphor. It allows the user to visualize and navigate through HTML documents.

Note that although this class is a subclass of Composite, it does not make sense to set a layout on it.

IMPORTANT: This class is not intended to be subclassed.

Since:
3.0

Field Summary
(package private) static org.eclipse.swt.internal.mozilla.nsIAppShell AppShell
           
(package private) static int BrowserCount
           
(package private)  int chromeFlags
           
(package private)  CloseWindowListener[] closeWindowListeners
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject contextMenuListener
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject embeddingSiteWindow
           
(package private)  long embedHandle
           
(package private) static boolean flash
           
(package private)  java.lang.String html
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject interfaceRequestor
           
(package private)  org.eclipse.swt.graphics.Point location
           
(package private)  LocationListener[] locationListeners
           
(package private) static boolean mozilla
           
(package private)  OpenWindowListener[] openWindowListeners
           
(package private) static java.lang.String PACKAGE_PREFIX
           
(package private)  ProgressListener[] progressListeners
           
(package private) static PromptService PromptService
           
(package private)  int refCount
           
(package private)  int request
           
(package private)  org.eclipse.swt.graphics.Point size
           
(package private)  StatusTextListener[] statusTextListeners
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject supports
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject supportsWeakReference
           
(package private)  org.eclipse.swt.widgets.Shell tip
           
(package private)  TitleListener[] titleListeners
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject tooltipListener
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject uriContentListener
           
(package private)  VisibilityWindowListener[] visibilityWindowListeners
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject weakReference
           
(package private)  org.eclipse.swt.internal.mozilla.nsIWebBrowser webBrowser
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject webBrowserChrome
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject webBrowserChromeFocus
           
(package private)  org.eclipse.swt.internal.mozilla.XPCOMObject webProgressListener
           
(package private) static WindowCreator WindowCreator
           
 
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
 
Fields inherited from class org.eclipse.swt.widgets.Scrollable
 
Fields inherited from class org.eclipse.swt.widgets.Control
 
Fields inherited from class org.eclipse.swt.widgets.Widget
handle
 
Constructor Summary
Browser(org.eclipse.swt.widgets.Composite parent, int style)
          Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
 
Method Summary
 void addCloseWindowListener(CloseWindowListener listener)
          Adds the listener to receive events.
 void addLocationListener(LocationListener listener)
          Adds the listener to receive events.
 void addOpenWindowListener(OpenWindowListener listener)
          Adds the listener to receive events.
 void addProgressListener(ProgressListener listener)
          Adds the listener to receive events.
(package private)  int AddRef()
           
 void addStatusTextListener(StatusTextListener listener)
          Adds the listener to receive events.
 void addTitleListener(TitleListener listener)
          Adds the listener to receive events.
 void addVisibilityWindowListener(VisibilityWindowListener listener)
          Adds the listener to receive events.
 boolean back()
          Navigate to the previous session history item.
(package private)  int CanHandleContent(int aContentType, int aIsContentPreferred, int aDesiredContentType, int retval)
           
protected  void checkSubclass()
          Checks that this class can be subclassed.
(package private)  void createCOMInterfaces()
           
(package private)  int DestroyBrowserWindow()
           
(package private)  void disposeCOMInterfaces()
           
(package private)  int DoContent(int aContentType, int aIsContentPreferred, int aRequest, int aContentHandler, int retval)
           
(package private) static java.lang.String error(int code)
           
(package private)  int ExitModalEventLoop(int aStatus)
           
(package private) static Browser findBrowser(long handle)
           
(package private)  int FocusNextElement()
           
(package private)  int FocusPrevElement()
           
 boolean forward()
          Navigate to the next session history item.
(package private)  int GetChromeFlags(int aChromeFlags)
           
(package private)  int GetDimensions(int flags, int x, int y, int cx, int cy)
           
(package private)  int GetInterface(int riid, int ppvObject)
           
(package private)  int GetLoadCookie(int aLoadCookie)
           
(package private)  int GetParentContentListener(int aParentContentListener)
           
(package private)  int GetSiteWindow(int aSiteWindow)
           
(package private)  int GetTitle(int aTitle)
           
 java.lang.String getUrl()
          Returns the current URL.
(package private)  int GetVisibility(int aVisibility)
           
(package private)  int GetWeakReference(int ppvObject)
           
(package private)  int GetWebBrowser(int aWebBrowser)
           
 boolean isBackEnabled()
          Returns true if the receiver can navigate to the previous session history item, and false otherwise.
 boolean isForwardEnabled()
          Returns true if the receiver can navigate to the next session history item, and false otherwise.
(package private)  int IsPreferred(int aContentType, int aDesiredContentType, int retval)
           
(package private)  int IsWindowModal(int retval)
           
(package private)  void onDispose()
           
(package private)  void onFocusGained()
           
(package private)  void onFocusLost()
           
(package private)  int OnHideTooltip()
           
(package private)  int OnLocationChange(int aWebProgress, int aRequest, int aLocation)
           
(package private)  int OnProgressChange(int aWebProgress, int aRequest, int aCurSelfProgress, int aMaxSelfProgress, int aCurTotalProgress, int aMaxTotalProgress)
           
(package private)  void onResize()
           
(package private)  int OnSecurityChange(int aWebProgress, int aRequest, int state)
           
(package private)  int OnShowContextMenu(int aContextFlags, int aEvent, int aNode)
           
(package private)  int OnShowTooltip(int aXCoords, int aYCoords, int aTipText)
           
(package private)  int OnStartURIOpen(int aURI, int retval)
           
(package private)  int OnStateChange(int aWebProgress, int aRequest, int aStateFlags, int aStatus)
           
(package private)  int OnStatusChange(int aWebProgress, int aRequest, int aStatus, int aMessage)
           
(package private)  int QueryInterface(int riid, int ppvObject)
           
(package private)  int QueryReferent(int riid, int ppvObject)
           
 void refresh()
          Refresh the current page.
(package private)  int Release()
           
 void removeCloseWindowListener(CloseWindowListener listener)
          Removes the listener.
 void removeLocationListener(LocationListener listener)
          Removes the listener.
 void removeOpenWindowListener(OpenWindowListener listener)
          Removes the listener.
 void removeProgressListener(ProgressListener listener)
          Removes the listener.
 void removeStatusTextListener(StatusTextListener listener)
          Removes the listener.
 void removeTitleListener(TitleListener listener)
          Removes the listener.
 void removeVisibilityWindowListener(VisibilityWindowListener listener)
          Removes the listener.
(package private)  int SetChromeFlags(int aChromeFlags)
           
(package private)  int SetDimensions(int flags, int x, int y, int cx, int cy)
           
(package private)  int SetFocus()
           
(package private)  void SetFocusAtFirstElement()
           
(package private)  int SetLoadCookie(int aLoadCookie)
           
(package private)  int SetParentContentListener(int aParentContentListener)
           
(package private)  int SetStatus(int statusType, int status)
           
 boolean setText(java.lang.String html)
          Renders HTML.
(package private)  int SetTitle(int aTitle)
           
 boolean setUrl(java.lang.String url)
          Loads a URL.
(package private)  int SetVisibility(int aVisibility)
           
(package private)  int SetWebBrowser(int aWebBrowser)
           
(package private)  int ShowAsModal()
           
(package private)  int SizeBrowserTo(int aCX, int aCY)
           
 void stop()
          Stop any loading and rendering activity.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
computeSize, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getBorderWidth, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

embedHandle

long embedHandle

webBrowser

org.eclipse.swt.internal.mozilla.nsIWebBrowser webBrowser

supports

org.eclipse.swt.internal.mozilla.XPCOMObject supports

weakReference

org.eclipse.swt.internal.mozilla.XPCOMObject weakReference

webProgressListener

org.eclipse.swt.internal.mozilla.XPCOMObject webProgressListener

webBrowserChrome

org.eclipse.swt.internal.mozilla.XPCOMObject webBrowserChrome

webBrowserChromeFocus

org.eclipse.swt.internal.mozilla.XPCOMObject webBrowserChromeFocus

embeddingSiteWindow

org.eclipse.swt.internal.mozilla.XPCOMObject embeddingSiteWindow

interfaceRequestor

org.eclipse.swt.internal.mozilla.XPCOMObject interfaceRequestor

supportsWeakReference

org.eclipse.swt.internal.mozilla.XPCOMObject supportsWeakReference

contextMenuListener

org.eclipse.swt.internal.mozilla.XPCOMObject contextMenuListener

uriContentListener

org.eclipse.swt.internal.mozilla.XPCOMObject uriContentListener

tooltipListener

org.eclipse.swt.internal.mozilla.XPCOMObject tooltipListener

chromeFlags

int chromeFlags

refCount

int refCount

request

int request

html

java.lang.String html

location

org.eclipse.swt.graphics.Point location

size

org.eclipse.swt.graphics.Point size

tip

org.eclipse.swt.widgets.Shell tip

closeWindowListeners

CloseWindowListener[] closeWindowListeners

locationListeners

LocationListener[] locationListeners

openWindowListeners

OpenWindowListener[] openWindowListeners

progressListeners

ProgressListener[] progressListeners

statusTextListeners

StatusTextListener[] statusTextListeners

titleListeners

TitleListener[] titleListeners

visibilityWindowListeners

VisibilityWindowListener[] visibilityWindowListeners

AppShell

static org.eclipse.swt.internal.mozilla.nsIAppShell AppShell

PromptService

static PromptService PromptService

WindowCreator

static WindowCreator WindowCreator

BrowserCount

static int BrowserCount

mozilla

static boolean mozilla

flash

static boolean flash

PACKAGE_PREFIX

static final java.lang.String PACKAGE_PREFIX
See Also:
Constant Field Values
Constructor Detail

Browser

public Browser(org.eclipse.swt.widgets.Composite parent,
               int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.

Since:
3.0
Method Detail

addCloseWindowListener

public void addCloseWindowListener(CloseWindowListener listener)
Adds the listener to receive events.

Since:
3.0

addLocationListener

public void addLocationListener(LocationListener listener)
Adds the listener to receive events.

Since:
3.0

addOpenWindowListener

public void addOpenWindowListener(OpenWindowListener listener)
Adds the listener to receive events.

Since:
3.0

addProgressListener

public void addProgressListener(ProgressListener listener)
Adds the listener to receive events.

Since:
3.0

addStatusTextListener

public void addStatusTextListener(StatusTextListener listener)
Adds the listener to receive events.

Since:
3.0

addTitleListener

public void addTitleListener(TitleListener listener)
Adds the listener to receive events.

Since:
3.0

addVisibilityWindowListener

public void addVisibilityWindowListener(VisibilityWindowListener listener)
Adds the listener to receive events.

Since:
3.0

back

public boolean back()
Navigate to the previous session history item.

Since:
3.0

checkSubclass

protected void checkSubclass()
Description copied from class: org.eclipse.swt.widgets.Widget
Checks that this class can be subclassed.

The SWT class library is intended to be subclassed only at specific, controlled points (most notably, Composite and Canvas when implementing new widgets). This method enforces this rule unless it is overridden.

IMPORTANT: By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created, the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific. No support is provided for user-written classes which are implemented in this fashion.

The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team. Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy.


createCOMInterfaces

void createCOMInterfaces()

disposeCOMInterfaces

void disposeCOMInterfaces()

findBrowser

static Browser findBrowser(long handle)

forward

public boolean forward()
Navigate to the next session history item.

Since:
3.0

getUrl

public java.lang.String getUrl()
Returns the current URL.

Since:
3.0

isBackEnabled

public boolean isBackEnabled()
Returns true if the receiver can navigate to the previous session history item, and false otherwise.


isForwardEnabled

public boolean isForwardEnabled()
Returns true if the receiver can navigate to the next session history item, and false otherwise.


error

static java.lang.String error(int code)

onDispose

void onDispose()

onFocusGained

void onFocusGained()

onFocusLost

void onFocusLost()

SetFocusAtFirstElement

void SetFocusAtFirstElement()

onResize

void onResize()

refresh

public void refresh()
Refresh the current page.

Since:
3.0

removeCloseWindowListener

public void removeCloseWindowListener(CloseWindowListener listener)
Removes the listener.

Since:
3.0

removeLocationListener

public void removeLocationListener(LocationListener listener)
Removes the listener.

Since:
3.0

removeOpenWindowListener

public void removeOpenWindowListener(OpenWindowListener listener)
Removes the listener.

Since:
3.0

removeProgressListener

public void removeProgressListener(ProgressListener listener)
Removes the listener.

Since:
3.0

removeStatusTextListener

public void removeStatusTextListener(StatusTextListener listener)
Removes the listener.

Since:
3.0

removeTitleListener

public void removeTitleListener(TitleListener listener)
Removes the listener.

Since:
3.0

removeVisibilityWindowListener

public void removeVisibilityWindowListener(VisibilityWindowListener listener)
Removes the listener.

Since:
3.0

setText

public boolean setText(java.lang.String html)
Renders HTML.

Since:
3.0

setUrl

public boolean setUrl(java.lang.String url)
Loads a URL.

Since:
3.0

stop

public void stop()
Stop any loading and rendering activity.

Since:
3.0

QueryInterface

int QueryInterface(int riid,
                   int ppvObject)

AddRef

int AddRef()

Release

int Release()

QueryReferent

int QueryReferent(int riid,
                  int ppvObject)

GetInterface

int GetInterface(int riid,
                 int ppvObject)

GetWeakReference

int GetWeakReference(int ppvObject)

OnStateChange

int OnStateChange(int aWebProgress,
                  int aRequest,
                  int aStateFlags,
                  int aStatus)

OnProgressChange

int OnProgressChange(int aWebProgress,
                     int aRequest,
                     int aCurSelfProgress,
                     int aMaxSelfProgress,
                     int aCurTotalProgress,
                     int aMaxTotalProgress)

OnLocationChange

int OnLocationChange(int aWebProgress,
                     int aRequest,
                     int aLocation)

OnStatusChange

int OnStatusChange(int aWebProgress,
                   int aRequest,
                   int aStatus,
                   int aMessage)

OnSecurityChange

int OnSecurityChange(int aWebProgress,
                     int aRequest,
                     int state)

SetStatus

int SetStatus(int statusType,
              int status)

GetWebBrowser

int GetWebBrowser(int aWebBrowser)

SetWebBrowser

int SetWebBrowser(int aWebBrowser)

GetChromeFlags

int GetChromeFlags(int aChromeFlags)

SetChromeFlags

int SetChromeFlags(int aChromeFlags)

DestroyBrowserWindow

int DestroyBrowserWindow()

SizeBrowserTo

int SizeBrowserTo(int aCX,
                  int aCY)

ShowAsModal

int ShowAsModal()

IsWindowModal

int IsWindowModal(int retval)

ExitModalEventLoop

int ExitModalEventLoop(int aStatus)

SetDimensions

int SetDimensions(int flags,
                  int x,
                  int y,
                  int cx,
                  int cy)

GetDimensions

int GetDimensions(int flags,
                  int x,
                  int y,
                  int cx,
                  int cy)

SetFocus

int SetFocus()

GetVisibility

int GetVisibility(int aVisibility)

SetVisibility

int SetVisibility(int aVisibility)

GetTitle

int GetTitle(int aTitle)

SetTitle

int SetTitle(int aTitle)

GetSiteWindow

int GetSiteWindow(int aSiteWindow)

FocusNextElement

int FocusNextElement()

FocusPrevElement

int FocusPrevElement()

OnShowContextMenu

int OnShowContextMenu(int aContextFlags,
                      int aEvent,
                      int aNode)

OnStartURIOpen

int OnStartURIOpen(int aURI,
                   int retval)

DoContent

int DoContent(int aContentType,
              int aIsContentPreferred,
              int aRequest,
              int aContentHandler,
              int retval)

IsPreferred

int IsPreferred(int aContentType,
                int aDesiredContentType,
                int retval)

CanHandleContent

int CanHandleContent(int aContentType,
                     int aIsContentPreferred,
                     int aDesiredContentType,
                     int retval)

GetLoadCookie

int GetLoadCookie(int aLoadCookie)

SetLoadCookie

int SetLoadCookie(int aLoadCookie)

GetParentContentListener

int GetParentContentListener(int aParentContentListener)

SetParentContentListener

int SetParentContentListener(int aParentContentListener)

OnShowTooltip

int OnShowTooltip(int aXCoords,
                  int aYCoords,
                  int aTipText)

OnHideTooltip

int OnHideTooltip()