Tabnine Logo
ParameterDescriptorFactory.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.esa.snap.core.gpf.annotations.ParameterDescriptorFactory
constructor

Best Java code snippets using org.esa.snap.core.gpf.annotations.ParameterDescriptorFactory.<init> (Showing top 13 results out of 315)

origin: senbox-org/snap-desktop

private PropertySet createPropertySet(AggregatorConfig config) {
  return PropertyContainer.createMapBacked(new HashMap<>(), config.getClass(),
                       new ParameterDescriptorFactory());
}
origin: senbox-org/snap-desktop

private static PropertyContainer createParameterMap(Map<String, Object> map) {
  ParameterDescriptorFactory parameterDescriptorFactory = new ParameterDescriptorFactory();
  final PropertyContainer container = PropertyContainer.createMapBacked(map, PixExOp.class,
                                     parameterDescriptorFactory);
  container.setDefaultValues();
  return container;
}
origin: senbox-org/snap-desktop

protected void initializeOperatorUI(final String operatorName, final Map<String, Object> parameterMap) {
  this.operatorName = operatorName;
  this.paramMap = parameterMap;
  final OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi(operatorName);
  if (operatorSpi == null) {
    throw new IllegalArgumentException("operator " + operatorName + " not found");
  }
  final ParameterDescriptorFactory descriptorFactory = new ParameterDescriptorFactory();
  final OperatorDescriptor operatorDescriptor = operatorSpi.getOperatorDescriptor();
  final PropertySetDescriptor propertySetDescriptor;
  try {
    propertySetDescriptor = PropertySetDescriptorFactory.createForOperator(operatorDescriptor, descriptorFactory.getSourceProductMap());
  } catch (ConversionException e) {
    throw new IllegalStateException("Not able to init OperatorParameterSupport.", e);
  }
  propertySet = PropertyContainer.createMapBacked(paramMap, propertySetDescriptor);
  if (paramMap.isEmpty()) {
    try {
      propertySet.setDefaultValues();
    } catch (IllegalStateException e) {
      // todo - handle exception here
      e.printStackTrace();
    }
  }
}
origin: senbox-org/snap-desktop

public void addParameterToTable(ToolParameterDescriptor param, int index) {
  try {
    operator.getToolParameterDescriptors().add(index, param);
    PropertyDescriptor propertyDescriptor = ParameterDescriptorFactory.convert(param, new ParameterDescriptorFactory().getSourceProductMap());
    propertyDescriptor.setDefaultValue(param.getDefaultValue());
    DefaultPropertySetDescriptor propertySetDescriptor = new DefaultPropertySetDescriptor();
    propertySetDescriptor.addPropertyDescriptor(propertyDescriptor);
    PropertyContainer container = PropertyContainer.createMapBacked(new HashMap<>(), propertySetDescriptor);
    context.getPropertySet().addProperties(container.getProperties());
    createDefaultComponent(param, propertyDescriptor);
    fireTableRowsChanged();
  } catch (Exception ex){
    logger.warning(ex.getMessage());
  }
}
origin: senbox-org/snap-desktop

Object dirAttr = null;
if(oldProp != null) {
  PropertyDescriptor descriptor = ParameterDescriptorFactory.convert(property, new ParameterDescriptorFactory().getSourceProductMap());
  dirAttr = descriptor.getAttribute("directory");
  context.getPropertySet().removeProperty(oldProp);
  descriptor = ParameterDescriptorFactory.convert(property, new ParameterDescriptorFactory().getSourceProductMap());
} catch (Exception ex) {
  property.setDefaultValue(null);
  descriptor = ParameterDescriptorFactory.convert(property, new ParameterDescriptorFactory().getSourceProductMap());
origin: senbox-org/snap-desktop

private BindingContext createBindingContext() {
  final PropertyContainer container = PropertyContainer.createObjectBacked(variableItem.variableConfig, new ParameterDescriptorFactory());
  final BindingContext context = new BindingContext(container);
  PropertyDescriptor descriptor = container.getDescriptor(PROPERTY_VARIABLE_NAME);
  descriptor.setDescription("The name for the source band.");
  descriptor.setValidator(new VariableNameValidator());
  container.setDefaultValues();
  return context;
}
origin: senbox-org/snap-desktop

Assert.argument(parameterMap != null || propertySet == null, "parameterMap != null || propertySet == null");
this.descriptorFactory = new ParameterDescriptorFactory();
origin: senbox-org/snap-desktop

public MetadataPlotSettings() {
  context = new BindingContext(PropertyContainer.createObjectBacked(this, new ParameterDescriptorFactory()));
  Property propertyRecordStart = context.getPropertySet().getProperty(PROP_NAME_RECORD_START_INDEX);
  propertyRecordStart.getDescriptor().setAttribute("stepSize", 1);
origin: senbox-org/snap-desktop

  propertyDescriptor = ParameterDescriptorFactory.convert(descriptor, new ParameterDescriptorFactory().getSourceProductMap());
} catch (ConversionException ex) {
  logger.warning(ex.getMessage());
origin: senbox-org/snap-desktop

  propertySet.removeProperty(property);
PropertyDescriptor propertyDescriptor = ParameterDescriptorFactory.convert(this.parameter, new ParameterDescriptorFactory().getSourceProductMap());
origin: senbox-org/snap-desktop

if (operatorSpi == null) return;
final ParameterDescriptorFactory parameterDescriptorFactory = new ParameterDescriptorFactory();
final PropertyContainer valueContainer = PropertyContainer.createMapBacked(parameterMap,
    operatorSpi.getOperatorClass(), parameterDescriptorFactory);
origin: senbox-org/snap-desktop

PropertyDescriptor propertyDescriptor = ParameterDescriptorFactory.convert(descriptor, new ParameterDescriptorFactory().getSourceProductMap());
if (defaultValue != null) {
  String defaultValueAsString = ToolParameterEditorDialog.processDefaultValue(defaultValue);
origin: senbox-org/snap-desktop

PropertyDescriptor propertyDescriptor = ParameterDescriptorFactory.convert(this.modifiedParameter, new ParameterDescriptorFactory().getSourceProductMap());
DefaultPropertySetDescriptor propertySetDescriptor = new DefaultPropertySetDescriptor();
propertySetDescriptor.addPropertyDescriptor(propertyDescriptor);
org.esa.snap.core.gpf.annotationsParameterDescriptorFactory<init>

Popular methods of ParameterDescriptorFactory

  • createMapBackedOperatorPropertyContainer
  • getSourceProductMap
  • convert

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JPanel (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now