本文整理汇总了Java中org.esa.snap.core.gpf.ui.DefaultIOParametersPanel类的典型用法代码示例。如果您正苦于以下问题:Java DefaultIOParametersPanel类的具体用法?Java DefaultIOParametersPanel怎么用?Java DefaultIOParametersPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultIOParametersPanel类属于org.esa.snap.core.gpf.ui包,在下文中一共展示了DefaultIOParametersPanel类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createIOParamTab
import org.esa.snap.core.gpf.ui.DefaultIOParametersPanel; //导入依赖的package包/类
private DefaultIOParametersPanel createIOParamTab() {
final DefaultIOParametersPanel ioPanel = new DefaultIOParametersPanel(appContext, operatorSpi.getOperatorDescriptor(),
targetProductSelector);
final ArrayList<SourceProductSelector> sourceProductSelectorList = ioPanel.getSourceProductSelectorList();
if (!sourceProductSelectorList.isEmpty()) {
final SourceProductSelector sourceProductSelector = sourceProductSelectorList.get(0);
sourceProductSelector.addSelectionChangeListener(new SourceProductChangeListener());
}
return ioPanel;
}
示例2: ResamplingDialog
import org.esa.snap.core.gpf.ui.DefaultIOParametersPanel; //导入依赖的package包/类
ResamplingDialog(AppContext appContext, Product product, boolean modal) {
super(appContext, "Resampling", ID_APPLY_CLOSE, "resampleAction");
this.operatorName = "Resample";
targetProductNameSuffix = "_resampled";
getTargetProductSelector().getModel().setSaveToFileSelected(false);
getJDialog().setModal(modal);
OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi(operatorName);
if (operatorSpi == null) {
throw new IllegalArgumentException("No SPI found for operator name '" + operatorName + "'");
}
operatorDescriptor = operatorSpi.getOperatorDescriptor();
ioParametersPanel = new DefaultIOParametersPanel(getAppContext(), operatorDescriptor, getTargetProductSelector(), true);
targetProduct = null;
parameterSupport = new OperatorParameterSupport(operatorDescriptor, null, null, new ResamplingParameterUpdater());
final ArrayList<SourceProductSelector> sourceProductSelectorList = ioParametersPanel.getSourceProductSelectorList();
final PropertySet propertySet = parameterSupport.getPropertySet();
bindingContext = new BindingContext(propertySet);
final Property referenceBandNameProperty = bindingContext.getPropertySet().getProperty(REFERENCE_BAND_NAME_PROPERTY_NAME);
referenceBandNameProperty.getDescriptor().addAttributeChangeListener(evt -> {
if (evt.getPropertyName().equals("valueSet")) {
final Object[] valueSetItems = ((ValueSet) evt.getNewValue()).getItems();
if (valueSetItems.length > 0) {
try {
referenceBandNameProperty.setValue(valueSetItems[0].toString());
} catch (ValidationException e) {
//don't set it then
}
}
}
});
final ValueRange valueRange = new ValueRange(0, Integer.MAX_VALUE);
bindingContext.getPropertySet().getProperty(TARGET_WIDTH_PROPERTY_NAME).getDescriptor().setValueRange(valueRange);
bindingContext.getPropertySet().getProperty(TARGET_HEIGHT_PROPERTY_NAME).getDescriptor().setValueRange(valueRange);
bindingContext.getPropertySet().getProperty(TARGET_RESOLUTION_PROPERTY_NAME).getDescriptor().setValueRange(valueRange);
productChangedHandler = new ProductChangedHandler();
sourceProductSelectorList.get(0).setSelectedProduct(product);
sourceProductSelectorList.get(0).addSelectionChangeListener(productChangedHandler);
}
示例3: createIOParamTab
import org.esa.snap.core.gpf.ui.DefaultIOParametersPanel; //导入依赖的package包/类
private DefaultIOParametersPanel createIOParamTab() {
final DefaultIOParametersPanel ioPanel = new DefaultIOParametersPanel(appContext, operatorDescriptor,
targetProductSelector, !operatorDescriptor.isHandlingOutputName());
final ArrayList<SourceProductSelector> sourceProductSelectorList = ioPanel.getSourceProductSelectorList();
if (!sourceProductSelectorList.isEmpty()) {
final SourceProductSelector sourceProductSelector = sourceProductSelectorList.get(0);
sourceProductSelector.addSelectionChangeListener(new SourceProductChangeListener());
}
return ioPanel;
}
示例4: getSelectedProduct
import org.esa.snap.core.gpf.ui.DefaultIOParametersPanel; //导入依赖的package包/类
/**
* Returns the selected product.
*
* @return the selected product
*/
private Product getSelectedProduct() {
DefaultIOParametersPanel ioParametersPanel = getDefaultIOParametersPanel();
List<SourceProductSelector> sourceProductSelectorList = ioParametersPanel.getSourceProductSelectorList();
return sourceProductSelectorList.get(0).getSelectedProduct();
}
示例5: SingleOperatorDialog
import org.esa.snap.core.gpf.ui.DefaultIOParametersPanel; //导入依赖的package包/类
public SingleOperatorDialog(String operatorName, AppContext appContext, String title, String helpID) {
super(appContext, title, ID_APPLY_CLOSE, helpID);
this.operatorName = operatorName;
targetProductNameSuffix = "";
OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi(operatorName);
if (operatorSpi == null) {
throw new IllegalArgumentException("No SPI found for operator name '" + operatorName + "'");
}
operatorDescriptor = operatorSpi.getOperatorDescriptor();
ioParametersPanel = new DefaultIOParametersPanel(getAppContext(), operatorDescriptor, getTargetProductSelector());
parameterSupport = new OperatorParameterSupport(operatorDescriptor, null, null, new GraphBuilderParameterUpdater());
final ArrayList<SourceProductSelector> sourceProductSelectorList = ioParametersPanel.getSourceProductSelectorList();
final PropertySet propertySet = parameterSupport.getPropertySet();
bindingContext = new BindingContext(propertySet);
if (propertySet.getProperties().length > 0) {
if (!sourceProductSelectorList.isEmpty()) {
Property[] properties = propertySet.getProperties();
List<PropertyDescriptor> rdnTypeProperties = new ArrayList<>(properties.length);
for (Property property : properties) {
PropertyDescriptor parameterDescriptor = property.getDescriptor();
if (parameterDescriptor.getAttribute(RasterDataNodeValues.ATTRIBUTE_NAME) != null) {
rdnTypeProperties.add(parameterDescriptor);
}
}
rasterDataNodeTypeProperties = rdnTypeProperties.toArray(
new PropertyDescriptor[rdnTypeProperties.size()]);
}
}
productChangedHandler = new ProductChangedHandler();
if (!sourceProductSelectorList.isEmpty()) {
sourceProductSelectorList.get(0).addSelectionChangeListener(productChangedHandler);
}
opUI = OperatorUIRegistry.CreateOperatorUI(operatorName);
addParameters();
getJDialog().setMinimumSize(new Dimension(450, 450));
statusLabel = new JLabel("");
statusLabel.setForeground(new Color(255, 0, 0));
this.getJDialog().getContentPane().add(statusLabel, BorderLayout.NORTH);
}