|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebBrowserView
This interface encapsulates the operations that can be performed on the WebBrowser, such as loading a page, navigating through history, and adding listeners. There will be an instance of this object per web tab or web window.
Field Summary | |
---|---|
static int |
WINDOW_CURRENT
Window Option - Current Window |
static int |
WINDOW_NEW
Window Option - New Window |
static int |
WINDOW_NEW_TAB
Window Option - New Tab |
Method Summary | |
---|---|
void |
addContextMenuListener(PepperContextMenuListener listener)
Add listener to handle context menus (ie right mouse); |
void |
addHistoryListener(PepperHistoryListener listener)
Add a HistoryListener |
void |
addProgressListener(PepperProgressListener listener)
Add a ProgressListener for page loading status |
void |
addURIContentListener(PepperURIContentListener listener)
Add a URIContentListener to listen for specific content types, such as audio, so we can intercept and handle in Pepper UI |
boolean |
canCopy()
Returns true if something is selected in the browser and it can be copied to the system clipboard |
boolean |
canCut()
Returns true if browser can cut |
boolean |
canGoBack()
Describe canGoBack method here. |
boolean |
canGoForward()
Describe canGoForward method here. |
boolean |
canPaste()
Returns true if browser can paste |
void |
clearHistory()
Clear the session history for this view |
void |
copy()
Copy the selected text in the browser to the clipboard |
void |
cut()
Cut to clipboard |
void |
destroy()
Describe destroy method here. |
boolean |
find(FindConfig args)
invoked to find text on the current page |
boolean |
findAgain()
Invoked to repeat previous find |
String |
getCurrentURL()
Return the URL of the currently displayed page |
Document |
getDOM()
Get the DOM for the current page |
FormElementManager |
getElementManager()
Get class responsible for managing html form elements on the current page |
FindConfig |
getFindConfig()
Get current findConfig object used for find methods |
WebHistory |
getHistory()
Describe getHistory method here. |
netscape.javascript.JSObject |
getJSObject()
All JavaScript objects appear within Java as instances of JSObject. |
boolean |
getNewlyCreated()
Returns true when the view is newly created and no pages have been loaded in it yet. |
int |
getSelectedHistoryIndex()
|
Component |
getUIComponent()
Return the UI component associated with this view |
String |
getViewId()
Get the unique identifier of this view |
void |
goBack()
Describe goBack method here. |
void |
goForward()
Describe goForward method here. |
void |
goToIndex(int historyIndex)
Go to specified index in the History |
boolean |
isVisible()
Returns true if this view is currently visible |
void |
loadPage(InputStream stream,
String url)
|
void |
loadPage(String theContent)
Loads the string content |
void |
loadPage(URL pageURL)
Loads the url |
void |
loadURI(String uri)
Loads the URI |
void |
loadURI(String uri,
int loadFlags)
Load the uri with the specified load flags |
void |
loadURI(String uri,
int loadFlags,
String referURI,
InputStream postData,
InputStream headers)
Load a uri using the specified load flags and with the specified referrer URL and POST data. |
void |
openWindow(short type,
String uri,
String referrer,
String windowName,
String features,
boolean animate)
Load the specified uri in a new window |
void |
paste()
paste from clipboard |
void |
print(boolean showPrintDialog)
Print the current page in the browser. |
void |
refresh()
Refresh the current view |
void |
reload()
Reload the current document |
void |
removeContextMenuListener(PepperContextMenuListener listener)
Remove content listener |
void |
removeHistoryListener(PepperHistoryListener listener)
Remove HistoryListener |
void |
removeProgressListener(PepperProgressListener listener)
Remove ProgressListener |
void |
removeURIContentListener(PepperURIContentListener listener)
Remove URIContentListener |
void |
requestFocus()
request the focus |
void |
selectAll()
Select everything on the current page |
void |
selectNone()
De-select everything on the current page |
void |
setNewlyCreated(boolean state)
Set whether this view is considered newly created or not |
void |
setSelectedHistoryIndex(int index)
|
void |
stopLoading()
Stop loading the current document |
Field Detail |
---|
static final int WINDOW_CURRENT
static final int WINDOW_NEW
static final int WINDOW_NEW_TAB
Method Detail |
---|
String getViewId()
String
valueComponent getUIComponent()
Component
valueboolean isVisible()
boolean
valuevoid loadPage(URL pageURL)
pageURL
- the page to load.void loadPage(String theContent)
theContent
- a String
valuevoid loadPage(InputStream stream, String url)
void loadURI(String uri)
uri
- a String
valuevoid loadURI(String uri, int loadFlags)
uri
- a String
valueloadFlags
- an int
valueWebNavigationConstants
void loadURI(String uri, int loadFlags, String referURI, InputStream postData, InputStream headers)
uri
- a String
valueloadFlags
- an int
valuereferURI
- The referring URI. If this argument is NULL, the
referring URI will be inferred internally.postData
- InputStream containing POST data for the request.headers
- InputStream containing POST headers for the request.WebNavigationConstants
void openWindow(short type, String uri, String referrer, String windowName, String features, boolean animate) throws Exception
type
- the type of windowuri
- uri to open in the new windowreferrer
- the refence uri to be used.windowName
- window name from JS window.open. can be null.features
- window features from JS window.open. can be null. Note:- The window attached to this navigator will be parent. Example would be
"centerscreen,chrome,modal=yes,dialog=yes"animate
- if true animate the progress bar and the spinny
Exception
boolean canCopy()
boolean
valuevoid copy()
boolean canPaste()
boolean
valuevoid paste()
boolean canCut()
boolean
valuevoid cut()
void selectAll()
void selectNone()
boolean canGoBack()
canGoBack
method here.
boolean
valuevoid print(boolean showPrintDialog)
showPrintDialog
- True to show the print setup dialogboolean find(FindConfig args)
args
- a FindConfig
object that enapsulates find parameters
boolean findAgain()
FindConfig getFindConfig()
FindConfig
valueboolean canGoForward()
canGoForward
method here.
boolean
valuevoid goBack()
goBack
method here.
void goForward()
goForward
method here.
void goToIndex(int historyIndex)
historyIndex
- an int
valuevoid reload()
void refresh()
void stopLoading()
void destroy()
destroy
method here.
Document getDOM()
Document
valueString getCurrentURL()
String
valueWebHistory getHistory()
getHistory
method here.
WebHistory
valuevoid clearHistory()
int getSelectedHistoryIndex()
void setSelectedHistoryIndex(int index)
void addHistoryListener(PepperHistoryListener listener)
listener
- PepperHistoryListenervoid removeHistoryListener(PepperHistoryListener listener)
listener
- PepperHistoryListenervoid addProgressListener(PepperProgressListener listener)
listener
- PepperProgressListenervoid removeProgressListener(PepperProgressListener listener)
listener
- PepperProgressListenervoid addURIContentListener(PepperURIContentListener listener)
listener
- PepperURIContentListenervoid removeURIContentListener(PepperURIContentListener listener)
listener
- an URIContentListener
valuevoid addContextMenuListener(PepperContextMenuListener listener)
listener
- a PepperContextMenuListener
valuevoid removeContextMenuListener(PepperContextMenuListener listener)
listener
- a PepperContextMenuListener
valueFormElementManager getElementManager()
FormElementManager
valuenetscape.javascript.JSObject getJSObject()
Values passed from Java to JavaScript are converted as follows:
(String) window.getMember("name");
or
(JSObject) window.getMember("document");
.
void requestFocus()
boolean getNewlyCreated()
boolean
valuevoid setNewlyCreated(boolean state)
state
- a boolean
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |