private void selectBands() { final List<Product> productList = new ArrayList<>(); for (GraphData data : settings.getGraphDataList()) { productList.addAll(Arrays.asList(data.getProducts())); } final Band[] allBandNames = getAvailableBands(productList.toArray(new Product[productList.size()])); Band[] selectedBands = getSelectedBands(); if (selectedBands == null) { selectedBands = allBandNames; } final BandChooser bandChooser = new BandChooser(SnapApp.getDefault().getMainFrame(), "Available Bands", "help", allBandNames, selectedBands, true); if (bandChooser.show() == ModalDialog.ID_OK) { userSelectedBands = bandChooser.getSelectedBands(); recreateDiagram(); } }
void applyFilteredGrids() { if (product != null) { Band[] allBands = product.getBands(); TiePointGrid[] allGrids = product.getTiePointGrids(); BandChooser bandChooser = new BandChooser(SwingUtilities.getWindowAncestor(this), "Available Bands And Tie Point Grids", getHelpId(), false, allBands, selectedBands, allGrids, selectedGrids, true); if (bandChooser.show() == ModalDialog.ID_OK) { selectedBands = bandChooser.getSelectedBands(); selectedGrids = bandChooser.getSelectedTiePointGrids(); productToSelectedBands.put(product, selectedBands); productToSelectedGrids.put(product, selectedGrids); updateTableModel(); } } }
); if (bandChooser.show() == ModalDialog.ID_OK) { final Band[] selectedBands = bandChooser.getSelectedBands(); for (Band selectedBand : selectedBands) { if (!existingBands.contains(selectedBand)) {
Band[] newBands = bandChooser.getSelectedBands(); Arrays.sort(newBands, new SpectralBandComparator());
); if (bandChooser.show() == ModalDialog.ID_OK) { final Band[] selectedBands = bandChooser.getSelectedBands(); for (Band selectedBand : selectedBands) { if (!existingBands.contains(selectedBand)) {
bandsToBeModified = bandChooser.getSelectedBands(); for (final Band band : bandsToBeModified) { applyColorPaletteDef(getFormModel().getModifiedImageInfo().getColorPaletteDef(), band, band.getImageInfo());