Examples of ChoiceGroup


Examples of javax.microedition.lcdui.ChoiceGroup

    }

    void createFile() {
        Form creator = new Form(T._("New File"));
        nameInput = new TextField(T._("Enter Name"), null, 256, TextField.ANY);
        typeInput = new ChoiceGroup(T._("Enter File Type"), Choice.EXCLUSIVE,
                typeList, iconList);
        creator.append(nameInput);
        creator.append(typeInput);
        creator.addCommand(newOkCommand);
        creator.addCommand(backToBCommand);
View Full Code Here

Examples of javax.microedition.lcdui.ChoiceGroup

    private Choice appendChoice( final String label, final String[] choices )
    {
        final Spacer spacer = new Spacer( POPUP_MENUS_SHIFT, 0 );
        spacer.setLayout( Item.LAYOUT_NEWLINE_BEFORE + Item.LAYOUT_2 );
        final ChoiceGroup group = new ChoiceGroup( null, Choice.POPUP );
        group.setLayout( Item.LAYOUT_2 );
        for( int choice = 0; choice < choices.length; ++choice )
            group.append( choices[choice], null );
        appendMessage( label );
        append( spacer );
        append( group );
        return group;
    }
View Full Code Here

Examples of javax.microedition.lcdui.ChoiceGroup

      aImages[i] = rViewController.getNodeController().getNodeImage(sType,
                                      null);
      aTypes[i= getString(sType);
    }

    final ChoiceGroup aChoice = new ChoiceGroup(getString("JL_LNodeType"),
                          Choice.EXCLUSIVE, aTypes,
                          aImages);
    final TextField   aInput  = new TextField(getString("JL_LNodeName"),
                          null, MAX_TITLE_SIZE,
                          TextField.ANY);

    // Use a MessageScreen to query the new title and, if confirmed, callback
    // to method newNode(); params null, null: no Image, empty textfield
    MessageScreen.showMessageBox(getString("JL_MtNewNode"), null, null,
                  new Item[] { aChoice, aInput }, false,
                  new Executable()
                  {
                    public void execute(Object rArg)
                      throws UserNotificationException
                    {
                      // this callback will only be invoked if the user selects Ok
                      newNode(aTypeKeys[aChoice
                                .getSelectedIndex()],
                          aInput.getString());
                    }
                  });
  }
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.