public class DefaultRasterLayer extends FLyrDefault implements RasterLayer, RasterLegendChangedListener, java.util.Observer
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultRasterLayer.RegisterPersistence |
FLyrDefault.RegisterMetadatadrawVersion, layerListeners, metadataContainer, propertiesMETADATA_CRS, METADATA_DEFINITION_DESCRIPTION, METADATA_DEFINITION_NAME, METADATA_NAME| Constructor and Description |
|---|
DefaultRasterLayer()
Creates a new DefaultRasterLayer
|
DefaultRasterLayer(RasterStore store,
RasterLegend legend)
Creates a new DefaultRasterLayer
|
| Modifier and Type | Method and Description |
|---|---|
FLayer |
cloneLayer()
This method can be used to have a fast cloned layer.
|
boolean |
colorInterpretationChanged(RasterLegendEvent e) |
RasterQuery |
createRasterQuery()
Creates a new RasterQuery from the store
|
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
void |
draw(java.awt.image.BufferedImage image,
java.awt.Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale)
Draws the layer using a buffer.
|
RasterQuery |
getBaseQuery()
Returns the BaseQuery
|
DataStore |
getDataStore()
Método que devuelve el DataStore del que saca los datos la capa.
|
Envelope |
getFullEnvelope()
Returns the full extension of the layer node.
|
DynObjectSet |
getInfo(Point p,
double tolerance)
Executes a consultation about information of a point on the layer.
|
DynObjectSet |
getInfo(java.awt.Point p,
double tolerance,
Cancellable cancel)
Executes a consultation about information of a point on the layer.
|
DynObjectSet |
getInfo(java.awt.Point p,
double tolerance,
Cancellable cancel,
boolean fast)
Executes a consultation about information of a point on the layer.
|
java.lang.String |
getInfoString()
Returns an string with the information of this layer.
|
RasterLegend |
getLegend()
Devuelve la Leyenda de la capa.
|
java.util.Set<RasterStore> |
getMetadataChildren()
Returns an unsorted set of child Metadata objects.
|
java.lang.Object |
getMetadataID()
Returns the unique identifier of the Metadata.
|
RasterStore |
getRasterStore()
Returns RasterStore of this layer
|
Statistics |
getStatistics(SimpleTaskStatus status) |
java.lang.String |
getTocImageIcon()
Returns the image icon that will be shown in the TOC next to this layer.
|
void |
legendCleared(LegendClearEvent event) |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
boolean |
operationListChanged(RasterLegendEvent e) |
void |
print(java.awt.Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
PrintAttributes properties)
Prints this layer according to some properties requested.
|
void |
recalculateStatistics() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setBaseQuery(RasterQuery baseQuery)
Sets a BaseQuery to be applied to the data in the store
|
void |
setDataStore(DataStore dataStore)
Fija el DataStore asociado a la capa.
|
void |
setLegend(ILegend legend) |
boolean |
symbolChanged(SymbolLegendEvent e)
Invocado cuando se cambia en el legend el símbolo por defecto.
|
void |
update(java.util.Observable observable,
java.lang.Object notification) |
activationChanged, addError, addLayerListener, addLegendListener, allowLinks, callEditionChanged, callLegendChanged, clear, delegate, drawValueChanged, editionChanged, getClassName, getCoordTrans, getDefaultTolerance, getDrawVersion, getDynClass, getDynValue, getError, getErrors, getExtendedProperties, getFLayerStatus, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMetadataName, getMinScale, getName, getNumErrors, getParentLayer, getProjection, getProperty, getTocStatusImage, getTransparency, hasChangedForDrawing, hasDynValue, hidesThisArea, implement, invalidate, invokeDynMethod, invokeDynMethod, isActive, isAvailable, isEditing, isInTOC, isOk, isTemporary, isVisible, isWithinScale, isWritable, load, nameChanged, newComposedLayer, reload, removeLayerListener, removeLegendListener, reProject, setActive, setAvailable, setCoordTrans, setDynValue, setEditing, setError, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setProperty, setTemporary, setTocStatusImage, setTransparency, setVisible, toString, updateDrawVersion, updateDrawVersion, visibilityChanged, visibleRequired, wakeUpdispose, disposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddError, addLayerListener, allowLinks, getCoordTrans, getDefaultTolerance, getDrawVersion, getError, getErrors, getFLayerStatus, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMinScale, getName, getNumErrors, getParentLayer, getTocStatusImage, invalidate, isActive, isAvailable, isEditing, isInTOC, isOk, isTemporary, isVisible, isWithinScale, isWritable, load, newComposedLayer, reload, removeLayerListener, setActive, setAvailable, setCoordTrans, setEditing, setError, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setTemporary, setVisible, visibleRequiredgetProjection, reProjectgetMetadataNameclear, clone, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValuedisposegetExtendedProperties, getProperty, setPropertypublic DefaultRasterLayer()
throws LoadLayerException
LoadLayerExceptionpublic DefaultRasterLayer(RasterStore store, RasterLegend legend)
store - legend - public void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class FLyrDefaultPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class FLyrDefaultPersistenceExceptionpublic RasterLegend getLegend()
getLegend in interface RasterLayerpublic DataStore getDataStore()
SingleLayergetDataStore in interface HasDataStoregetDataStore in interface SingleLayerpublic void setDataStore(DataStore dataStore) throws LoadLayerException
SingleLayersetDataStore in interface SingleLayerdataStore - a usar en la capa.LoadLayerExceptionpublic Envelope getFullEnvelope() throws ReadException
FLayergetFullEnvelope in interface FLayerReadException - if fails the driver used in this method.public void draw(java.awt.image.BufferedImage image,
java.awt.Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale)
throws ReadException
FLayerdraw in interface FLayerimage - an image used to accelerate the screen drawg - for rendering 2-dimensional shapes, text and images on the Java(tm) platformviewPort - information for drawing this layercancel - an object thread that implements the Cancellable interface, and will allow to cancel the drawscale - value that represents the scaleReadException - if fails the driver used in this method.FLayer.print(Graphics2D, ViewPort, Cancellable, double, PrintAttributes)public void print(java.awt.Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
PrintAttributes properties)
throws ReadException
FLayerprint in interface FLayerg - for rendering 2-dimensional shapes, text and images on the Java(tm) platformviewPort - the information for drawing the layerscancel - an object thread that implements the Cancellable interface, and will allow to cancel the drawscale - the scale of the view. Must be between FLayer.getMinScale() and FLayer.getMaxScale().properties - a set with the settings to be applied to a whole print job and to all the docs in the print jobReadException - if fails the driver used in this method.FLayer.draw(BufferedImage, Graphics2D, ViewPort, Cancellable, double)public java.util.Set<RasterStore> getMetadataChildren() throws MetadataException
MetadatagetMetadataChildren in interface MetadataMetadataExceptionpublic java.lang.Object getMetadataID()
throws MetadataException
MetadatagetMetadataID in interface MetadataMetadataExceptionpublic void update(java.util.Observable observable,
java.lang.Object notification)
update in interface java.util.Observerpublic RasterStore getRasterStore()
RasterLayergetRasterStore in interface RasterLayerpublic void setBaseQuery(RasterQuery baseQuery)
RasterLayersetBaseQuery in interface RasterLayerpublic RasterQuery getBaseQuery()
RasterLayergetBaseQuery in interface RasterLayerpublic RasterQuery createRasterQuery()
RasterLayercreateRasterQuery in interface RasterLayerprotected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class AbstractDisposableBaseExceptionAbstractDisposable.dispose()public DynObjectSet getInfo(java.awt.Point p, double tolerance, Cancellable cancel) throws LoadLayerException, DataException
InfoByPointExecutes a consultation about information of a point on the layer.
There is an area around the point where will got the information.
getInfo in interface InfoByPointp - point where is the consultationtolerance - permissible margin around the coordinates of the point where
the method will got the information. Each
singular implementation of this method would use it in a
different way. The coordinates also depend on the
implementation.cancel - shared object that determines if this layer can continue being
drawnLoadLayerException - any exception produced using the driver.DataException - TODOpublic DynObjectSet getInfo(java.awt.Point p, double tolerance, Cancellable cancel, boolean fast) throws LoadLayerException, DataException
InfoByPointExecutes a consultation about information of a point on the layer.
There is an area around the point where will got the information.
getInfo in interface InfoByPointp - point where is the consultationtolerance - permissible margin around the coordinates of the point where
the method will got the information. Each
singular implementation of this method would use it in a
different way. The coordinates also depend on the
implementation.cancel - shared object that determines if this layer can continue being
drawnfast - if true try to reuse objects as much as possible to make the
object iteration faster. If true, DynObjects got through the
returned set must not be stored unless cloned.LoadLayerException - any exception produced using the driver.DataException - TODOpublic DynObjectSet getInfo(Point p, double tolerance) throws LoadLayerException, DataException
InfoByPointExecutes a consultation about information of a point on the layer.
There is an area around the point where will got the information.
getInfo in interface InfoByPointp - point in map coordinates where is the consultationtolerance - permissible margin around the coordinates of the point where
the method will got the information. Each
singular implementation of this method would use it in a
different way. The unit are in map coordinates.LoadLayerExceptionDataExceptionpublic java.lang.String getTocImageIcon()
FLayergetTocImageIcon in interface FLayergetTocImageIcon in class FLyrDefaultnull if there isn't anypublic void setLegend(ILegend legend)
setLegend in interface RasterLayerpublic java.lang.String getInfoString()
FLayergetInfoString in interface FLayergetInfoString in class FLyrDefaultpublic Statistics getStatistics(SimpleTaskStatus status)
getStatistics in interface RasterLayerpublic void recalculateStatistics()
recalculateStatistics in interface RasterLayerpublic FLayer cloneLayer() throws java.lang.Exception
FLayerThis method can be used to have a fast cloned layer.
The implementations should take care of not recreate this layer. Instead of this, is better to use the same source (driver) and deepclone the legend. Exception: the labels aren't deepcloned to avoid memory consumption.
Note: Labels are memory consuming to speed up layers like PostGIS and so on.
cloneLayer in interface FLayercloneLayer in class FLyrDefaultjava.lang.Exception - any exception produced during the cloning of this layer.public boolean symbolChanged(SymbolLegendEvent e)
LegendContentsChangedListenersymbolChanged in interface LegendContentsChangedListenere - SymbolLegendEventpublic void legendCleared(LegendClearEvent event)
legendCleared in interface LegendContentsChangedListenerpublic boolean colorInterpretationChanged(RasterLegendEvent e)
colorInterpretationChanged in interface RasterLegendChangedListenerpublic boolean operationListChanged(RasterLegendEvent e)
operationListChanged in interface RasterLegendChangedListener