class SwingHtmlBrowser extends java.lang.Object implements DriverWidget
Modifier and Type | Field and Description |
---|---|
private javax.swing.JTextPane |
editor
The pane where to place the HTML.
|
private javax.swing.JScrollPane |
editorScroll
The pane where to attach the
browser . |
private SwingEmulatedWindow |
window
The window where the widget is attached.
|
Constructor and Description |
---|
SwingHtmlBrowser()
Initialize the swing components.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy the driver-specific widget.
|
EmulatedWindowState |
getWindow()
Get the widget's window.
|
private boolean |
openUrl(java.lang.String url)
Open the specified URL.
|
void |
placeWidget(NativeRectangle bounds)
Place the driver-specific widget at the specified bounds, using the currently selected
window.
|
void |
setEnabled(boolean enabled)
Change the sensitivity of a driver-implemented widget.
|
void |
setVisible(boolean visible)
Change the visibility of a driver-implemented widget.
|
boolean |
setWidgetAttribute(java.lang.String attr,
java.lang.String val)
Set an attribute for a widget implemented at the driver level.
|
void |
setWindow(EmulatedWindowState window)
Set the widget's window.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invokeWidgetCommand, invokeWidgetCommand
private SwingEmulatedWindow window
private final javax.swing.JTextPane editor
private final javax.swing.JScrollPane editorScroll
browser
.public void destroy()
destroy
in interface DriverWidget
public void setVisible(boolean visible)
setVisible
in interface DriverWidget
visible
- The visibility state.public void setEnabled(boolean enabled)
setEnabled
in interface DriverWidget
enabled
- The enabled state.public boolean setWidgetAttribute(java.lang.String attr, java.lang.String val)
This works only for GUI drivers.
setWidgetAttribute
in interface DriverWidget
attr
- The attribute name.val
- The attribute's value.true
if setting this attribute completed.public void placeWidget(NativeRectangle bounds)
placeWidget
in interface DriverWidget
public void setWindow(EmulatedWindowState window)
setWindow
in interface DriverWidget
window
- The window where to attach. May be null
(it will remain detached).public EmulatedWindowState getWindow()
getWindow
in interface DriverWidget
private boolean openUrl(java.lang.String url)
url
- The URL to open.true
.