當前位置: 首頁>>代碼示例>>Java>>正文


Java OperatorParameterSupport.getPropertySet方法代碼示例

本文整理匯總了Java中org.esa.snap.core.gpf.ui.OperatorParameterSupport.getPropertySet方法的典型用法代碼示例。如果您正苦於以下問題:Java OperatorParameterSupport.getPropertySet方法的具體用法?Java OperatorParameterSupport.getPropertySet怎麽用?Java OperatorParameterSupport.getPropertySet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.esa.snap.core.gpf.ui.OperatorParameterSupport的用法示例。


在下文中一共展示了OperatorParameterSupport.getPropertySet方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: SimpleExampleDialog

import org.esa.snap.core.gpf.ui.OperatorParameterSupport; //導入方法依賴的package包/類
public SimpleExampleDialog(String alias, AppContext appContext, String title, String helpId) {
    super(appContext, title, helpId);

    this.alias = alias;
    final OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi(alias);

    parameterSupport = new OperatorParameterSupport(operatorSpi.getOperatorDescriptor());
    form = new SimpleForm(appContext, operatorSpi, parameterSupport.getPropertySet(),
                          getTargetProductSelector());
    OperatorMenu operatorMenu = new OperatorMenu(this.getJDialog(),
                                                 operatorSpi.getOperatorDescriptor(),
                                                 parameterSupport,
                                                 appContext,
                                                 helpId);
    getJDialog().setJMenuBar(operatorMenu.createDefaultMenu());
}
 
開發者ID:senbox-org,項目名稱:snap-examples,代碼行數:17,代碼來源:SimpleExampleDialog.java

示例2: CollocationDialog

import org.esa.snap.core.gpf.ui.OperatorParameterSupport; //導入方法依賴的package包/類
public CollocationDialog(AppContext appContext) {
    super(appContext, "Collocation", ID_APPLY_CLOSE, HELP_ID);
    final OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi(CollocateOp.Spi.class.getName());

    parameterSupport = new OperatorParameterSupport(operatorSpi.getOperatorDescriptor());
    OperatorMenu operatorMenu = new OperatorMenu(this.getJDialog(),
                                                 operatorSpi.getOperatorDescriptor(),
                                                 parameterSupport,
                                                 appContext,
                                                 HELP_ID);

    getJDialog().setJMenuBar(operatorMenu.createDefaultMenu());

    form = new CollocationForm(parameterSupport.getPropertySet(), getTargetProductSelector(), appContext);

}
 
開發者ID:senbox-org,項目名稱:snap-desktop,代碼行數:17,代碼來源:CollocationDialog.java

示例3: CreateOpTab

import org.esa.snap.core.gpf.ui.OperatorParameterSupport; //導入方法依賴的package包/類
@Override
public JComponent CreateOpTab(String operatorName, Map<String, Object> parameterMap, AppContext appContext) {

    OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi(operatorName);
    if (operatorSpi == null) {
        throw new IllegalArgumentException("No SPI found for operator name '" + operatorName + "'");
    }

    operatorDescriptor = operatorSpi.getOperatorDescriptor();

    parameterSupport = new OperatorParameterSupport(operatorDescriptor);
    final PropertySet propertySet = parameterSupport.getPropertySet();
    bindingContext = new BindingContext(propertySet);


    if (sourceProducts != null) {
        for (Band band : sourceProducts[0].getBands()) {
            listBands.add(band.getName());
        }
    }

    initializeOperatorUI(operatorName, parameterMap);
    final JComponent panel = createPanel();

    initParameters();

    return new JScrollPane(panel);
}
 
開發者ID:senbox-org,項目名稱:snap-desktop,代碼行數:29,代碼來源:ResamplingUI.java

示例4: ResamplingDialog

import org.esa.snap.core.gpf.ui.OperatorParameterSupport; //導入方法依賴的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);
}
 
開發者ID:senbox-org,項目名稱:snap-desktop,代碼行數:41,代碼來源:ResamplingDialog.java

示例5: SingleOperatorDialog

import org.esa.snap.core.gpf.ui.OperatorParameterSupport; //導入方法依賴的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);
}
 
開發者ID:senbox-org,項目名稱:snap-desktop,代碼行數:48,代碼來源:SingleOperatorDialog.java


注:本文中的org.esa.snap.core.gpf.ui.OperatorParameterSupport.getPropertySet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。