Examples of IFactoryInfo


Examples of org.jamesii.core.plugins.IFactoryInfo

   * @return the readable name
   */
  public String getReadableName() {
    if (readableName == null) {

      IFactoryInfo info =
          SimSystem.getRegistry().getFactoryInfo(getClass().getName());

      if (info != null) {
        readableName = info.getName();
        if (readableName != null && readableName.trim().length() > 0) {
          return readableName;
        }
      }

View Full Code Here

Examples of org.jamesii.core.plugins.IFactoryInfo

          SwingConstants.CENTER));
      parameterPanelWrapper.revalidate();
      return;
    }

    IFactoryInfo factoryInfo = SimSystem.getRegistry().getFactoryInfo(factory);

    parameterPanel = new FactoryParameterPanel(factoryInfo, parameters);

    parameterPanel
        .addPropertyChangedListener(parameterPanelPropertyChangedListener);

    if (factoryInfo.getParameters().size() == 0) {
      parameterPanelWrapper.removeAll();
      parameterPanelWrapper.add(new JLabel("No configurable parameters.",
          SwingConstants.CENTER));
      parameterPanelWrapper.revalidate();
      return;
View Full Code Here

Examples of org.jamesii.core.plugins.IFactoryInfo

    setModal(true);
    setSize(500, 300);
    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);
View Full Code Here

Examples of org.jamesii.core.plugins.IFactoryInfo

    if (factory == null) {
      return;
    }

    // set default values for parameters
    IFactoryInfo factoryInfo = SimSystem.getRegistry().getFactoryInfo(factory);

    if (factoryInfo == null) {
      throw new IllegalArgumentException("Factory " + factoryName
          + " not found!");
    }

    List<IParameter> fParams = factoryInfo.getParameters();
    if (fParams == null || fParams.size() == 0) {
      return;
    }

    for (IParameter p : fParams) {
View Full Code Here

Examples of org.jamesii.core.plugins.IFactoryInfo

    if (f == null) {
      return null;
    }

    // load factory parameters
    IFactoryInfo factoryInfo = SimSystem.getRegistry().getFactoryInfo(f);
    List<IParameter> fParams = new ArrayList<>(factoryInfo.getParameters());

    IPluginTypeData pluginType =
        SimSystem.getRegistry().getPluginType(
            SimSystem.getRegistry().getPlugin(factoryInfo));
View Full Code Here

Examples of org.jamesii.core.plugins.IFactoryInfo

   */
  List<Pair<String, Object>> extractAlgorithmParameters(
      Class<? extends Factory<?>> factory, ParameterBlock parameterBlock) {
    List<Pair<String, Object>> parameterAssignments =
        new ArrayList<>();
    IFactoryInfo facInfo =
        SimSystem.getRegistry().getFactoryInfo(factory.getName());

    if (facInfo == null) {
      return parameterAssignments;
    }

    List<IParameter> parameters = facInfo.getParameters();
    for (IParameter parameter : parameters) {
      if (parameterBlock.hasSubBlock(parameter.getName())) {
        // TODO: One could also implement type-checking here... but maybe that's
        // too strict
        Object o = parameterBlock.getSubBlockValue(parameter.getName());
View Full Code Here

Examples of org.jamesii.core.plugins.IFactoryInfo

          editors
              .append("<blockquote><b><font color=\"#CC0000\">None</font></b></blockquote><br />This must not be due to an error.<br/>You can still (at least) use Java to create your model!");
        } else {
          editors.append("<ul>");
          for (ModelWindowFactory f : modelWindowFactories) {
            IFactoryInfo info =
                SimSystem.getRegistry().getFactoryInfo(f.getClass().getName());
            editors.append(String.format(
                "<li>%s %s</li>",
                f.getReadableName(),
                info.getDescription() != null
                    && info.getDescription().length() > 0 ? "("
                    + info.getDescription() + ")" : ""));
          }
          editors.append("</ul>");
        }
      }
      // show editor info
View Full Code Here

Examples of org.jamesii.core.plugins.IFactoryInfo

        if (fpane != null) {
          multiSelection.remove(fpane);
        }

        if (v != null) {
          IFactoryInfo info =
              SimSystem.getRegistry().getFactoryInfo(
                  v.getFactory().getClass().getName());
          if (info != null) {
            FactoryParameterPanel p =
                new FactoryParameterPanel(info, v.getParameters());
View Full Code Here

Examples of org.jamesii.core.plugins.IFactoryInfo

      return;
    }

    currentFactory = factories.get(selectedIndex).getName();

    IFactoryInfo factoryInfo =
        SimSystem.getRegistry().getFactoryInfo(currentFactory);
    if (factoryInfo != null) {
      ParameterBlock fParameters = factoryParameters.get(currentFactory);
      if (fParameters == null) {
        fParameters = new ParameterBlock();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.