Package com.teamdev.jxbrowser.zoom
Class ZoomLevel
java.lang.Object
com.teamdev.jxbrowser.zoom.ZoomLevel
A zoom level of a web page.
The class provides a set of predefined constants. Each constant name consists of
the "P_" prefix followed by a number, representing the zoom level as a percentage.
For example, P_25 corresponds to a 25% zoom level, and P_110 corresponds
to a 110% zoom level.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevelstatic final ZoomLevel -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static ZoomLevelof(double value) Returns aZoomLevelinstance for the given double value.toString()doublevalue()Returns double representation of the current zoom level.values()Returns an immutable list of the pre-defined zoom levels.
-
Field Details
-
P_25
-
P_33
-
P_50
-
P_67
-
P_75
-
P_80
-
P_90
-
P_100
-
P_110
-
P_125
-
P_150
-
P_175
-
P_200
-
P_250
-
P_300
-
P_400
-
P_500
-
-
Method Details
-
of
Returns aZoomLevelinstance for the given double value.- Parameters:
value- the level as a double value. For a 100% zoom level, the value should be 1.0; for 25% it should be 0.25, and so on. See theP_zoom level constants for reference.- Returns:
- a
ZoomLevelinstance for the given double value - Throws:
IllegalArgumentException- whenvalueis negative- See Also:
-
values
Returns an immutable list of the pre-defined zoom levels. -
toString
-
equals
-
hashCode
public int hashCode() -
value
public double value()Returns double representation of the current zoom level.
-