Revision 2308 org.gvsig.raster/branches/org.gvsig.raster_dataaccess_refactoring/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/grid/filter/band/ColorTableListManager.java
ColorTableListManager.java | ||
---|---|---|
128 | 128 |
* @param value |
129 | 129 |
* @return |
130 | 130 |
*/ |
131 |
@SuppressWarnings("unchecked") |
|
132 |
private static ColorItem getColorItem(ArrayList list, double value) { |
|
131 |
private static ColorItem getColorItem(List<ColorItem> list, double value) { |
|
133 | 132 |
for (int i = 0; i < list.size(); i++) { |
134 | 133 |
if (((ColorItem) list.get(i)).getValue() == value) { |
135 | 134 |
return (ColorItem) list.remove(i); |
... | ... | |
144 | 143 |
List<String> linesCloned = null; |
145 | 144 |
|
146 | 145 |
if(lines instanceof ArrayList) { |
147 |
linesCloned = (List<String>)((ArrayList) lines).clone(); |
|
146 |
linesCloned = (List<String>)((ArrayList<?>) lines).clone();
|
|
148 | 147 |
} else { |
149 | 148 |
linesCloned = new ArrayList<String>(); |
150 | 149 |
for (int i = 0; i < lines.size(); i++) { |
... | ... | |
155 | 154 |
String paletteName = ""; |
156 | 155 |
int color = 0; |
157 | 156 |
int alpha = 0; |
158 |
ArrayList rows = new ArrayList();
|
|
157 |
List<ColorItem> rows = new ArrayList<ColorItem>();
|
|
159 | 158 |
|
160 | 159 |
ColorItem colorItem = new ColorItemImpl(); |
161 | 160 |
boolean interpolated = false; |
... | ... | |
237 | 236 |
return colorTable; |
238 | 237 |
} |
239 | 238 |
|
240 |
/* |
|
241 |
* (non-Javadoc) |
|
242 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#createFilterListFromStrings(java.util.ArrayList, java.lang.String, int) |
|
243 |
*/ |
|
244 | 239 |
public int createFilterListFromStrings(List<String> filters, String fil, int filteri) throws FilterTypeException { |
245 | 240 |
String pkgBase = "filter.colortable."; |
246 | 241 |
if (fil.startsWith(pkgBase + "active")) { |
... | ... | |
260 | 255 |
return filteri; |
261 | 256 |
} |
262 | 257 |
|
263 |
/* |
|
264 |
* (non-Javadoc) |
|
265 |
* @see org.gvsig.raster.grid.filter.IRasterFilterListManager#getStringsFromFilterList(java.util.ArrayList, org.gvsig.raster.grid.filter.RasterFilter) |
|
266 |
*/ |
|
267 | 258 |
public List<String> getStringsFromFilterList(List<String> filterList, RasterFilter rf) { |
268 | 259 |
if (rf instanceof ColorTableFilter) { |
269 | 260 |
String pkgBase = "filter.colortable."; |
... | ... | |
299 | 290 |
return filterList; |
300 | 291 |
} |
301 | 292 |
|
302 |
/* |
|
303 |
* (non-Javadoc) |
|
304 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#getFilterList() |
|
305 |
*/ |
|
306 | 293 |
public RasterFilterList getFilterList() { |
307 | 294 |
return filterList; |
308 | 295 |
} |
309 | 296 |
|
310 |
/* |
|
311 |
* (non-Javadoc) |
|
312 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#setFilterList(org.gvsig.fmap.dal.coverage.grid.RasterFilterList) |
|
313 |
*/ |
|
314 | 297 |
public void setFilterList(RasterFilterList filterList) { |
315 | 298 |
this.filterList = filterList; |
316 | 299 |
} |
317 | 300 |
|
318 |
/* |
|
319 |
* (non-Javadoc) |
|
320 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#addFilter(org.gvsig.fmap.dal.coverage.datastruct.Params) |
|
321 |
*/ |
|
322 | 301 |
public void addFilter(Params params) throws FilterTypeException { |
323 | 302 |
addFilter(ColorTableFilter.class, params); |
324 | 303 |
} |
325 | 304 |
|
326 |
/* |
|
327 |
* (non-Javadoc) |
|
328 |
* @see org.gvsig.fmap.dal.coverage.grid.RasterFilterListManager#createFilter(org.gvsig.fmap.dal.coverage.datastruct.Params) |
|
329 |
*/ |
|
330 | 305 |
public RasterFilter createFilter(Params params) { |
331 | 306 |
ColorTable colorTable = ((ColorTable) params.getParamById("colorTable").getDefaultValue()); |
332 | 307 |
|
Also available in: Unified diff