Package org.pentaho.reporting.engine.classic.core.parameters

Examples of org.pentaho.reporting.engine.classic.core.parameters.ParameterValues


  public static KeyedComboBoxModel createModel(final ListParameter parameter,
                                               final ParameterContext parameterContext)
      throws ReportDataFactoryException
  {
    final ParameterValues paramValues = parameter.getValues(parameterContext);
    final int count = paramValues.getRowCount();
    final Object[] keys = new Object[count];
    final Object[] values = new Object[count];
    for (int i = 0; i < count; i++)
    {
      final Object key = paramValues.getKeyValue(i);
      keys[i] = key;
      values[i] = paramValues.getTextValue(i);
    }

    final KeyedComboBoxModel model = new KeyedComboBoxModel();
    model.setData(keys, values);
    return model;
View Full Code Here


  public static KeyedComboBoxModel<Object,Object> createModel(final ListParameter parameter,
                                               final ParameterContext parameterContext)
      throws ReportDataFactoryException
  {
    final ParameterValues paramValues = parameter.getValues(parameterContext);
    final int count = paramValues.getRowCount();
    final Object[] keys = new Object[count];
    final Object[] values = new Object[count];
    for (int i = 0; i < count; i++)
    {
      final Object key = paramValues.getKeyValue(i);
      keys[i] = key;
      values[i] = paramValues.getTextValue(i);
    }

    final KeyedComboBoxModel<Object,Object> model = new KeyedComboBoxModel<Object,Object>();
    model.setData(keys, values);
    return model;
View Full Code Here

          core_namespace_attributes.put(param_attr_name, param_attr);
          logger.debug("Attribute: " + param_attr_name + " = " + param_attr);
        }

        if(param_def_entry instanceof ListParameter) {
          ParameterValues param_vals = ((ListParameter) param_def_entry).getValues(param_context);
          int num_options = param_vals.getRowCount();
          ArrayList<ArrayList<Object>> selection_options = new ArrayList<ArrayList<Object>>(num_options);

          for(int i = 0; i < num_options; i++) {
            ArrayList<Object> one_option = new ArrayList<Object>();

            one_option.add(param_vals.getKeyValue(i));
            one_option.add(param_vals.getTextValue(i));

            selection_options.add(one_option);
            logger.debug("Selection option: {" + param_vals.getKeyValue(i) + ": " + param_vals.getTextValue(i) + "}");
          }

          one_param_info.put("selection_options", selection_options);
        }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.parameters.ParameterValues

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.