root / trunk / libraries / libRaster / src / org / gvsig / raster / grid / GridPalette.java @ 18040
History | View | Annotate | Download (2.05 KB)
1 | 10740 | nacho | /* 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 | 12383 | nacho | import org.gvsig.raster.datastruct.ColorTable; |
22 | 10740 | nacho | /**
|
23 | 12218 | nacho | * Tabla de color asociada a un grid
|
24 | 12367 | bsanchez | *
|
25 | 10740 | nacho | * @author Nacho Brodin (nachobrodin@gmail.com)
|
26 | */
|
||
27 | 12567 | bsanchez | public class GridPalette extends ColorTable { |
28 | 10740 | nacho | /**
|
29 | * Flag de activaci?n de la paleta cuando se visualiza o exporta.
|
||
30 | */
|
||
31 | 12567 | bsanchez | private boolean paletteActive = true; |
32 | 12367 | bsanchez | |
33 | 10740 | nacho | /**
|
34 | * Constructor
|
||
35 | * @param fp
|
||
36 | */
|
||
37 | 12567 | bsanchez | public GridPalette() {
|
38 | paletteActive = true;
|
||
39 | } |
||
40 | |||
41 | /**
|
||
42 | * Constructor
|
||
43 | * @param fp
|
||
44 | */
|
||
45 | 12218 | nacho | public GridPalette(ColorTable fp){
|
46 | 12504 | bsanchez | if (fp == null) |
47 | 10740 | nacho | return;
|
48 | 12504 | bsanchez | this.range = fp.getRange();
|
49 | 12567 | bsanchez | this.paletteActive = true; |
50 | 12218 | nacho | this.paletteByBand = fp.getColorTableByBand();
|
51 | 10740 | nacho | this.nameClass = fp.getNameClass();
|
52 | this.name = fp.getName();
|
||
53 | 12504 | bsanchez | this.filePath = fp.getFilePath();
|
54 | 12553 | bsanchez | this.colorItems = fp.getColorItems();
|
55 | 13396 | bsanchez | this.interpolated = fp.isInterpolated();
|
56 | 10740 | nacho | } |
57 | 12367 | bsanchez | |
58 | 10740 | nacho | /**
|
59 | * Obtiene el flag de paleta activa o desactivada.
|
||
60 | * @return true la paleta est? activa y false desactiva
|
||
61 | */
|
||
62 | public boolean isPaletteActive() { |
||
63 | return paletteActive;
|
||
64 | } |
||
65 | 12367 | bsanchez | |
66 | 10740 | nacho | /**
|
67 | * Asigna el flag de paleta activa o desactivada.
|
||
68 | * @param paletteActive true activa la paleta false la desactiva
|
||
69 | */
|
||
70 | public void setPaletteActive(boolean paletteActive) { |
||
71 | this.paletteActive = paletteActive;
|
||
72 | } |
||
73 | 12367 | bsanchez | } |