本文整理汇总了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());
}
示例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();
}
示例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();
}
示例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());
}
示例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);
}
示例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());
}
示例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*/
}
示例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());
}
示例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;
}
示例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);
}
示例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());
}
示例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*/
}
示例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();
}
示例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);
}
示例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);
}
}