Package VASSAL.build.module.map
Class Zoomer.State
java.lang.Object
VASSAL.build.module.map.Zoomer.State
- Enclosing class:
- Zoomer
protected static class Zoomer.State extends Object
Stores the state information for the
Zoomer
. This class
exists to keep the Zoomer
data separate from the
Zoomer
GUI.
Predefined zoom levels are stored in levels
. If we are
in a predefined zoom level, then custom == -1
and
levels[cur]
is the current zoom factor. If we are in
a user-defined zoom level, then custom
is the current
zoom factor and cur
is the greatest value such that
custom < level[cur]
}.
- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Constructor Summary
Constructors Constructor Description State(double[] levels, int initial)
State(Collection<Double> l, int initial)
-
Method Summary
Modifier and Type Method Description boolean
atLevel()
int
getInitialLevel()
int
getLevel()
int
getLevelCount()
List<Double>
getLevels()
double
getZoom()
boolean
hasHigherLevel()
boolean
hasLowerLevel()
void
higherLevel()
void
lowerLevel()
void
setLevel(int l)
void
setZoom(double z)
-
Constructor Details
-
State
public State(double[] levels, int initial) -
State
-
-
Method Details
-
getZoom
public double getZoom() -
setZoom
public void setZoom(double z) -
getLevel
public int getLevel() -
setLevel
public void setLevel(int l) -
getInitialLevel
public int getInitialLevel() -
getLevelCount
public int getLevelCount() -
atLevel
public boolean atLevel() -
lowerLevel
public void lowerLevel() -
higherLevel
public void higherLevel() -
hasLowerLevel
public boolean hasLowerLevel() -
hasHigherLevel
public boolean hasHigherLevel() -
getLevels
-