Class BrowserWindow
java.lang.Object
com.codename1.ui.BrowserWindow
Encapsulates a WebView that is contained in its own separate window when run on a Desktop (e.g. Simulator). Platforms
that don't have "windows", will fall back to loading a Form with a BrowserComponent in it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA future that is returned from the eval() method. -
Constructor Summary
ConstructorsConstructorDescriptionBrowserWindow(String startURL) Creates a new browser window with the given starting URL. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds listener to be notified when the browser window is closed.voidAdds listeners to be notified when a page is loaded in the browser window.voidclose()Closes the browser window.voidRemoves listener from being notified when the browser window is closed.voidRemoves listeners from being notified when page is loaded in the browser window.voidsetSize(int width, int height) Sets the size in pixels of the browser window.voidSets the window title for the browser window.voidshow()Shows the browser window.
-
Constructor Details
-
BrowserWindow
Creates a new browser window with the given starting URL.
Parameters
startURL: The URL to start with.
-
-
Method Details
-
addLoadListener
Adds listeners to be notified when a page is loaded in the browser window. ActionEvents will have the URL of the page as a string as its "source" property.
Parameters
l: Listener to add.
-
removeLoadListener
Removes listeners from being notified when page is loaded in the browser window.
Parameters
l
-
setTitle
Sets the window title for the browser window.
Parameters
title: The title for the window.
-
setSize
public void setSize(int width, int height) Sets the size in pixels of the browser window.
Parameters
-
width: The width in pixels -
height: The height in pixels
-
-
close
public void close()Closes the browser window. -
addCloseListener
Adds listener to be notified when the browser window is closed.
Parameters
l
-
removeCloseListener
Removes listener from being notified when the browser window is closed.
Parameters
l
-
show
public void show()Shows the browser window.
-