public class DefaultColorTableLibrary extends 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(ArrayList<ColorItem> list,
double value)
Devuelve el color si lo encuentra en el arraylist y lo elimina, en caso
contrario devuelve null
|
String |
getDefaultPaletteXML()
Devuelve el XML de una paleta por defecto
|
String[] |
getFormats()
Lista de formatos soportados por RasterLegendIO
|
static ColorTableLibrary |
getInstance()
Gets the ColorTableLibrary
|
ArrayList<String> |
getPaletteFileList(String palettesBasePath)
Devuelve la lista de ficheros de paletas, si no existe el fichero creara
una paleta por defecto y la devolvera.
|
ArrayList<String> |
getPaletteFileList(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.
|
String |
loadPalette(String palettesBasePath,
String paletteFileName,
ArrayList<ColorItem> items)
Lee una paleta del fichero xml de paletas y la carga en la tabla del panel.
|
void |
save_to_1_1(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(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(String palettesBasePath)
Invocará todos los metodos de actualizaciones de version
|
public static ColorTableLibrary getInstance()
public String[] getFormats()
ColorTableLibrary
getFormats
in interface ColorTableLibrary
public ColorItem createColorItem()
ColorTableLibrary
createColorItem
in interface ColorTableLibrary
public ColorTable createColorTable()
ColorTableLibrary
createColorTable
in interface ColorTableLibrary
public ArrayList<String> getPaletteFileList(String palettesBasePath) throws FilePaletteException
ColorTableLibrary
getPaletteFileList
in interface ColorTableLibrary
FilePaletteException
public ArrayList<String> getPaletteFileList(String palettesBasePath, boolean forceCreate) throws FilePaletteException
palettesBasePath
- forceCreate
- FilePaletteException
public String getDefaultPaletteXML() throws FilePaletteException
FilePaletteException
public void updateVersion_1_0_to_1_1(String palettesBasePath) throws FilePaletteException
palettesPath
- FilePaletteException
public void save_to_1_1(String palettesBasePath, ColorTable colorTable)
ColorTableLibrary
save_to_1_1
in interface ColorTableLibrary
public void updateVersion(String palettesBasePath) throws FilePaletteException
palettesBasePath
- FilePaletteException
public ColorItem getColorItem(ArrayList<ColorItem> list, double value)
list
- value
- public String loadPalette(String palettesBasePath, String paletteFileName, ArrayList<ColorItem> items) throws FilePaletteException
ColorTableLibrary
loadPalette
in interface ColorTableLibrary
FilePaletteException