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(); } } }
public BandChooser(Window parent, String title, String helpID, Band[] allBands, Band[] selectedBands, Product.AutoGrouping autoGrouping, boolean addLoadSaveConfigurationButtons) { super(parent, title, ModalDialog.ID_OK_CANCEL, helpID); this.addLoadSaveConfigurationButtons = addLoadSaveConfigurationButtons; boolean multipleProducts = bandsAndGridsFromMoreThanOneProduct(allBands, null); strategy = new GroupedBandChoosingStrategy(allBands, selectedBands, null, null, autoGrouping, multipleProducts); selectAtLeastOneBand = false; initUI(); }
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(); } }
content.add(checkPane, BorderLayout.SOUTH); content.setMinimumSize(new Dimension(0, 100)); setContent(content);
final BandChooser bandChooser = new BandChooser(appContext.getApplicationWindow(), "Band Chooser", null, new Band[existingBands.size()]), true ); if (bandChooser.show() == ModalDialog.ID_OK) { final Band[] selectedBands = bandChooser.getSelectedBands(); for (Band selectedBand : selectedBands) { if (!existingBands.contains(selectedBand)) {
BandChooser bandChooser = new BandChooser(interactor.getOptionsWindow(), "Available Bands and Tie Point Grids", "", product.getAutoGrouping(), true); if (bandChooser.show() == ModalDialog.ID_OK) { Band[] newBands = bandChooser.getSelectedBands(); Arrays.sort(newBands, new SpectralBandComparator());
public BandChooser(Window parent, String title, String helpID, boolean selectAtLeastOneBand, Band[] allBands, Band[] selectedBands, TiePointGrid[] allTiePointGrids, TiePointGrid[] selectedTiePointGrids, boolean addLoadSaveConfigurationButtons) { super(parent, title, ModalDialog.ID_OK_CANCEL, helpID); this.addLoadSaveConfigurationButtons = addLoadSaveConfigurationButtons; boolean multipleProducts = bandsAndGridsFromMoreThanOneProduct(allBands, allTiePointGrids); strategy = new DefaultBandChoosingStrategy(allBands, selectedBands, allTiePointGrids, selectedTiePointGrids, multipleProducts); this.selectAtLeastOneBand = selectAtLeastOneBand; initUI(); }
final BandChooser bandChooser = new BandChooser(appContext.getApplicationWindow(), "Band Chooser", null, new Band[existingBands.size()]), true ); if (bandChooser.show() == ModalDialog.ID_OK) { final Band[] selectedBands = bandChooser.getSelectedBands(); for (Band selectedBand : selectedBands) { if (!existingBands.contains(selectedBand)) {
final BandChooser bandChooser = new BandChooser(SwingUtilities.getWindowAncestor(toolView), "Apply to other bands", toolView.getHelpCtx().getHelpID(), if (bandChooser.show() == BandChooser.ID_OK) { bandsToBeModified = bandChooser.getSelectedBands(); for (final Band band : bandsToBeModified) { applyColorPaletteDef(getFormModel().getModifiedImageInfo().getColorPaletteDef(), band, band.getImageInfo());