public class DefaultColorTableLibrary extends java.lang.Object implements ColorTableLibrary
| Constructor and Description |
|---|
DefaultColorTableLibrary() |
| Modifier and Type | Method and Description |
|---|---|
ColorItem |
createColorItem()
Creates a new ColorItem
|
ColorTable |
createColorTable()
Creates an empty color table
|
ColorItem |
getColorItem(java.util.ArrayList<ColorItem> list,
double value)
Devuelve el color si lo encuentra en el arraylist y lo elimina, en caso
contrario devuelve null
|
java.lang.String |
getDefaultPaletteXML()
Devuelve el XML de una paleta por defecto
|
java.lang.String[] |
getFormats()
Lista de formatos soportados por RasterLegendIO
|
static ColorTableLibrary |
getInstance()
Gets the ColorTableLibrary
|
java.util.ArrayList<java.lang.String> |
getPaletteFileList(java.lang.String palettesBasePath)
Devuelve la lista de ficheros de paletas, si no existe el fichero creara
una paleta por defecto y la devolvera.
|
java.util.ArrayList<java.lang.String> |
getPaletteFileList(java.lang.String palettesBasePath,
boolean forceCreate)
Devuelve la lista de ficheros de paletas, en caso de que no exista la
paleta y se especifique forceCreate a true, se creara la paleta por defecto.
|
java.lang.String |
loadPalette(java.lang.String palettesBasePath,
java.lang.String paletteFileName,
java.util.ArrayList<ColorItem> items)
Lee una paleta del fichero xml de paletas y la carga en la tabla del panel.
|
void |
save_to_1_1(java.lang.String palettesBasePath,
ColorTable colorTable)
Si existe la version de paleta 1.0, la actualizara a la 1.1 y renombrará la
antigua version.
|
void |
updateVersion_1_0_to_1_1(java.lang.String palettesBasePath)
Si existe la version de paleta 1.1, no lo actualizará, en caso contrario,
buscara la version 1.0 y si lo encuentra lo subirá a la 1.1
|
void |
updateVersion(java.lang.String palettesBasePath)
Invocará todos los metodos de actualizaciones de version
|
public static ColorTableLibrary getInstance()
public java.lang.String[] getFormats()
ColorTableLibrarygetFormats in interface ColorTableLibrarypublic ColorItem createColorItem()
ColorTableLibrarycreateColorItem in interface ColorTableLibrarypublic ColorTable createColorTable()
ColorTableLibrarycreateColorTable in interface ColorTableLibrarypublic java.util.ArrayList<java.lang.String> getPaletteFileList(java.lang.String palettesBasePath)
throws FilePaletteException
ColorTableLibrarygetPaletteFileList in interface ColorTableLibraryFilePaletteExceptionpublic java.util.ArrayList<java.lang.String> getPaletteFileList(java.lang.String palettesBasePath,
boolean forceCreate)
throws FilePaletteException
palettesBasePath - forceCreate - FilePaletteExceptionpublic java.lang.String getDefaultPaletteXML()
throws FilePaletteException
FilePaletteExceptionpublic void updateVersion_1_0_to_1_1(java.lang.String palettesBasePath)
throws FilePaletteException
palettesPath - FilePaletteExceptionpublic void save_to_1_1(java.lang.String palettesBasePath,
ColorTable colorTable)
ColorTableLibrarysave_to_1_1 in interface ColorTableLibrarypublic void updateVersion(java.lang.String palettesBasePath)
throws FilePaletteException
palettesBasePath - FilePaletteExceptionpublic ColorItem getColorItem(java.util.ArrayList<ColorItem> list, double value)
list - value - public java.lang.String loadPalette(java.lang.String palettesBasePath,
java.lang.String paletteFileName,
java.util.ArrayList<ColorItem> items)
throws FilePaletteException
ColorTableLibraryloadPalette in interface ColorTableLibraryFilePaletteException