root / trunk / libraries / libRaster / src / org / gvsig / raster / grid / filter / bands / ColorTableListManager.java @ 12180
History | View | Annotate | Download (3.04 KB)
1 | 12066 | nacho | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007 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.filter.bands; |
||
20 | |||
21 | import java.util.ArrayList; |
||
22 | |||
23 | import org.gvsig.raster.dataset.Params; |
||
24 | import org.gvsig.raster.grid.GridPalette; |
||
25 | import org.gvsig.raster.grid.filter.IRasterFilterListManager; |
||
26 | import org.gvsig.raster.grid.filter.RasterFilter; |
||
27 | import org.gvsig.raster.grid.filter.RasterFilterList; |
||
28 | import org.gvsig.raster.grid.filter.RasterFilterListManager; |
||
29 | import org.gvsig.raster.util.extensionPoints.ExtensionPoints; |
||
30 | import org.gvsig.raster.util.extensionPoints.ExtensionPointsSingleton; |
||
31 | |||
32 | /**
|
||
33 | * Gestor del filtro de aplicaci?n de tablas de color sobre un raster.
|
||
34 | *
|
||
35 | * @version 06/06/2007
|
||
36 | * @author Nacho Brodin (nachobrodin@gmail.com)
|
||
37 | *
|
||
38 | */
|
||
39 | public class ColorTableListManager implements IRasterFilterListManager { |
||
40 | |||
41 | protected RasterFilterList filterList = null; |
||
42 | private RasterFilterListManager filterListManager = null; |
||
43 | 12122 | bsanchez | |
44 | public static void register() { |
||
45 | 12066 | nacho | ExtensionPoints extensionPoints = ExtensionPointsSingleton.getInstance(); |
46 | extensionPoints.add("RasterFilter", "ColorTable", ColorTableListManager.class); |
||
47 | } |
||
48 | 12122 | bsanchez | |
49 | 12066 | nacho | /**
|
50 | * Constructor.
|
||
51 | * Asigna la lista de filtros y el managener global.
|
||
52 | *
|
||
53 | * @param filterListManager
|
||
54 | */
|
||
55 | public ColorTableListManager(RasterFilterListManager filterListManager) {
|
||
56 | this.filterListManager = filterListManager;
|
||
57 | this.filterList = filterListManager.getFilterList();
|
||
58 | } |
||
59 | 12122 | bsanchez | |
60 | 12066 | nacho | /**
|
61 | * A?ade un filtro de tabla de color a la pila de filtros.
|
||
62 | * @param ladoVentana
|
||
63 | */
|
||
64 | 12166 | bsanchez | public void addColorTableFilter(GridPalette palette) { |
65 | RasterFilter filter = new ColorTableByteFilter();
|
||
66 | 12066 | nacho | |
67 | //Cuando el filtro esta creado, tomamos los valores y lo a?adimos a la pila
|
||
68 | |||
69 | 12166 | bsanchez | if (filter != null) { |
70 | filter.addParam("colorTable", palette);
|
||
71 | filterList.add(filter); |
||
72 | 12066 | nacho | } |
73 | } |
||
74 | |||
75 | /*
|
||
76 | * (non-Javadoc)
|
||
77 | * @see org.gvsig.raster.grid.filter.IRasterFilterListManager#getRasterFilterList()
|
||
78 | */
|
||
79 | public ArrayList getRasterFilterList() { |
||
80 | ArrayList filters = new ArrayList(); |
||
81 | filters.add(ColorTableFilter.class); |
||
82 | return filters;
|
||
83 | } |
||
84 | 12122 | bsanchez | |
85 | 12066 | nacho | public void addFilter(Class classFilter, Params params) { |
86 | 12122 | bsanchez | |
87 | 12066 | nacho | } |
88 | |||
89 | public int createFilterListFromStrings(ArrayList filters, String fil, int filteri) { |
||
90 | return 0; |
||
91 | } |
||
92 | |||
93 | public ArrayList getStringsFromFilterList(ArrayList filterList, RasterFilter rf) { |
||
94 | return null; |
||
95 | } |
||
96 | |||
97 | } |