Revision 2374
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/toc/FPopupMenu.java | ||
---|---|---|
53 | 53 |
import javax.swing.JDialog; |
54 | 54 |
import javax.swing.JMenuItem; |
55 | 55 |
import javax.swing.JPopupMenu; |
56 |
import javax.swing.table.DefaultTableModel; |
|
56 | 57 |
import javax.swing.tree.DefaultMutableTreeNode; |
57 | 58 |
|
58 | 59 |
import org.cresques.io.GeoRasterFile; |
... | ... | |
394 | 395 |
pEnhan.setSelectedFilter(2); |
395 | 396 |
}else |
396 | 397 |
pEnhan.setSelectedFilter(0); |
397 |
|
|
398 |
if(hideBands != null){ |
|
399 |
int pos = 1; |
|
400 |
if(hideBands.length() == 1) |
|
401 |
pos = 2; |
|
402 |
else if(hideBands.length() == 2) |
|
403 |
pos = 3; |
|
404 |
//System.out.println("===??"+bandSetup.getFileList().getJComboBox().getSelectedItem()+" "+pos); |
|
405 |
//bandSetup.getFileList().getJComboBox().setSelectedIndex(pos); |
|
406 |
} |
|
407 |
|
|
408 |
|
|
398 |
|
|
409 | 399 |
GeoRasterFile[] files = ((FLyrRaster)lyr).getSource().getFiles(); |
410 | 400 |
bandSetup.addFiles(files); |
411 | 401 |
for(int i=0; i< files.length;i++) |
... | ... | |
429 | 419 |
bandSetup.assignBand(posR, GeoRasterFile.RED_BAND); |
430 | 420 |
bandSetup.assignBand(posG, GeoRasterFile.GREEN_BAND); |
431 | 421 |
bandSetup.assignBand(posB, GeoRasterFile.BLUE_BAND); |
432 |
|
|
422 |
|
|
423 |
//Selecci?n de 1, 2 o 3 bandas para visualizar |
|
424 |
if(hideBands != null){ |
|
425 |
int pos = 0; |
|
426 |
if(hideBands.length() == 1) |
|
427 |
pos = 2; |
|
428 |
else if(hideBands.length() == 2) |
|
429 |
pos = 1; |
|
430 |
bandSetup.getFileList().getJComboBox().setSelectedIndex(pos); |
|
431 |
|
|
432 |
//Reseteamos los controles de la tabla |
|
433 |
|
|
434 |
for(int i=0;i<bandSetup.getRGBTable().getModel().getRowCount();i++) |
|
435 |
for(int j=0;j<3;j++) |
|
436 |
bandSetup.getRGBTable().getModel().setValueAt(new Boolean(false), i, j); |
|
437 |
|
|
438 |
if(hideBands.equals("GB") || hideBands.equals("G") || hideBands.equals("B") ) |
|
439 |
bandSetup.getRGBTable().getModel().setValueAt(new Boolean(true), posR, 0); |
|
440 |
|
|
441 |
if(hideBands.equals("RB") || hideBands.equals("R") || hideBands.equals("B") ) |
|
442 |
bandSetup.getRGBTable().getModel().setValueAt(new Boolean(true), posG, 1); |
|
443 |
|
|
444 |
if(hideBands.equals("RG") || hideBands.equals("R") || hideBands.equals("G") ) |
|
445 |
bandSetup.getRGBTable().getModel().setValueAt(new Boolean(true), posB, 2); |
|
446 |
} |
|
447 |
|
|
433 | 448 |
propsDialog.readStat(); |
434 | 449 |
|
435 | 450 |
PluginServices.getMDIManager().addView(propsDialog); |
Also available in: Unified diff