gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.impl / src / main / java / org / gvsig / raster / impl / grid / GridPaletteDeprecated.java @ 2443
History | View | Annotate | Download (2.38 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.impl.grid; |
23 |
|
24 |
import org.gvsig.fmap.dal.coverage.store.props.ColorTable; |
25 |
import org.gvsig.raster.impl.store.properties.DataStoreColorTable; |
26 |
/**
|
27 |
* Tabla de color asociada a un grid
|
28 |
*
|
29 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
30 |
*/
|
31 |
public class GridPaletteDeprecated extends DataStoreColorTable { |
32 |
/**
|
33 |
* Flag de activaci?n de la paleta cuando se visualiza o exporta.
|
34 |
*/
|
35 |
private boolean paletteActive = true; |
36 |
|
37 |
/**
|
38 |
* Constructor
|
39 |
* @param fp
|
40 |
*/
|
41 |
public GridPaletteDeprecated() {
|
42 |
paletteActive = true;
|
43 |
} |
44 |
|
45 |
/**
|
46 |
* Constructor
|
47 |
* @param fp
|
48 |
*/
|
49 |
public GridPaletteDeprecated(ColorTable fp){
|
50 |
if (fp == null) |
51 |
return;
|
52 |
DataStoreColorTable palette = null;
|
53 |
if(fp instanceof DataStoreColorTable) |
54 |
palette = (DataStoreColorTable)fp; |
55 |
else
|
56 |
return;
|
57 |
this.range = palette.getRange();
|
58 |
this.paletteActive = true; |
59 |
this.paletteByBand = palette.getColorTableByBand();
|
60 |
this.nameClass = palette.getNameClass();
|
61 |
this.name = palette.getName();
|
62 |
this.filePath = palette.getFilePath();
|
63 |
this.colorItems = palette.getColorItems();
|
64 |
this.interpolated = palette.isInterpolated();
|
65 |
} |
66 |
|
67 |
/**
|
68 |
* Obtiene el flag de paleta activa o desactivada.
|
69 |
* @return true la paleta est? activa y false desactiva
|
70 |
*/
|
71 |
public boolean isPaletteActive() { |
72 |
return paletteActive;
|
73 |
} |
74 |
|
75 |
/**
|
76 |
* Asigna el flag de paleta activa o desactivada.
|
77 |
* @param paletteActive true activa la paleta false la desactiva
|
78 |
*/
|
79 |
public void setPaletteActive(boolean paletteActive) { |
80 |
this.paletteActive = paletteActive;
|
81 |
} |
82 |
} |