Examples of Choice


Examples of java.awt.Choice

                if (!editable)
                    checkbox.setEnabled(false);

                break;
            case IOption.CHOICE:
                choice = new Choice();

                choice.addMouseListener(this);
                label = new Label(option.getDisplayableName());
                label.addMouseListener(this);
                add(label, BorderLayout.WEST);
View Full Code Here

Examples of javango.polls.model.Choice

      context.put("error_message", "You didn't select a valid choice");
      context.put("form", form);
      return renderToResponse("javango/polls/templates/detail.ftl", context);
    }
   
    Choice selected_choice = (Choice)form.getCleanedValue(form.choice);

    int votes = selected_choice.getVotes() == null ? 0 : selected_choice.getVotes().intValue();
    selected_choice.setVotes(votes + 1);
    // due to the way hibernate works this will automatically save when the middleware commits
    return new HttpResponseRedirect("/polls/" + poll_id + "/results/");
  }
View Full Code Here

Examples of mage.choices.Choice

  }

  @Override
  public boolean apply(Game game, Ability source) {
    Set<String> cardNames = Sets.getCardNames();
    Choice cardChoice = new ChoiceImpl();
    cardChoice.setChoices(Sets.getCardNames());
    for (Player player: game.getPlayers().values()) {
      cardChoice.clearChoice();
      player.choose(Outcome.DrawCard, cardChoice, game);
      Card card = player.getLibrary().removeFromTop(game);
      Cards cards  = new CardsImpl();
      cards.add(card);
      player.revealCards(cards, game);
      if (card.getName().equals(cardChoice.getChoice())) {
        card.moveToZone(Zone.HAND, source.getId(), game, true);
      }
      else {
        card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
      }
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.UIFacade.Choice

        if(myProject.getDocument() == null && !myProject.isModified()) {
            return false;
        }
      String message = i18n("msg17");
      String title = i18n("question");
      Choice mergeChoice = getUIFacade().showConfirmationDialog(message, title);
      if (mergeChoice == Choice.YES) {
        return true;
      }
        if (myProject.checkCurrentProject()) {
            myProject.close();
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.UIFacade.Choice

    public void actionPerformed(ActionEvent e) {
        myProjectFrame.getTabs().setSelectedIndex(UIFacade.RESOURCES_INDEX);
        final ResourceAssignment[] context = myContext.getResourceAssignments();
        if (context != null && context.length > 0) {
          Choice choice = myProjectFrame.getUIFacade().showConfirmationDialog(getI18n("msg23") + " "
                    + getDisplayName(context) + "?", getI18n("warning"));
            if (choice==Choice.YES) {
                myProjectFrame.getUIFacade().getUndoManager().undoableEdit("Resource removed",
                        new Runnable() {
                            public void run() {
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.UIFacade.Choice

        final ProjectResource[] context = getContext().getResources();
        if (context.length > 0) {
          final String message = getLanguage().getText("msg6") + " "
            + getDisplayName(context)+ "?";
          final String title = getLanguage().getText("question");
          Choice choice = myUIFacade.showConfirmationDialog(message, title);
            if (choice==Choice.YES) {
                myUIFacade.getUndoManager().undoableEdit("Resource removed",
                        new Runnable() {
                            public void run() {
                                deleteResources(context);
View Full Code Here

Examples of org.antlr.v4.codegen.model.Choice

  }

  @Override
  public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST labelAST) {
    int decision = ((DecisionState)blkAST.atnState).decision;
    Choice c;
    if ( !g.tool.force_atn && AnalysisPipeline.disjoint(g.decisionLOOK.get(decision)) ) {
      c = getLL1ChoiceBlock(blkAST, alts);
    }
    else {
      c = getComplexChoiceBlock(blkAST, alts);
View Full Code Here

Examples of org.antlr.v4.codegen.model.Choice

  @Override
  public Choice getLL1EBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts) {
    int ebnf = 0;
    if ( ebnfRoot!=null ) ebnf = ebnfRoot.getType();
    Choice c = null;
    switch ( ebnf ) {
      case ANTLRParser.OPTIONAL :
        if ( alts.size()==1 ) c = new LL1OptionalBlockSingleAlt(this, ebnfRoot, alts);
        else c = new LL1OptionalBlock(this, ebnfRoot, alts);
        break;
View Full Code Here

Examples of org.antlr.v4.codegen.model.Choice

  @Override
  public Choice getComplexEBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts) {
    int ebnf = 0;
    if ( ebnfRoot!=null ) ebnf = ebnfRoot.getType();
    Choice c = null;
    switch ( ebnf ) {
      case ANTLRParser.OPTIONAL :
        c = new OptionalBlock(this, ebnfRoot, alts);
        break;
      case ANTLRParser.CLOSURE :
View Full Code Here

Examples of org.antlr.v4.codegen.model.Choice

    // pick out alt(s) for primaries
    CodeBlockForOuterMostAlt outerAlt = (CodeBlockForOuterMostAlt)function.code.get(0);
    List<CodeBlockForAlt> primaryAltsCode = new ArrayList<CodeBlockForAlt>();
    SrcOp primaryStuff = outerAlt.ops.get(0);
    if ( primaryStuff instanceof Choice ) {
      Choice primaryAltBlock = (Choice) primaryStuff;
      primaryAltsCode.addAll(primaryAltBlock.alts);
    }
    else { // just a single alt I guess; no block
      primaryAltsCode.add((CodeBlockForAlt)primaryStuff);
    }
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.