public class FLayerStatus extends Object implements IFLayerStatus
All layers in libFMap can be in a set of states, that their combination represent the status of a layer.
FLayerStatus
class supports the common status for all kind of FLyrDefault
layers.
This means that not necessarily all layers can stay in all possible status, it depends on its particular nature.
Layer status states defined in FLayerStatus
are:
IFLayerStatus
Modifier and Type | Class and Description |
---|---|
static class |
FLayerStatus.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
boolean |
active
The layer is active if it's selected at the TOC.
|
boolean |
available
Layer's availability: the layer is available if the source of its data is on-line.
|
boolean |
cacheDrawnLayers
This state reports if the layer stores previous draws.
|
boolean |
dirty
One layer is dirty if needs to be refreshed.
|
boolean |
editing
This parameter reports if the layer it's being edited now.
|
boolean |
inTOC
The layer is in TOC if it's being listed in a TOC GUI.
|
boolean |
visible
Layer's visibility: the layer is visible if it's selected its check box associated in TOC.
|
boolean |
writable
This parameter reports if the layer can be modified and saved the changes.
|
Constructor and Description |
---|
FLayerStatus()
Creates an instance with the default status of a
FLyrDefault layer:
Visible: true . |
Modifier and Type | Method and Description |
---|---|
void |
addLayerError(BaseException error)
Stores information of an exception produced working with a driver of the layer.
|
FLayerStatus |
cloneStatus() |
boolean |
equals(Object obj) |
BaseException |
getError(int i)
Gets the information of the nth layer driver exception registered in the status.
|
List |
getErrors()
Returns a list of errors produced in a layer working with its driver.
|
int |
getNumErrors()
Gets the number of driver exceptions produced working with the layer.
|
boolean |
isDriverLoaded()
Returns if has been loaded successfully the driver for managing the layer.
|
boolean |
isOk()
Returns if there have been driver errors working with the layer.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setDriverLoaded(boolean driverLoaded)
Sets if has been loaded successfully the driver for managing the layer.
|
void |
setLayerError(Exception ex) |
public boolean available
Layer's availability: the layer is available if the source of its data is on-line.
public boolean visible
Layer's visibility: the layer is visible if it's selected its check box associated in TOC. This implies that layer will tried to be painted unless the necessary data would be unavailable; this situation is more frequent with layers of remote services.
public boolean active
The layer is active if it's selected at the TOC.
public boolean dirty
One layer is dirty if needs to be refreshed.
public boolean inTOC
The layer is in TOC if it's being listed in a TOC GUI.
public boolean editing
This parameter reports if the layer it's being edited now.
public boolean writable
This parameter reports if the layer can be modified and saved the changes.
public boolean cacheDrawnLayers
This state reports if the layer stores previous draws. That's useful to accelerate the draw of the layer.
public FLayerStatus()
Creates an instance with the default status of a FLyrDefault
layer:
true
.false
.true
.false
.false
.false
.true
.true
.false
.public void addLayerError(BaseException error)
Stores information of an exception produced working with a driver of the layer.
error
- the driver exceptionpublic void setLayerError(Exception ex)
public FLayerStatus cloneStatus()
public int getNumErrors()
Gets the number of driver exceptions produced working with the layer.
public BaseException getError(int i)
Gets the information of the nth layer driver exception registered in the status.
i
- ith layer exception registeredpublic boolean isOk()
Returns if there have been driver errors working with the layer.
true
if there have driver errors working with the layer; otherwise false
public List getErrors()
Returns a list of errors produced in a layer working with its driver.
public boolean isDriverLoaded()
Returns if has been loaded successfully the driver for managing the layer.
true
if has been loaded successfully the driver for managing the layer; otherwise false
public void setDriverLoaded(boolean driverLoaded)
Sets if has been loaded successfully the driver for managing the layer.
driverLoaded
- true
if has been loaded successfully the driver for managing the layer; otherwise false
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException