Revision 982 org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/properties/panel/InfoPanel.java
InfoPanel.java | ||
---|---|---|
39 | 39 |
import org.gvsig.fmap.dal.coverage.store.props.Metadata; |
40 | 40 |
import org.gvsig.gui.beans.panelGroup.panels.AbstractPanel; |
41 | 41 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
42 |
import org.gvsig.raster.impl.store.properties.SimpleProviderHistogramComputer; |
|
42 | 43 |
import org.gvsig.utils.swing.JComboBox; |
44 |
import org.slf4j.Logger; |
|
45 |
import org.slf4j.LoggerFactory; |
|
43 | 46 |
|
44 | 47 |
/** |
45 | 48 |
* Panel de informaci?n sobre raster. La informaci?n que aparece en este panel |
... | ... | |
81 | 84 |
* |
82 | 85 |
*/ |
83 | 86 |
public class InfoPanel extends AbstractPanel { |
84 |
private static final long serialVersionUID = -3764465947289974528L; |
|
85 |
private final String bgColor0 = "\"#FEEDD6\""; // light salmon |
|
86 |
private final String bgColor1 = "\"#EAEAEA\""; // light grey |
|
87 |
private final String bgColor3 = "\"#FBFFE1\""; // light yellow |
|
88 |
private final String bgColor4 = "\"#D6D6D6\""; // Gris |
|
89 |
private final String bgColorBody = "\"#FFFFFF\""; // white |
|
87 |
private static final long serialVersionUID = -3764465947289974528L; |
|
88 |
private static final Logger logger = LoggerFactory.getLogger(SimpleProviderHistogramComputer.class); |
|
89 |
private final String bgColor0 = "\"#FEEDD6\""; // light salmon |
|
90 |
private final String bgColor1 = "\"#EAEAEA\""; // light grey |
|
91 |
private final String bgColor3 = "\"#FBFFE1\""; // light yellow |
|
92 |
private final String bgColor4 = "\"#D6D6D6\""; // Gris |
|
93 |
private final String bgColorBody = "\"#FFFFFF\""; // white |
|
90 | 94 |
|
91 |
private JScrollPane jScrollPane = null;
|
|
92 |
public JEditorPane jEditorPane = null;
|
|
93 |
private JComboBox jComboBox = null;
|
|
94 |
private int selectedDataSet = 0;
|
|
95 |
private boolean jComboBoxEvent = false;
|
|
95 |
private JScrollPane jScrollPane = null;
|
|
96 |
public JEditorPane jEditorPane = null;
|
|
97 |
private JComboBox jComboBox = null;
|
|
98 |
private int selectedDataSet = 0;
|
|
99 |
private boolean jComboBoxEvent = false;
|
|
96 | 100 |
/** |
97 | 101 |
* Cabecera de las columnas del dialogo |
98 | 102 |
*/ |
99 |
public Object[] columnNames = { "Propiedad", "Valor" };
|
|
100 |
private FLyrRaster lyr = null;
|
|
103 |
public Object[] columnNames = { "Propiedad", "Valor" };
|
|
104 |
private FLyrRaster lyr = null;
|
|
101 | 105 |
/** |
102 | 106 |
* Booleano que est? a true cuando la fila a dibujar es par y a false cuando |
103 | 107 |
* es impar. |
104 | 108 |
*/ |
105 |
private boolean rowColor = true;
|
|
106 |
private RasterManager rManager = null;
|
|
109 |
private boolean rowColor = true;
|
|
110 |
private RasterManager rManager = null;
|
|
107 | 111 |
|
108 | 112 |
/** |
109 | 113 |
* This is the default constructor |
... | ... | |
378 | 382 |
|
379 | 383 |
data = ""; |
380 | 384 |
try { |
381 |
int count = lyr.getDataStore().getOverviewCountByProvider(j)[selectedDataSet];
|
|
385 |
int count = lyr.getDataStore().getOverviewCount(j);
|
|
382 | 386 |
if (count > 0) { |
383 | 387 |
for (int i = 0; i < count; i++) { |
384 |
if (!data.equals("")) |
|
385 |
data += ", "; |
|
386 |
data += lyr.getDataStore().getOverviewSizeByProvider(j, i)[selectedDataSet]; |
|
388 |
int w = lyr.getDataStore().getOverviewWidth(j, i); |
|
389 |
int h = lyr.getDataStore().getOverviewHeight(j, i); |
|
390 |
if(w != 0 && h != 0) |
|
391 |
data += i + ": " + "(" + w + "X" + h + ")<BR>"; |
|
387 | 392 |
} |
388 | 393 |
propiedades += setHTMLBasicProperty("Overviews", data); |
389 | 394 |
} |
390 | 395 |
} catch (BandAccessException e) { |
391 |
// No se obtiene el contador de overviews |
|
396 |
logger.info("Error reading overviews", e); |
|
397 |
} catch (RasterDriverException e) { |
|
398 |
logger.info("Error reading overviews", e); |
|
392 | 399 |
} |
393 | 400 |
} |
394 | 401 |
|
Also available in: Unified diff