for (File file : files) { try { final ColorPaletteDef newCpd = ColorPaletteDef.loadColorPaletteDef(file); newCpdList.add(newCpd); newCpdNames.add(file.getName());
if (file != null && file.canRead()) { try { final ColorPaletteDef colorPaletteDef = ColorPaletteDef.loadColorPaletteDef(file); colorPaletteDef.getFirstPoint().setLabel(file.getName()); applyColorPaletteDef(colorPaletteDef, getProductSceneView().getRaster(), targetImageInfo);
try { log("loading colour palette from: " + _colorPalette.getAbsolutePath()); colorPaletteDef = ColorPaletteDef.loadColorPaletteDef(_colorPalette); } catch (IOException e) { error("failed to load colour palette: " + e.getMessage());