public class IlvZoomFactorVisibilityFilter extends IlvLayerVisibilityFilter
NO_LIMIT
value if the layer should be visible
for any zoom factor smaller than a minimum zoom factor
or, conversely, for any
zoom factor larger than a maximum zoom factor.Modifier and Type | Field and Description |
---|---|
static double |
NO_LIMIT
The value meaning that a scale limit is undefined.
|
Constructor and Description |
---|
IlvZoomFactorVisibilityFilter(double minZoomFactor,
double maxZoomFactor)
Initializes an
IlvZoomFactorVisibilityFilter object. |
IlvZoomFactorVisibilityFilter(IlvInputStream stream)
Initializes an
IlvZoomFactorVisibilityFilter from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
double |
getMaxZoomFactor()
Sets the maximum zoom factor.
|
double |
getMinZoomFactor()
Returns the minimum zoom factor.
|
boolean |
isPersistent()
Returns
true if the filter must be saved. |
boolean |
isVisible(IlvManagerLayer layer,
IlvManagerView view)
Returns
true if the zoom factor of the layer in the argument
view is between
the maximum and the minimum zoom factors. |
void |
setMaxZoomFactor(double maxZoomFactor)
Sets the maximal zoom factor at which the filtered layer is visible.
|
void |
setMinZoomFactor(double minZoomFactor)
Sets the minimal zoom factor at which the filtered layer is visible.
|
void |
setPersistent(boolean persistent)
Specifies whether the filter must be saved or not.
|
void |
write(IlvOutputStream stream)
Writes the filter to an
IlvOutputStream . |
public static final double NO_LIMIT
public IlvZoomFactorVisibilityFilter(double minZoomFactor, double maxZoomFactor)
IlvZoomFactorVisibilityFilter
object.
The layer will be visible if its zoom factor is between
minZoomFactor
and maxZoomFactor
.minZoomFactor
- The minimum zoom factor at which the layer will be visible.
If no minimum zoom factor is required,
you must pass the value NO_LIMIT
.maxZoomFactor
- The maximum zoom factor at which the layer will be visible.
If no maximum zoom factor is required,
you must pass the value NO_LIMIT
.NO_LIMIT
public IlvZoomFactorVisibilityFilter(IlvInputStream stream) throws IlvReadFileException
IlvZoomFactorVisibilityFilter
from an
IlvInputStream
.IlvReadFileException
public boolean isVisible(IlvManagerLayer layer, IlvManagerView view)
true
if the zoom factor of the layer in the argument
view
is between
the maximum and the minimum zoom factors.isVisible
in class IlvLayerVisibilityFilter
public boolean isPersistent()
true
if the filter must be saved. By default, it
returns true
.isPersistent
in class IlvLayerVisibilityFilter
public void setPersistent(boolean persistent)
persistent
- If true
, the filter will be saved.public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvLayerVisibilityFilter
stream
- The output stream.IOException
- standard IO error.public double getMinZoomFactor()
public void setMinZoomFactor(double minZoomFactor)
minZoomFactor
- The minimum zoom factor.public double getMaxZoomFactor()
public void setMaxZoomFactor(double maxZoomFactor)
maxZoomFactor
- The maximum zoom factor.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.