Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libRaster / src / org / gvsig / raster / grid / GridPalette.java @ 12066

History | View | Annotate | Download (2.03 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2006 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 */
19
package org.gvsig.raster.grid;
20

    
21
import org.gvsig.raster.dataset.IBuffer;
22
import org.gvsig.raster.dataset.properties.DatasetPalette;
23

    
24
/**
25
 * Paleta para grid
26
 * 
27
 * @author Nacho Brodin (nachobrodin@gmail.com)
28
 */
29
public class GridPalette extends DatasetPalette{
30
        /**
31
         * Flag de activaci?n de la paleta cuando se visualiza o exporta.
32
         */
33
        private boolean                 paletteActive = false;
34
        
35
        /**
36
         * Constructor
37
         * @param fp
38
         */
39
        public GridPalette(DatasetPalette fp){
40
                if(fp == null)
41
                        return;
42
                this.type = fp.getType();
43
                this.intRange = fp.getIntRange();
44
                this.doubleRange = fp.getDoubleRange();
45
                this.palette = fp.getPalette();
46
                this.paletteByBand = fp.getPaletteByBand();
47
                this.nameClass = fp.getNameClass();
48
                this.name = fp.getName();
49
                if(type != IBuffer.TYPE_UNDEFINED)
50
                        paletteActive = true;
51
        }
52
        
53
        /**
54
         * Obtiene el flag de paleta activa o desactivada.
55
         * @return true la paleta est? activa y false desactiva
56
         */
57
        public boolean isPaletteActive() {
58
                return paletteActive;
59
        }
60
        
61
        /**
62
         * Asigna el flag de paleta activa o desactivada.
63
         * @param paletteActive true activa la paleta false la desactiva
64
         */
65
        public void setPaletteActive(boolean paletteActive) {
66
                this.paletteActive = paletteActive;
67
        }
68
                        
69
        
70
}