Package Galaxy.Tree.Tool.Input.Param

Examples of Galaxy.Tree.Tool.Input.Param.Option


    super(Option.class);
  }
  @Override
  public Map<String, String> mapFromObject(Object o) {
    // TODO Auto-generated method stub
    Option c = (Option) o;
    Map<String, String> myMapping;
    myMapping = new HashMap<String, String>();
    myMapping.put(NAME_TAG, "option");
    myMapping.put(VALUE_TAG, c.getContents());
    myMapping.put("value", c.getValue());
    if(c.isSelected() != null)
      myMapping.put("selected", c.isSelected().toString());
    else
      myMapping.put("selected", "false" .toString());
   
    return myMapping;
  }
View Full Code Here


    return myMapping;
  }

  @Override
  public Object mapToObject(Map<String, String> attributes) {
    Option option;
   
    String contents;
    List<String> tokens = new ArrayList();
    final String val;
    final Boolean selected;
    contents = attributes.get(VALUE_TAG);
    val = attributes.get("value");
    selected = new Boolean(attributes.get("selected"));
   
    option = new Option(val, contents);
    option.setSelected(selected);
    return option;
  }
View Full Code Here

TOP

Related Classes of Galaxy.Tree.Tool.Input.Param.Option

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.