public class nUIWebView extends nUIViewDisplay
SAVED_POINTER_LOCATIONS
COLOR_BACKGROUND_NORMAL, COLOR_BLACK, COLOR_FOREGROUND_DARK, COLOR_FOREGROUND_LIGHT, COLOR_FOREGROUND_NORMAL, COLOR_TRANSPARENT, COLOR_WHITE, DIMENSIONS_IDENTIFIER_PARENT_DIMENSIONS
event_listener, event_listener_exclusive, first_child, last_child, next_sibling, nuiid, parent, prev_sibling, unlink_children_on_removal_from_parent
Constructor and Description |
---|
nUIWebView(int nuiid) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
callJavaScript(java.lang.String method,
java.lang.String[] parameters)
Evaluate some JavaScript on this page.
|
void |
callJavaScript(java.lang.String method,
java.lang.String[] parameters,
IJSCallback callback)
Evaluate some JavaScript on this page.
|
int |
getBgcolor()
Gets the current background colour, if one has been set directly.
|
boolean |
getHscrollable()
Determine if this web view allows horizontal scrolling.
|
boolean |
getVscrollable()
Determine if this web view allows vertical scrolling.
|
boolean |
insertAt(int index,
nUIObject to_add)
Insert a child nUIObject at a given index.
|
boolean |
isOverscrollingEnabled()
Determine if overscrolling is enabled on this nUIWebView.
|
boolean |
isScaleToFitEnabled()
Determine if this nUIWebView will attempt to scale HTML content to fit the page.
|
boolean |
registerCallBack(nUIWebviewCallBack callback)
Register a callback to process url requests from this webview.
|
void |
reload()
Reload the current document.
|
void |
setBgcolor(int bgcolor)
Sets the background colour of this nUIWebView.
|
void |
setHscrollable(boolean hscrollable)
Sets whether this web view is allowed to scroll horizontally.
|
void |
setHTMLText(java.lang.String html_data)
Sets the content of the page directly by passing in raw html.
|
void |
setOverscrollingEnabled(boolean overscrollingEnabled)
Enable or disable overscrolling when reaching the end of the content of this nUIWebView (sometimes called "bouncing").
|
void |
setScaleToFitEnabled(boolean scaleToFitEnabled)
Enable or disable scaling web content to fit the page (if available).
|
void |
setURL(java.lang.String url)
Sets the current URL.
|
void |
setVscrollable(boolean vscrollable)
Sets whether this web view is allowed to scroll vertically.
|
getBgimage, getBgimageScroll, getBgimageTileH, getBgimageTileV, getHeaderBgcolor, getHeaderHeight, getHeaderimage, getHeadertext, getInnerHeight, getInterElementYSpacing, getPopupDismissText, getScreenInnerX, getScreenInnerY, getX, getY, onUISynced, resetHeaderFgColor, setBgimage, setBgimageScroll, setBgimageTileH, setBgimageTileV, setHeaderBgcolor, setHeaderFgColor, setHeaderimage, setHeadertext, setInterElementYSpacing, setPopupDismissText
getBackgroundDrawable, getBottom, getFocus, getFocusable, getGesturable, getHeight, getInnerWidth, getInnerX, getInnerY, getLeft, getMaxChildX, getMaxChildY, getRight, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getWidth, insertAtInternal, isEnabled, onRemoved, remove, setBackgroundDrawable, setBottom, setChildFocus, setEnabled, setFocus, setFocusable, setGesturable, setHeight, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setRight, setTop, setTriggerable, setWidth, setX, setY
add, addEventListener, childElementAt, childIndexOf, getTag, insertAfter, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace, setTag
public void setURL(java.lang.String url)
url
- the url to load nowpublic void reload()
public boolean insertAt(int index, nUIObject to_add)
nUIViewDisplay
insertAt
in class nUIViewDisplay
index
- the index (starting from 0) at which the child object should be inserted.to_add
- the nUIObject to add.public void setHTMLText(java.lang.String html_data)
html_data
- public void setHscrollable(boolean hscrollable)
setHscrollable
in class nUIViewDisplay
hscrollable
- true to allow scrolling.public void setVscrollable(boolean vscrollable)
setVscrollable
in class nUIViewDisplay
vscrollable
- true to allow scrolling.public boolean getHscrollable()
getHscrollable
in class nUIViewDisplay
public boolean getVscrollable()
getVscrollable
in class nUIViewDisplay
public boolean registerCallBack(nUIWebviewCallBack callback)
callback
- the nUIWebviewCallBack
to register,
or null
to remove the existing callback.public java.lang.String callJavaScript(java.lang.String method, java.lang.String[] parameters)
method
- The name of the JavaScript method to call, e.g. "myMethod".parameters
- String constants that should be passed to the method to be called, in order.public void callJavaScript(java.lang.String method, java.lang.String[] parameters, IJSCallback callback)
method
- The name of the JavaScript method to call, e.g. "myMethod".parameters
- String constants that should be passed to the method to be called, in order.callback
- The callback that will be notified when evaluation completes.public void setBgcolor(int bgcolor)
setBgcolor
in class nUIDisplayObject
bgcolor
- an ARGB color.public int getBgcolor()
getBgcolor
in class nUIDisplayObject
public void setOverscrollingEnabled(boolean overscrollingEnabled)
overscrollingEnabled
- indicates if overscrolling is enabled or not.public boolean isOverscrollingEnabled()
public void setScaleToFitEnabled(boolean scaleToFitEnabled)
scaleToFitEnabled
- indicates if scaling to fit is enabled or not.public boolean isScaleToFitEnabled()