Examples of ValueLabel


Examples of com.buschmais.jqassistant.core.store.api.model.ValueLabel

    }

    @Override
    public Class<? extends ValueDescriptor> getType(Set<Label> labels) {
        for (Label label : labels) {
            ValueLabel valueLabel = ValueLabel.getValueLabel(label.name());
            if (valueLabel != null) {
                switch (valueLabel) {
                    case ARRAY:
                        return ArrayValueDescriptor.class;
                    case ANNOTATION:
View Full Code Here

Examples of com.buschmais.jqassistant.core.store.api.model.ValueLabel

        }
    }

    @Override
    public Set<Label> getLabels(ValueDescriptor descriptor) {
        final ValueLabel valueLabel;
        if (ArrayValueDescriptor.class.equals(descriptor.getClass())) {
            valueLabel = ValueLabel.ARRAY;
        } else if (AnnotationValueDescriptor.class.equals(descriptor.getClass())) {
            valueLabel = ValueLabel.ANNOTATION;
        } else if (EnumerationValueDescriptor.class.equals(descriptor.getClass())) {
View Full Code Here

Examples of org.molgenis.util.ValueLabel

    List<ValueLabel> valueLabels = new ArrayList<ValueLabel>();
    if (optionLabels == null)
    {
      for (String option : options)
        valueLabels.add(new ValueLabel(option, option));
    }
    else
    {
      if (options.size() != optionLabels.size()) throw new HtmlInputException(
          "List(options) and List(option_labels) should be of same size");
      for (int i = 0; i < options.size(); i++)
      {
        valueLabels.add(new ValueLabel(options.get(i), optionLabels.get(i)));
      }
    }
    this.options = valueLabels;

  }
View Full Code Here

Examples of org.molgenis.util.ValueLabel

  public void setOptions(String... choices)
  {
    List<ValueLabel> choicePairs = new ArrayList<ValueLabel>();
    for (String choice : choices)
    {
      choicePairs.add(new ValueLabel(choice, choice));
    }
    this.setOptions(choicePairs);
  }
View Full Code Here

Examples of org.molgenis.util.ValueLabel

  public void setOptionsFromStringList(List<String> choices)
  {
    List<ValueLabel> choicePairs = new ArrayList<ValueLabel>();
    for (String choice : choices)
    {
      choicePairs.add(new ValueLabel(choice, choice));
    }
    this.setOptions(choicePairs);
  }
View Full Code Here

Examples of org.molgenis.util.ValueLabel

    super(id, value);
  }

  public SelectInput(String id, String value)
  {
    super(id, new ValueLabel(value, value));
  }
View Full Code Here

Examples of org.molgenis.util.ValueLabel

  public SelectInput setOptions(Map<String, String> options)
  {
    this.options.clear();
    for (Entry<String, String> e : options.entrySet())
    {
      this.options.add(new ValueLabel(e.getKey(), e.getValue()));
    }
    return this;
  }
View Full Code Here

Examples of org.molgenis.util.ValueLabel

  public SelectInput options(String... options)
  {
    this.options.clear();
    for (String s : options)
    {
      this.options.add(new ValueLabel(s, s));
    }
    return this;
  }
View Full Code Here

Examples of org.molgenis.util.ValueLabel

    List<ValueLabel> result = new ArrayList<ValueLabel>();
    if (optionLabels != null && optionLabels.size() == optionLabels.size())
    {
      for (int i = 0; i < options.size(); i++)
      {
        result.add(new ValueLabel(options.get(i), optionLabels.get(i)));
      }
    }
    else
    {
      for (String option : options)
      {
        result.add(new ValueLabel(option, option));
      }
    }
    this.setLabel(label);
    this.setNillable(nillable);
    this.setReadonly(readonly);
View Full Code Here

Examples of org.molgenis.util.ValueLabel

    this.onchange = onchange;
  }

  public void addOption(Object value, Object label)
  {
    this.getOptions().add(new ValueLabel(value.toString(), label.toString()));
  }
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.