Revision 11444
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/histogram/HistogramPanelListener.java | ||
---|---|---|
124 | 124 |
public void actionPerformed(ActionEvent e) { |
125 | 125 |
if (!eventsEnabled) return; |
126 | 126 |
|
127 |
// Boton de desmarcar todas las bandas |
|
127 | 128 |
if (e.getSource() == getHistogramPanel().getButtonClean()) { |
128 | 129 |
getHistogramPanel().refreshBands(false); |
129 | 130 |
for (int i = 0; i < showBands.length; i++) |
... | ... | |
133 | 134 |
return; |
134 | 135 |
} |
135 | 136 |
|
137 |
// Boton de marcar todas las bandas |
|
136 | 138 |
if (e.getSource() == getHistogramPanel().getButtonShowAll()) { |
137 | 139 |
getHistogramPanel().refreshBands(true); |
138 | 140 |
for (int i = 0; i < showBands.length; i++) |
... | ... | |
150 | 152 |
return; |
151 | 153 |
} |
152 | 154 |
|
155 |
// Checkbox de eliminas extremos |
|
153 | 156 |
if (e.getSource() == getHistogramPanel().getCBDeleteEdges()) { |
154 | 157 |
updateGraphic(); |
155 | 158 |
return; |
... | ... | |
166 | 169 |
|
167 | 170 |
//-------------------------------------- |
168 | 171 |
// Boton Crear Tabla |
169 |
|
|
170 | 172 |
JButton table = getHistogramPanel().getBCreateTable(); |
171 | 173 |
if (e.getSource() == table) { |
172 | 174 |
try { |
... | ... | |
252 | 254 |
JOptionPane.showMessageDialog((Component)PluginServices.getMainFrame(),getHistogramPanel().getName() + " " + PluginServices.getText(this,"table_not_create")); |
253 | 255 |
} |
254 | 256 |
} |
255 |
|
|
256 | 257 |
} |
257 | 258 |
|
258 | 259 |
/** |
... | ... | |
318 | 319 |
} |
319 | 320 |
} |
320 | 321 |
|
321 |
// long[][] auxHistogram = getLastHistogram().getHistogramByType(Histogram.getType(getHistogramPanel().getJComboBoxTipo().getSelectedIndex())); |
|
322 |
// if (auxHistogram == null) return; |
|
323 |
|
|
324 | 322 |
// Definimos el principio y final de la grafica, sirve para descartar valores. |
325 | 323 |
int first = (int) getHistogramPanel().getBoxesValues(false)[1]; |
326 | 324 |
int end = (int) getHistogramPanel().getBoxesValues(false)[0]; |
... | ... | |
359 | 357 |
} |
360 | 358 |
|
361 | 359 |
getHistogramPanel().getGraphicContainer().getPGraphic().setNewChart(newHistogram, bandNames); |
362 |
updateStatistic(); |
|
363 | 360 |
} |
364 | 361 |
|
365 | 362 |
/** |
... | ... | |
373 | 370 |
lastHistogram = value; |
374 | 371 |
refreshBands(); |
375 | 372 |
updateGraphic(); |
373 |
updateStatistic(); |
|
376 | 374 |
|
377 | 375 |
// Activo la ejecucion de los eventos porque seguro que ya tenemos un histograma |
378 | 376 |
eventsEnabled = true; |
... | ... | |
391 | 389 |
* Eventos de los BoxValues |
392 | 390 |
*/ |
393 | 391 |
public void actionValueChanged(GraphicEvent e) { |
394 |
updateGraphic();
|
|
392 |
updateStatistic();
|
|
395 | 393 |
} |
396 | 394 |
|
397 | 395 |
/** |
... | ... | |
419 | 417 |
return channel; |
420 | 418 |
} |
421 | 419 |
|
420 |
/** |
|
421 |
* Cuando se selecciona/deselecciona una banda |
|
422 |
*/ |
|
422 | 423 |
public void propertyChange(PropertyChangeEvent evt) { |
423 | 424 |
if (!eventsEnabled) return; |
424 | 425 |
int countRow = ((DefaultTableModel) histogramPanel.getJTableBands().getModel()).getRowCount(); |
Also available in: Unified diff