当前位置: 首页>>代码示例>>Java>>正文


Java TargetProductSelector类代码示例

本文整理汇总了Java中org.esa.snap.core.gpf.ui.TargetProductSelector的典型用法代码示例。如果您正苦于以下问题:Java TargetProductSelector类的具体用法?Java TargetProductSelector怎么用?Java TargetProductSelector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TargetProductSelector类属于org.esa.snap.core.gpf.ui包,在下文中一共展示了TargetProductSelector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: S2tbxMosaicDialog

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
S2tbxMosaicDialog(final String title, final String helpID, AppContext appContext) {
    super(appContext, title, ID_APPLY_CLOSE, helpID);
    final TargetProductSelector selector = getTargetProductSelector();
    selector.getModel().setSaveToFileSelected(false);
    selector.getModel().setProductName("Multi-size Mosaic");
    selector.getSaveToFileCheckBox().setEnabled(true);
    form = new S2tbxMosaicForm(selector, appContext);

    final OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi("Multi-size Mosaic");

    S2tbxMosaicFormModel formModel = form.getFormModel();
    OperatorParameterSupport parameterSupport = new OperatorParameterSupport(operatorSpi.getOperatorDescriptor(),
            formModel.getPropertySet(),
            formModel.getParameterMap(),
            null);
    OperatorMenu operatorMenu = new OperatorMenu(this.getJDialog(),
            operatorSpi.getOperatorDescriptor(),
            parameterSupport,
            appContext,
            helpID);
    getJDialog().setJMenuBar(operatorMenu.createDefaultMenu());
}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:23,代码来源:S2tbxMosaicDialog.java

示例2: CreateOpTab

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
@Override
public JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext) {

    paramMap = parameterMap;
    targetProductSelector = new TargetProductSelector(new TargetProductSelectorModel(), true);
    this.appContext = appContext;

    File saveDir = null;
    final Object value = paramMap.get(FILE_PARAMETER);
    if (value != null) {
        final File file = (File) value;
        saveDir = file.getParentFile();
    }

    if (saveDir == null) {
        final String homeDirPath = SystemUtils.getUserHomeDir().getPath();
        final String savePath = SnapApp.getDefault().getPreferences().get(SaveProductAsAction.PREFERENCES_KEY_LAST_PRODUCT_DIR, homeDirPath);
        saveDir = new File(savePath);
    }
    targetProductSelector.getModel().setProductDir(saveDir);

    initParameters();

    return targetProductSelector.createDefaultPanel();
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:26,代码来源:TargetUI.java

示例3: ReprojectionForm

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
ReprojectionForm(TargetProductSelector targetProductSelector, boolean orthorectify, AppContext appContext) {
    this.targetProductSelector = targetProductSelector;
    this.orthoMode = orthorectify;
    this.appContext = appContext;
    this.sourceProductSelector = new SourceProductSelector(appContext, "Source Product:");
    if (orthoMode) {
        targetProductSuffix = "orthorectified";
        this.sourceProductSelector.setProductFilter(new OrthorectifyProductFilter());
    } else {
        targetProductSuffix = "reprojected";
        this.sourceProductSelector.setProductFilter(new GeoCodingProductFilter());
    }
    this.reprojectionModel = new Model();
    this.reprojectionContainer = PropertyContainer.createObjectBacked(reprojectionModel);
    createUI();
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:17,代码来源:ReprojectionForm.java

示例4: MosaicDialog

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
MosaicDialog(final String title, final String helpID, AppContext appContext) {
    super(appContext, title, ID_APPLY_CLOSE, helpID);
    final TargetProductSelector selector = getTargetProductSelector();
    selector.getModel().setSaveToFileSelected(true);
    selector.getModel().setProductName("mosaic");
    selector.getSaveToFileCheckBox().setEnabled(false);
    form = new MosaicForm(selector, appContext);

    final OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi("Mosaic");

    MosaicFormModel formModel = form.getFormModel();
    OperatorParameterSupport parameterSupport = new OperatorParameterSupport(operatorSpi.getOperatorDescriptor(),
                                                                             formModel.getPropertySet(),
                                                                             formModel.getParameterMap(),
                                                                             null);
    OperatorMenu operatorMenu = new OperatorMenu(this.getJDialog(),
                                                 operatorSpi.getOperatorDescriptor(),
                                                 parameterSupport,
                                                 appContext,
                                                 helpID);
    getJDialog().setJMenuBar(operatorMenu.createDefaultMenu());
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:23,代码来源:MosaicDialog.java

示例5: CollocationForm

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
public CollocationForm(PropertySet propertySet, TargetProductSelector targetProductSelector, AppContext appContext) {
    this.targetProductSelector = targetProductSelector;
    masterProductSelector = new SourceProductSelector(appContext, "Master (pixel values are conserved):");
    slaveProductSelector = new SourceProductSelector(appContext, "Slave (pixel values are resampled onto the master grid):");
    renameMasterComponentsCheckBox = new JCheckBox("Rename master components:");
    renameSlaveComponentsCheckBox = new JCheckBox("Rename slave components:");
    masterComponentPatternField = new JTextField();
    slaveComponentPatternField = new JTextField();
    resamplingComboBoxModel = new DefaultComboBoxModel<>(ResamplingType.values());
    resamplingComboBox = new JComboBox<>(resamplingComboBoxModel);

    slaveProductSelector.getProductNameComboBox().addActionListener(e -> {
        Product slaveProduct = slaveProductSelector.getSelectedProduct();
        boolean validPixelExpressionUsed = isValidPixelExpressionUsed(slaveProduct);
        adaptResamplingComboBoxModel(resamplingComboBoxModel, validPixelExpressionUsed);
    });

    createComponents();
    bindComponents(propertySet);
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:21,代码来源:CollocationForm.java

示例6: SimpleForm

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
public SimpleForm(AppContext appContext, OperatorSpi operatorSpi, PropertySet propertySet,
                  TargetProductSelector targetProductSelector) {
    this.appContext = appContext;
    this.operatorSpi = operatorSpi;
    this.propertySet = propertySet;
    this.targetProductSelector = targetProductSelector;

    ioParamPanel = createIOParamTab();
    addTab("I/O Parameters", ioParamPanel);
    addTab("Processing Parameters", createProcessingParamTab());
}
 
开发者ID:senbox-org,项目名称:snap-examples,代码行数:12,代码来源:SimpleForm.java

示例7: createUI

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
private void createUI(TargetProductSelector selector) {
    ioPanel = new S2tbxMosaicIOPanel(appContext, mosaicModel, selector);
    mapProjectionPanel = new S2tbxMosaicMapProjectionPanel(appContext, mosaicModel);
    S2tbxMosaicExpressionsPanel expressionsPanel = new S2tbxMosaicExpressionsPanel(appContext, mosaicModel);
    addTab("I/O Parameters", ioPanel); /*I18N*/
    addTab("Map Projection Definition", mapProjectionPanel); /*I18N*/
    addTab("Variables", expressionsPanel);  /*I18N*/
}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:9,代码来源:S2tbxMosaicForm.java

示例8: S2tbxMosaicIOPanel

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
S2tbxMosaicIOPanel(AppContext appContext, S2tbxMosaicFormModel mosaicModel, TargetProductSelector selector) {
    this.appContext = appContext;
    this.mosaicModel = mosaicModel;
    propertySet = mosaicModel.getPropertySet();
    final S2tbxFileArrayEditor.EditorParent context = new S2tbxFileArrayEditorContext(appContext);
    sourceFileEditor = new S2tbxFileArrayEditor(context, "Source products") {
        @Override
        protected JFileChooser createFileChooserDialog() {
            final JFileChooser fileChooser = super.createFileChooserDialog();
            fileChooser.setDialogTitle("Multi-size Mosaic - Open Source Product(s)");
            return fileChooser;
        }
    };
    targetProductSelector = selector;
    updateProductSelector = new SourceProductSelector(appContext);
    updateProductSelector.setProductFilter(new UpdateProductFilter());
    init();
    propertySet.addPropertyChangeListener(S2tbxMosaicFormModel.PROPERTY_UPDATE_MODE, evt -> {
        if (Boolean.TRUE.equals(evt.getNewValue())) {
            propertySet.setValue(S2tbxMosaicFormModel.PROPERTY_UPDATE_PRODUCT,
                                 updateProductSelector.getSelectedProduct());
        } else {
            updateProductSelector.setSelectedProduct(null);
        }
    });
    propertySet.addPropertyChangeListener(S2tbxMosaicFormModel.PROPERTY_UPDATE_PRODUCT,
                                          new TargetProductSelectorUpdater());

}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:30,代码来源:S2tbxMosaicIOPanel.java

示例9: createTargetProductSelectorPanel

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
private static JPanel createTargetProductSelectorPanel(final TargetProductSelector selector) {
    final JPanel subPanel1 = new JPanel(new BorderLayout(3, 3));
    subPanel1.add(selector.getProductNameLabel(), BorderLayout.NORTH);
    subPanel1.add(selector.getProductNameTextField(), BorderLayout.CENTER);

    final JPanel subPanel2 = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
    subPanel2.add(selector.getSaveToFileCheckBox());
    subPanel2.add(selector.getFormatNameComboBox());

    final JPanel subPanel3 = new JPanel(new BorderLayout(3, 3));
    subPanel3.add(selector.getProductDirLabel(), BorderLayout.NORTH);
    subPanel3.add(selector.getProductDirTextField(), BorderLayout.CENTER);
    subPanel3.add(selector.getProductDirChooserButton(), BorderLayout.EAST);

    final TableLayout tableLayout = new TableLayout(1);
    tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
    tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
    tableLayout.setTableWeightX(1.0);

    tableLayout.setCellPadding(0, 0, new Insets(3, 3, 3, 3));
    tableLayout.setCellPadding(1, 0, new Insets(3, 0, 3, 3));
    tableLayout.setCellPadding(2, 0, new Insets(0, 21, 3, 3));

    final JPanel panel = new JPanel(tableLayout);
    panel.add(subPanel1);
    panel.add(subPanel2);
    panel.add(subPanel3);

    return panel;
}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:31,代码来源:S2tbxMosaicIOPanel.java

示例10: BinningForm

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
BinningForm(AppContext appContext, BinningFormModel binningFormModel, TargetProductSelector targetProductSelector) {
    ioPanel = new BinningIOPanel(appContext, binningFormModel, targetProductSelector);
    addTab("I/O Parameters", ioPanel);
    addTab("Filter", new BinningFilterPanel(binningFormModel));
    configurationPanel = new BinningConfigurationPanel(appContext, binningFormModel);
    addTab("Configuration", configurationPanel);
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:8,代码来源:BinningForm.java

示例11: MosaicIOPanel

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
MosaicIOPanel(AppContext appContext, MosaicFormModel mosaicModel, TargetProductSelector selector) {
    this.appContext = appContext;
    this.mosaicModel = mosaicModel;
    propertySet = mosaicModel.getPropertySet();
    final FileArrayEditor.EditorParent context = new FileArrayEditorContext(appContext);
    sourceFileEditor = new FileArrayEditor(context, "Source products") {
        @Override
        protected JFileChooser createFileChooserDialog() {
            final JFileChooser fileChooser = super.createFileChooserDialog();
            fileChooser.setDialogTitle("Mosaic - Open Source Product(s)");
            return fileChooser;
        }
    };
    targetProductSelector = selector;
    updateProductSelector = new SourceProductSelector(appContext);
    updateProductSelector.setProductFilter(new UpdateProductFilter());
    init();
    propertySet.addPropertyChangeListener(MosaicFormModel.PROPERTY_UPDATE_MODE, evt -> {
        if (Boolean.TRUE.equals(evt.getNewValue())) {
            propertySet.setValue(MosaicFormModel.PROPERTY_UPDATE_PRODUCT,
                                 updateProductSelector.getSelectedProduct());
        } else {
            updateProductSelector.setSelectedProduct(null);
        }
    });
    propertySet.addPropertyChangeListener(MosaicFormModel.PROPERTY_UPDATE_PRODUCT,
                                          new TargetProductSelectorUpdater());

}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:30,代码来源:MosaicIOPanel.java

示例12: createUI

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
private void createUI(TargetProductSelector selector) {
    ioPanel = new MosaicIOPanel(appContext, mosaicModel, selector);
    mapProjectionPanel = new MosaicMapProjectionPanel(appContext, mosaicModel);
    MosaicExpressionsPanel expressionsPanel = new MosaicExpressionsPanel(appContext, mosaicModel);
    addTab("I/O Parameters", ioPanel); /*I18N*/
    addTab("Map Projection Definition", mapProjectionPanel); /*I18N*/
    addTab("Variables & Conditions", expressionsPanel);  /*I18N*/
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:9,代码来源:MosaicForm.java

示例13: SpectralUnmixingForm

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
SpectralUnmixingForm(AppContext appContext, PropertySet propertySet, TargetProductSelector targetProductSelector) {
    this.appContext = appContext;
    this.targetProductSelector = targetProductSelector;
    this.formModel = new SpectralUnmixingFormModel(appContext.getSelectedProduct(), propertySet);
    this.endmemberForm = new EndmemberForm(appContext);
    this.sourceProductSelector = new SourceProductSelector(appContext);
    createComponents();
    bindComponents();
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:10,代码来源:SpectralUnmixingForm.java

示例14: S2tbxMosaicForm

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
public S2tbxMosaicForm(TargetProductSelector targetProductSelector, AppContext appContext) {
    this.appContext = appContext;
    mosaicModel = new S2tbxMosaicFormModel(this);
    createUI(targetProductSelector);
}
 
开发者ID:senbox-org,项目名称:s2tbx,代码行数:6,代码来源:S2tbxMosaicForm.java

示例15: IOPanel

import org.esa.snap.core.gpf.ui.TargetProductSelector; //导入依赖的package包/类
IOPanel(final AppContext theAppContext, final JTabbedPane tabbedPane, boolean createSourceSelector) {
    this.useSourceSelector = createSourceSelector;

    targetProductSelector = new TargetProductSelector();
    final String homeDirPath = SystemUtils.getUserHomeDir().getPath();
    final String saveDir = SnapApp.getDefault().getPreferences().get(SaveProductAsAction.PREFERENCES_KEY_LAST_PRODUCT_DIR, homeDirPath);
    targetProductSelector.getModel().setProductDir(new File(saveDir));
    targetProductSelector.getOpenInAppCheckBox().setText("Open in " + theAppContext.getApplicationName());

    final TableLayout tableLayout = new TableLayout(1);
    tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
    tableLayout.setTableWeightX(1.0);
    tableLayout.setTableFill(TableLayout.Fill.BOTH);
    tableLayout.setTablePadding(1, 1);

    final JPanel ioParametersPanel = new JPanel(tableLayout);

    if (useSourceSelector) {
        // Fetch source products
        sourceProductSelectorList.add(new SourceProductSelector(theAppContext));

        for (SourceProductSelector selector : sourceProductSelectorList) {
            ioParametersPanel.add(selector.createDefaultPanel());
        }
        ioParametersPanel.add(tableLayout.createVerticalSpacer());
        sourceProductSelectorList.get(0).addSelectionChangeListener(new AbstractSelectionChangeListener() {
            public void selectionChanged(SelectionChangeEvent event) {
                final Product selectedProduct = (Product) event.getSelection().getSelectedValue();
                if (selectedProduct != null) {
                    final TargetProductSelectorModel targetProductSelectorModel = targetProductSelector.getModel();
                    targetProductSelectorModel.setProductName(selectedProduct.getName() + getTargetProductNameSuffix());
                }
            }
        });
    }

    ioParametersPanel.add(targetProductSelector.createDefaultPanel());
    if (useSourceSelector) {
        tabbedPane.add("I/O Parameters", ioParametersPanel);
    } else {
        tabbedPane.add("Target Product", ioParametersPanel);
    }
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:44,代码来源:IOPanel.java


注:本文中的org.esa.snap.core.gpf.ui.TargetProductSelector类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。