Examples of Choice


Examples of org.geotools.xml.schema.Choice

            case ElementGrouping.ELEMENT:
                return compareElement((Element) arg0, (Element) arg1);
            case ElementGrouping.GROUP:
                return compareGroup((Group) arg0, (Group) arg1);
            case ElementGrouping.CHOICE:
                Choice c0 = (Choice) arg0;
                Choice c1 = (Choice) arg1;
                eg0 = c0.getChildren();
                eg1 = c1.getChildren();
            case ElementGrouping.SEQUENCE:
                Sequence s0 = (Sequence) arg0;
                Sequence s1 = (Sequence) arg1;
                eg0 = s0.getChildren();
                eg1 = s1.getChildren();
View Full Code Here

Examples of org.hamcrest.text.pattern.internal.ast.Choice

    public static PatternComponent anyCharacterNotInCategory(String category) {
  return new CharacterNotInUnicodeCategory(category);
    }

    public static PatternComponent either(Object... alternatives) {
  return new Choice(toPatterns(alternatives));
    }
View Full Code Here

Examples of org.jsurveylib.model.question.Choice

            NodeList choiceNodes = multiConfigElement.getElementsByTagName("choice");
            for (int i = 0; i < choiceNodes.getLength(); i++) {
                Element choiceNode = (Element) choiceNodes.item(i);
                String id = choiceNode.getAttribute("id");
                String label = choiceNode.getAttribute("label");
                Choice choice = qb.buildChoice(id, label);
                choices.add(choice);
            }
            return qb.buildRadioButtons(vertical, leftLabel, rightLabel, choices);
        } else if (questionTypeElement.getElementsByTagName("dropdown").getLength() == 1) {
            Element dropdownConfigElement = (Element) questionTypeElement.getElementsByTagName("dropdown").item(0);

            List<Choice> choices = new Vector<Choice>();
            NodeList choiceNodes = dropdownConfigElement.getElementsByTagName("choice");
            for (int i = 0; i < choiceNodes.getLength(); i++) {
                Element choiceNode = (Element) choiceNodes.item(i);
                String id = choiceNode.getAttribute("id");
                String label = choiceNode.getAttribute("label");
                Choice choice = qb.buildChoice(id, label);
                choices.add(choice);
            }
            return qb.buildDropdown(choices);
        } else if (questionTypeElement.getElementsByTagName("textField").getLength() == 1) {
            return qb.buildTextField();
View Full Code Here

Examples of org.jsurveylib.model.question.Choice

    private void checkAgreementTemplate(Survey survey, String id) {
        RadioButtonsQuestion radio = (RadioButtonsQuestion) survey.getQuestionByID(id);
        assertFalse(radio.getLabel().getText().contains("TEMPLATE"));
        assertFalse(radio.getId().contains("TEMPLATE"));
        for (int i = 1; i <= 7; i++) {
            Choice c = radio.getChoices().get(i - 1);
            assertEquals(String.valueOf(i), c.getId());
            assertEquals(String.valueOf(i), c.getLabel());
        }

    }
View Full Code Here

Examples of org.jsurveylib.model.question.Choice

    public void actionPerformed(ActionEvent e) {
        int index = dropdown.getSelectedIndex();
        //if there are no elements in the list this action gets triggered and the index becomes -1
        //if choices were just updated we don't want to set the type because that will retrigger the script
        if (index != -1) {
            Choice selected = type.getChoices().get(index);
            type.setAnswer(selected.getId());
        }
    }
View Full Code Here

Examples of org.olat.core.gui.components.choice.Choice

    } else if (source == contentVc) {
      // links of this vc container coming in
      String cmd = event.getCommand();
      if (cmd.equals("cmd.changecols") && tableConfig.getPreferencesKey() != null) {
        // get the list of columns and if they are visible or not
        colsChoice = new Choice("colchoice", trans);
        colsChoice.setTableDataModel(table.createChoiceTableDataModel());
        colsChoice.addListener(this);
        colsChoice.setCancelKey("cancel");
        colsChoice.setSubmitKey("save");
       
View Full Code Here

Examples of org.olat.core.gui.components.choice.Choice

        preselectedNamesList = stringToList(preselectedNames);
    }

        if (namesList.size() > 0) {
          stringModel = new StringListTableDataModel(namesList, preselectedNamesList);       
          stringChoice = new Choice("stringChoice", trans);
          stringChoice.setSubmitKey("select");
          stringChoice.setCancelKey("cancel");
          stringChoice.setTableDataModel(stringModel);
          stringChoice.addListener(this);
          main.put("stringChoice", stringChoice);
View Full Code Here

Examples of org.olat.core.gui.components.choice.Choice

    groupList = new ArrayList<BusinessGroup>()
    areaList = new ArrayList<BGArea>();
    main = new Panel("main");
       
    //init wizard step 1
    groupsOrAreaChoice = new Choice("groupsOrAreaChoice", getTranslator());
    groupsOrAreaChoice.setTableDataModel(getGroupOrAreaChoiceTableDataModel(context));
    groupsOrAreaChoice.addListener(this);
    groupsOrAreaChoice.setSubmitKey("next");
   
    //init wizard step 2   
View Full Code Here

Examples of org.olat.core.gui.components.choice.Choice

    VelocityContainer tmp = createVelocityContainer("tab_bgAreas");
    this.allAreas = areaManager.findBGAreasOfBGContext(this.bgContext);
    this.selectedAreas = areaManager.findBGAreasOfBusinessGroup(this.currBusinessGroup);
    this.areaDataModel = new AreasToGroupDataModel(this.allAreas, this.selectedAreas);

    areasChoice = new Choice("areasChoice", getTranslator());
    areasChoice.setSubmitKey("submit");
    areasChoice.setCancelKey("cancel");
    areasChoice.setTableDataModel(this.areaDataModel);
    areasChoice.addListener(this);
    tmp.put("areasChoice", areasChoice);
View Full Code Here

Examples of org.olat.core.gui.components.choice.Choice

  private VelocityContainer createTabRights() {
    VelocityContainer tmp = createVelocityContainer("tab_bgRights");
    this.selectedRights = rightManager.findBGRights(this.currBusinessGroup);
    this.rightDataModel = new RightsToGroupDataModel(bgRights, this.selectedRights);

    rightsChoice = new Choice("rightsChoice", getTranslator());
    rightsChoice.setSubmitKey("submit");
    rightsChoice.setCancelKey("cancel");
    rightsChoice.setTableDataModel(this.rightDataModel);
    rightsChoice.addListener(this);
    tmp.put("rightsChoice", rightsChoice);
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.