Examples of Choice


Examples of com.agiletec.plugins.jpsurvey.aps.system.services.survey.model.Choice

      if (null != this.getQuestionId()) {
        choiceList = getSurveyManager().getQuestionChoices(this.getQuestionId());
        if (null!= choiceList) {
          Iterator<Choice> itr = choiceList.iterator();
          while (itr.hasNext()) {
            Choice current = itr.next();
            if (current.isFreeText()) {
              this.addActionError(this.getText("message.questionAction.noMoreFreeText"));
              return "noMoreFreeText";
            }
          }
        } 
View Full Code Here

Examples of com.barrybecker4.puzzle.adventure.Choice

     * Add a row based on a player object.
     */
    @Override
    protected void addRow(Object choice)
    {
        Choice childChoice = (Choice) choice;
        Object d[] = new Object[getNumColumns()];
        d[NAVIGATE_INDEX] = childChoice.getDestination();
        d[CHOICE_DESCRIPTION_INDEX] = childChoice.getDescription();
        getChildTableModel().addRow(d);
    }
View Full Code Here

Examples of com.strobel.decompiler.patterns.Choice

            pattern.getModifiers().add(new JavaModifierToken(Modifier.STATIC));
            pattern.setBody(
                new BlockStatement(
                    new ReturnStatement(
                        Expression.MYSTERY_OFFSET,
                        new Choice(
                            new MemberReferenceExpression(
                                Expression.MYSTERY_OFFSET,
                                new NamedNode(
                                    "valuesField",
                                    new TypeReferenceExpression(
View Full Code Here

Examples of com.sun.tools.internal.xjc.reader.gbind.Choice

            // kinda works.
            // properly handling empty set requires more work.
            Expression e = Expression.EPSILON;
            for (XSParticle p : group.getChildren()) {
                if(e==null)     e = particle(p);
                else            e = new Choice(e,particle(p));
            }
            return e;
        } else {
            Expression e = Expression.EPSILON;
            for (XSParticle p : group.getChildren()) {
View Full Code Here

Examples of com.sun.tools.xjc.reader.gbind.Choice

            // kinda works.
            // properly handling empty set requires more work.
            Expression e = Expression.EPSILON;
            for (XSParticle p : group.getChildren()) {
                if(e==null)     e = particle(p);
                else            e = new Choice(e,particle(p));
            }
            return e;
        } else {
            Expression e = Expression.EPSILON;
            for (XSParticle p : group.getChildren()) {
View Full Code Here

Examples of domain.Choice

          List choices = f.getChoices();

          if (choices.size() == 1) {

            Choice c2 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(1, c2);

            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          } else if (choices.size() == 2) {
            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          }
        }

        model.put("folders", finalizedByCandidate);
        link = "wait";

      /* The page of a secretary displaying folders with a paper version received but the version is incomplete, there are some attached documents missing */
      } else if (action.equals("incomplete")) {

        page.add("Secr�tariat : Liste des dossiers papiers incomplets.");
        model.put("page", page);

        /*
         * Liste des dossier ayant recu une version papier mais
         * incomplete
         */
        List<Folder> incomplete = foldermanager.findPersonalInfoByState(Folder.FOLDER_INCOMPLETE);

        for (Folder f : incomplete) {
          List choices = f.getChoices();

          if (choices.size() == 1) {

            Choice c2 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(1, c2);

            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          } else if (choices.size() == 2) {
            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          }
        }

        model.put("folders", incomplete);
        link = "incomplete";

      /* The page of a secretary displaying folders with a paper version received */
      } else if (action.equals("complete")) {

        page.add("Secr�tariat : Liste des dossiers papiers complets.");
        model.put("page", page);

        /* Liste des dossier ayant recu une version papier complete */
        List<Folder> complete = foldermanager.findPersonalInfoByState(Folder.FOLDER_COMPLETE);

        for (Folder f : complete) {
          List choices = f.getChoices();

          if (choices.size() == 1) {

            Choice c2 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(1, c2);

            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          } else if (choices.size() == 2) {
            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          }
        }

View Full Code Here

Examples of java.awt.Choice

        };
        files.addItemListener(this);

        // Create the 'Look In' component
        lookIn = new Choice();
        lookIn.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                AWTFileSelector.this.cwd = new File(lookIn.getSelectedItem());
                refresh();               
            }
           
        });
        rebuildLookIn();

        // Create the tool bar
        Panel z = new Panel(new FlowLayout());
        if (showButtons) {
            home = new ImageButton(showButtonImages ? UIUtil.getStockImage(StockIcons.STOCK_HOME, AWTFileSelector.class) : null, showButtonText ? Messages.getString("AWTFileSelector.home") : null, "home"); //$NON-NLS-1$ //$NON-NLS-2$
            home.setHoverButton(true);
            home.addActionListener(this);
            home.setToolTipText(Messages.getString("AWTFileSelector.navigateToYourHomeDirectory")); //$NON-NLS-1$
            z.add(home);
            parent = new ImageButton(showButtonImages ? UIUtil.getStockImage(StockIcons.STOCK_UP_FOLDER, AWTFileSelector.class) : null, showButtonText ? Messages.getString("AWTFileSelector.home") : null, "home"); //$NON-NLS-1$ //$NON-NLS-2$
            parent.setHoverButton(true);
            parent.addActionListener(this);
            parent.setToolTipText(Messages.getString("AWTFileSelector.navigateToParent")); //$NON-NLS-1$
            z.add(parent);
            newFolder = new ImageButton(showButtonImages ? UIUtil.getStockImage(StockIcons.STOCK_NEW_FOLDER, AWTFileSelector.class) : null, showButtonText ? Messages.getString("AWTFileSelector.new") : null, "newFolder"); //$NON-NLS-1$ //$NON-NLS-2$
            newFolder.setHoverButton(true);
            newFolder.addActionListener(this);
            newFolder.setToolTipText(Messages.getString("AWTFileSelector.createFolder")); //$NON-NLS-1$
            z.add(newFolder);
            remove = new ImageButton(showButtonImages ? UIUtil.getStockImage(StockIcons.STOCK_DELETE, AWTFileSelector.class) : null, showButtonText ? Messages.getString("AWTFileSelector.delete") : null, "delete"); //$NON-NLS-1$ //$NON-NLS-2$
            remove.setHoverButton(true);
            remove.addActionListener(this);
            remove.setToolTipText(Messages.getString("AWTFileSelector.removeSelected")); //$NON-NLS-1$
            z.add(remove);
        }
        if (showHiddenFilesSwitch) {
            showHiddenFiles = new Checkbox(Messages.getString("AWTFileSelector.hiddentFiles"));             //$NON-NLS-1$
            showHiddenFiles.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    refresh();
                }
            });
        }

        // Create the top bar
        Panel top = new Panel(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbc.anchor = GridBagConstraints.WEST;
        gbc.weightx = 1.0;
        UIUtil.gridBagAdd(top, lookIn, gbc, GridBagConstraints.RELATIVE);
        gbc.weightx = 0.0;
        UIUtil.gridBagAdd(top, z, gbc, GridBagConstraints.REMAINDER);
       
        // Create the path panel
        Panel pathPanel = new Panel(new GridBagLayout());
        GridBagConstraints gbc1 = new GridBagConstraints();
        path = new TextField(""); //$NON-NLS-1$
        path.addActionListener(this);
        gbc1.fill = GridBagConstraints.HORIZONTAL;
        gbc1.anchor = GridBagConstraints.WEST;
        gbc1.weightx = 0.0;
        gbc1.insets = new Insets(2, 2, 2, 2);
        UIUtil.gridBagAdd(pathPanel, new Label(Messages.getString("AWTFileSelector.fileName")), gbc1, showButtons ? 1 : GridBagConstraints.RELATIVE); //$NON-NLS-1$
        gbc1.weightx = 1.0;
        UIUtil.gridBagAdd(pathPanel, path, gbc1, showButtons ? GridBagConstraints.RELATIVE : GridBagConstraints.REMAINDER);
        gbc1.weightx = 0.0;
        if(showButtons) {
            go = new ImageButton(null, Messages.getString("AWTFileSelector.go"), "go"); //$NON-NLS-1$ //$NON-NLS-2$
            go.setHoverButton(true);
            go.addActionListener(this);
            go.setToolTipText(Messages.getString("AWTFileSelector.navigateToSelectedFolder")); //$NON-NLS-1$
            UIUtil.gridBagAdd(pathPanel, go, gbc1, GridBagConstraints.REMAINDER);
        }
        UIUtil.gridBagAdd(pathPanel, new Label(Messages.getString("AWTFileSelector.filesOfType")), gbc1, showButtons ? 1 : GridBagConstraints.RELATIVE); //$NON-NLS-1$
        gbc1.weightx = 1.0;
        filterSelect = new Choice();
        rebuildFilterSelect();
        filterSelect.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                refresh();
            }
View Full Code Here

Examples of java.awt.Choice

        pText.setBackground(SystemColor.control);
        pLabel.setBackground(SystemColor.control);
        pButton.setBackground(SystemColor.control);
        pLabel.add(createLabel("Recent:"));

        recent = new Choice();

        try {
            settings = ConnectionDialogCommon.loadRecentConnectionSettings();
        } catch (java.io.IOException ioe) {
            ioe.printStackTrace();
        }

        recent.add(ConnectionDialogCommon.emptySettingName);

        Enumeration en = settings.elements();

        while (en.hasMoreElements()) {
            recent.add(((ConnectionSetting) en.nextElement()).getName());
        }

        recent.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {

                String s = (String) e.getItem();
                ConnectionSetting setting =
                    (ConnectionSetting) settings.get(s);

                if (setting != null) {
                    mName.setText(setting.getName());
                    mDriver.setText(setting.getDriver());
                    mURL.setText(setting.getUrl());
                    mUser.setText(setting.getUser());
                    mPassword.setText(setting.getPassword());
                }
            }
        });
        pText.add(recent);

        Button b;

        b = new Button("Clr");

        b.setActionCommand("Clear");
        b.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {

                ConnectionDialogCommon.deleteRecentConnectionSettings();

                settings = new Hashtable();

                recent.removeAll();
                recent.add(ConnectionDialogCommon.emptySettingName);
                mName.setText(null);
            }
        });
        pClearButton.add(b);
        pLabel.add(createLabel("Setting Name:"));

        mName = new TextField("");

        pText.add(mName);
        pLabel.add(createLabel("Type:"));

        types     = new Choice();
        connTypes = ConnectionDialogCommon.getTypes();

        for (int i = 0; i < connTypes.length; i++) {
            types.add(connTypes[i][0]);
        }
View Full Code Here

Examples of java.awt.Choice

        }
    }

    public Object updateUI(Object com, DomNode element)
    {
        Choice choice = (Choice) com;
        populateItems(choice, element);
        return com;
    }
View Full Code Here

Examples of java.awt.Choice

    public void handleEvent(AWTEvent e)
    {
        if (e instanceof ItemEvent)
        {
            Choice c = (Choice) e.getSource();
            ItemEvent itemEvent = (ItemEvent) e;
            Object clicked = itemEvent.getItem();
            int index = 0;
            for (int i = 0; i < c.getItemCount(); i++)
            {
                if (c.getItem(i) == clicked)
                {
                    index = i;
                    break;
                }
            }
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.