Class DefaultRasterLegend
java.lang.Object
org.gvsig.fmap.raster.lib.legend.impl.DefaultRasterLegend
- All Implemented Interfaces:
Cloneable,org.gvsig.fmap.mapcontext.rendering.legend.ILegend,org.gvsig.fmap.mapcontext.rendering.legend.Legend,org.gvsig.raster.lib.legend.api.RasterLegend,org.gvsig.tools.lang.Cloneable,org.gvsig.tools.observer.Observer,org.gvsig.tools.persistence.Persistent
public class DefaultRasterLegend
extends Object
implements org.gvsig.raster.lib.legend.api.RasterLegend
Default implementation of
RasterLegend. This object can draw buffers
with a ColorInterpretation, ColorTable and OperationList- Author:
- Lluis Marques
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructorDefaultRasterLegend(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) DefaultRasterLegendconstructorDefaultRasterLegend(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation, org.gvsig.raster.lib.legend.api.Transparency transparency, org.gvsig.raster.lib.buffer.api.operations.OperationList filters) DefaultRasterLegendconstructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCMYKToRGBOperation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) voidaddColorTableOperation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation, int index) voidaddHSLToRGBOperation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) voidaddLegendListener(org.gvsig.fmap.mapcontext.rendering.legend.events.LegendContentsChangedListener listener) voidaddLinearStretchEnhancementOperationIfNeeded(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation, List<org.gvsig.fmap.dal.raster.BandDescriptor> bands, int index) voidaddYCBCRToRGBOperation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) booleanclone()org.gvsig.fmap.mapcontext.rendering.legend.ILegendvoiddraw(Graphics graphics, org.gvsig.raster.lib.buffer.api.Buffer buffer, org.gvsig.fmap.mapcontext.ViewPort viewPort, org.gvsig.tools.task.SimpleTaskStatus taskStatus) voidfireColorinterpretationChangedEvent(org.gvsig.fmap.mapcontext.raster.api.legend.RasterLegendEvent event) voidfireDefaultSymbolChangedEvent(org.gvsig.fmap.mapcontext.rendering.legend.events.SymbolLegendEvent event) voidfireOperationListChangedEvent(org.gvsig.fmap.mapcontext.raster.api.legend.RasterLegendEvent event) org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretationorg.gvsig.fmap.mapcontext.rendering.symbols.ISymbolorg.gvsig.raster.lib.buffer.api.operations.OperationListorg.gvsig.fmap.mapcontext.rendering.legend.events.LegendContentsChangedListener[]org.gvsig.raster.lib.legend.api.TransparencyvoidloadFromState(org.gvsig.tools.persistence.PersistentState state) static voidvoidremoveLegendListener(org.gvsig.fmap.mapcontext.rendering.legend.events.LegendContentsChangedListener listener) voidsaveToState(org.gvsig.tools.persistence.PersistentState state) voidsetColorInterpretation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) voidsetFilters(org.gvsig.raster.lib.buffer.api.operations.OperationList filterList) voidsetTransparency(org.gvsig.raster.lib.legend.api.Transparency transparency) voidsetTransparentNoData(boolean noDataTransparent) void
-
Field Details
-
LEGEND_NAME
- See Also:
-
PERSISTENT_NAME
Persistence definition name- See Also:
-
PERSISTENT_DESCRIPTION
Description of persistence definition- See Also:
-
-
Constructor Details
-
DefaultRasterLegend
public DefaultRasterLegend()Empty constructor -
DefaultRasterLegend
public DefaultRasterLegend(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) DefaultRasterLegendconstructor- Parameters:
colorInterpretation- Color interpretation of legend
-
DefaultRasterLegend
public DefaultRasterLegend(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation, org.gvsig.raster.lib.legend.api.Transparency transparency, org.gvsig.raster.lib.buffer.api.operations.OperationList filters) DefaultRasterLegendconstructor- Parameters:
colorInterpretation- Color interpretation of legendtransparency- Transparency of legendfilters- Filters of legendcolorTable- Color table of legend
-
-
Method Details
-
draw
public void draw(Graphics graphics, org.gvsig.raster.lib.buffer.api.Buffer buffer, org.gvsig.fmap.mapcontext.ViewPort viewPort, org.gvsig.tools.task.SimpleTaskStatus taskStatus) - Specified by:
drawin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
getColorInterpretation
public org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation getColorInterpretation()- Specified by:
getColorInterpretationin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
setColorInterpretation
public void setColorInterpretation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) - Specified by:
setColorInterpretationin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
getFilters
public org.gvsig.raster.lib.buffer.api.operations.OperationList getFilters()- Specified by:
getFiltersin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
setFilters
public void setFilters(org.gvsig.raster.lib.buffer.api.operations.OperationList filterList) - Specified by:
setFiltersin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
registerPersistence
public static void registerPersistence() -
saveToState
public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
saveToStatein interfaceorg.gvsig.tools.persistence.Persistent- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.Persistent- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
setTransparency
public void setTransparency(org.gvsig.raster.lib.legend.api.Transparency transparency) - Specified by:
setTransparencyin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
getTransparency
public org.gvsig.raster.lib.legend.api.Transparency getTransparency()- Specified by:
getTransparencyin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
getDefaultSymbol
public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getDefaultSymbol()- Specified by:
getDefaultSymbolin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.ILegend
-
clone
- Specified by:
clonein interfaceorg.gvsig.tools.lang.Cloneable- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
cloneLegend
public org.gvsig.fmap.mapcontext.rendering.legend.ILegend cloneLegend()- Specified by:
cloneLegendin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.ILegend
-
fireDefaultSymbolChangedEvent
public void fireDefaultSymbolChangedEvent(org.gvsig.fmap.mapcontext.rendering.legend.events.SymbolLegendEvent event) - Specified by:
fireDefaultSymbolChangedEventin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.ILegend
-
getListeners
public org.gvsig.fmap.mapcontext.rendering.legend.events.LegendContentsChangedListener[] getListeners()- Specified by:
getListenersin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.ILegend
-
setTransparentNoData
public void setTransparentNoData(boolean noDataTransparent) - Specified by:
setTransparentNoDatain interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
areTransparentNoData
public boolean areTransparentNoData()- Specified by:
areTransparentNoDatain interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
update
- Specified by:
updatein interfaceorg.gvsig.tools.observer.Observer
-
fireColorinterpretationChangedEvent
public void fireColorinterpretationChangedEvent(org.gvsig.fmap.mapcontext.raster.api.legend.RasterLegendEvent event) - Parameters:
event-
-
fireOperationListChangedEvent
public void fireOperationListChangedEvent(org.gvsig.fmap.mapcontext.raster.api.legend.RasterLegendEvent event) - Parameters:
event-
-
addLegendListener
public void addLegendListener(org.gvsig.fmap.mapcontext.rendering.legend.events.LegendContentsChangedListener listener) - Specified by:
addLegendListenerin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.ILegend
-
removeLegendListener
public void removeLegendListener(org.gvsig.fmap.mapcontext.rendering.legend.events.LegendContentsChangedListener listener) - Specified by:
removeLegendListenerin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.ILegend
-
addColorTableOperation
public void addColorTableOperation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation, int index) - Specified by:
addColorTableOperationin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
addLinearStretchEnhancementOperationIfNeeded
public void addLinearStretchEnhancementOperationIfNeeded(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation, List<org.gvsig.fmap.dal.raster.BandDescriptor> bands, int index) - Specified by:
addLinearStretchEnhancementOperationIfNeededin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
addHSLToRGBOperation
public void addHSLToRGBOperation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) - Specified by:
addHSLToRGBOperationin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
addCMYKToRGBOperation
public void addCMYKToRGBOperation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) - Specified by:
addCMYKToRGBOperationin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-
addYCBCRToRGBOperation
public void addYCBCRToRGBOperation(org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation colorInterpretation) - Specified by:
addYCBCRToRGBOperationin interfaceorg.gvsig.raster.lib.legend.api.RasterLegend
-