public interface Zoom
A Zoom
instance belongs to a Browser
instance and can be used only if the
Browser
instance is alive. When the Browser
instance 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 the
a.com
web page, it will not be applied for the b.com
web page. 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 Engine
instance and they are
preserved after closing a Browser
the Zoom
instance belongs to.
Modifier and Type | Method and Description |
---|---|
void |
disable()
Disables zoom functionality and resets zoom level to the default value.
|
void |
enable()
Enables zoom functionality, so that you can change zoom level for the currently loaded web
page.
|
void |
in()
Performs zoom in on the currently loaded web page.
|
boolean |
isEnabled()
Indicates whether zoom functionality is enabled or not.
|
ZoomLevel |
level()
Returns the actual zoom level for the currently loaded web page.
|
void |
level(ZoomLevel zoomLevel)
Updates the zoom level of the currently loaded web page.
|
void |
out()
Performs zoom out on the currently loaded web page.
|
void |
reset()
Resets zoom level for the currently loaded web page to the default value.
|
ZoomLevel level()
java.lang.IllegalStateException
- when the Browser
instance of the current Zoom
is closedvoid level(ZoomLevel zoomLevel)
zoomLevel
- a new zoom leveljava.lang.IllegalStateException
- when the Browser
instance of the current Zoom
is closedvoid in()
java.lang.IllegalStateException
- when the Browser
instance of the current Zoom
is closedvoid out()
java.lang.IllegalStateException
- when the Browser
instance of the current Zoom
is closedvoid reset()
java.lang.IllegalStateException
- when the Browser
instance of the current Zoom
is closedZoomLevels.defaultLevel(ZoomLevel)
boolean isEnabled()
true
if zoom functionality is enabledjava.lang.IllegalStateException
- when the Browser
instance of the current Zoom
is closedvoid enable()
java.lang.IllegalStateException
- when the Browser
instance of the current Zoom
is closedvoid disable()
java.lang.IllegalStateException
- when the Browser
instance of the current Zoom
is closed