public interface Zoom
A Zoom instance belongs to Browser and can be used only if Browser is
alive. When Browser is closed, the Zoom instance automatically updates its
internal state and does not allow modifying zoom anymore. The IllegalStateException will
be thrown in this case.
The zoom level is configured for each domain separately, so if you set zoom level for "a.com", it will not be applied for "b.com". If you change zoom level for one domain and then load another one, then the zoom level for another domain will be default.
The zoom level per domain configurations are kept by the Profile instance, and they
are preserved after closing a Browser the Zoom instance belongs to.
| Modifier and Type | Method and Description |
|---|---|
Browser |
browser()
Returns the
Browser instance of this zoom. |
void |
disable()
Disables the possibility to change zoom levels for the loaded web pages and resets zoom
level of the loaded web pages to the default value.
|
void |
enable()
Enables the possibility to change zoom levels for the loaded web pages.
|
void |
in()
Performs zoom in on the currently loaded web page.
|
boolean |
isEnabled()
Indicates whether zoom level can be changed or not.
|
ZoomLevel |
level()
Returns the zoom level associated with the domain of the currently loaded web page.
|
void |
level(ZoomLevel zoomLevel)
Updates the zoom level for the domain of the currently loaded web page.
|
void |
out()
Performs zoom out on the currently loaded web page.
|
void |
reset()
Resets zoom level for the domain of the currently loaded web page to the default value.
|
Browser browser()
Browser instance of this zoom.ZoomLevel level()
ObjectClosedException - when Browser of the current Zoom is closedvoid level(ZoomLevel zoomLevel)
zoomLevel - a new zoom levelObjectClosedException - when Browser of the current Zoom is closedvoid in()
ObjectClosedException - when Browser of the current Zoom is closedvoid out()
ObjectClosedException - when Browser of the current Zoom is closedvoid reset()
ObjectClosedException - when Browser of the current Zoom is closedZoomLevels.defaultLevel(ZoomLevel)boolean isEnabled()
true if zoom level can be changedObjectClosedException - when Browser of the current Zoom is closedvoid enable()
ObjectClosedException - when Browser of the current Zoom is closedvoid disable()
ObjectClosedException - when Browser of the current Zoom is closed