Package org.jamesii.core.parameters

Examples of org.jamesii.core.parameters.ParameterBlock


    setTitle("Set parameters to load experiment from COMO database:");
    getContentPane().setLayout(new BorderLayout());

    IFactoryInfo factoryInfo =
        SimSystem.getRegistry().getFactoryInfo(factoryClass.getCanonicalName());
    fpPanel = new FactoryParameterPanel(factoryInfo, new ParameterBlock());

    getContentPane().add(new JScrollPane(fpPanel), BorderLayout.CENTER);

    JPanel buttonPanel = new JPanel(new BorderLayout());
    buttonPanel.add(okButton, BorderLayout.EAST);
View Full Code Here


    return Collections.unmodifiableList(list);
  }

  @Override
  public ParameterBlock getAsParameterBlock() {
    ParameterBlock block = super.getAsParameterBlock();

    // build a return type which meets the expectancy of the outside world
    List<ParameterBlock> pbList = new ArrayList<>();
    for (Entry entry : list) {
      pbList.add(new ParameterBlock(entry.getFactoryName(), entry
          .getParameters().getSubBlocks()));
    }

    // set pbList to return a list of parameter blocks
    block.setValue(list);

    return block;
  }
View Full Code Here

    return baseFactory;
  }

  @Override
  public ParameterBlock getAsParameterBlock() {
    ParameterBlock block = super.getAsParameterBlock();
    block.setValue(getFactory());
    return block;
  }
View Full Code Here

   */
  public SelectionInformation(Class<? extends AbstractFactory<F>> af,
      ParameterBlock fParams, F fac) {
    abstractFactory = af;
    factory = fac;
    ParameterBlock cleanedParameters = getCleanedParameter(fParams);
    parameter = cleanedParameters == null ? null : cleanedParameters.getCopy();
    paramString = createParamString(parameter);
    stringRepresentation = createStringRepresentation();
  }
View Full Code Here

   */
  private ParameterBlock getCleanedParameter(ParameterBlock parameters) {
    if (parameters == null) {
      return null;
    }
    ParameterBlock pb = new ParameterBlock(parameters.getValue());
    for (Map.Entry<String, ParameterBlock> subBlock : parameters.getSubBlocks()
        .entrySet()) {
      String ident = subBlock.getKey();
      if (PARAM_BLACK_LIST.containsKey(ident)) {
        continue;
      }
      pb.addSubBlock(ident, getCleanedParameter(parameters.getSubBlock(ident)));
    }
    return pb;
  }
View Full Code Here

        // ommit default values for already present values
        if (block.hasSubBlock(p.getName())) {
          continue;
        }

        ParameterBlock dBlock =
            new ParameterBlock(p.getType(), AbstractValueConverterFactory.TYPE);

        ValueConverterFactory<?> cf =
            SimSystem.getRegistry().getFactory(
                AbstractValueConverterFactory.class, dBlock);
View Full Code Here

    IEditor<?> editor = createdEditors.get(editable);
    if (editor != null) {
      return editor;
    }

    ParameterBlock apefp =
        new ParameterBlock(editable.getValue().getClass(),
            AbstractParamEditorFactory.TYPE);

    editor =
        createEditor(
            apefp,
View Full Code Here

    if (!(parent instanceof FactoryParameters)) {
      return null;
    }

    // read parameterblock used to set up the plugintype
    ParameterBlock block =
        ((FactoryParameters) parent).getPluginTypeParameter(getName());

    if (block == null) {
      block = new ParameterBlock();
    }

    PluginTypeParameters pluginTypeParameters = getPluginTypeParameters(block);

    ((FactoryParameters) parent).setPluginTypeParameter(getName(),
View Full Code Here

    }

    // checks whether the given value fits the plugintype (given from an
    // implementation provider)
    if (getType().isAssignableFrom(value.getClass())) {
      ParameterBlock block = new ParameterBlock(value.getClass().getName());
      ((FactoryParameters) parent).setPluginTypeParameter(getName(), block);
    }

    // check whether the value is a PluginTypeParameters object (when coming
    // form an editor)
View Full Code Here

    ((IItemView) view).setSelectionMode(selectionMode);
  }

  private void createView(ViewFactory viewFactory) {

    ParameterBlock pb = new ParameterBlock();
    pb.addSubBl(ViewFactory.DATA, data);
    pb.addSubBl(ViewFactory.PROPERTIES, properties);

    view = viewFactory.create(pb, SimSystem.getRegistry().createContext());
    pane.setViewportView(view);

    // ((IItemView) view).setTransferHandler(new ItemListTransferHandler());
View Full Code Here

TOP

Related Classes of org.jamesii.core.parameters.ParameterBlock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.