Package java.awt

Examples of java.awt.Choice$State


        p.addKeyListener(this);
        p.setBackground(SystemColor.control);
        p.add(createLabel("Type:"));

        Choice types = new Choice();

        types.addItemListener(this);
        types.addKeyListener(this);

        for (int i = 0; i < sJDBCTypes.length; i++) {
            types.add(sJDBCTypes[i][0]);
        }

        p.add(types);
        p.add(createLabel("Driver:"));
View Full Code Here


        pEntry.add(new Label("Search table"), c);

        c.gridx = 1;

        // get all table names and show a drop down list of them in cTables
        cTables = new Choice();

        for (Enumeration e = vAllTables.elements(); e.hasMoreElements(); ) {
            cTables.addItem((String) e.nextElement());
        }
View Full Code Here

        txtCommand = new TextArea(5, 40);

        txtCommand.setFont(fFont);

        // recent - choice
        choRecent = new Choice();

        // result - grid
        gResult = new Grid();

        // combine it
View Full Code Here

    super.initialize(type, oldInstance, newInstance, enc);
    if (type != oldInstance.getClass()) {
      return;
    }

    Choice choice = (Choice) oldInstance;
    int count = choice.getItemCount();
    Expression getterExp = null;
    for (int i = 0; i < count; i++) {
      getterExp = new Expression(choice, "getItem", new Object[] { i });
      try {
        // Calculate the old value of the property
View Full Code Here

            }

            Label dateLabel=new Label("Date Fields");
            dateLabel.setFont(DemoUtility.labelFont);

            dateMenu= new Choice();
            dateMenu.setBackground(DemoUtility.choiceColor);
            for (int i = 0; i < kRollAddFields.length; i++) {
                dateMenu.addItem(kRollAddFields[i].name);
                if (kRollAddFields[i].field == Calendar.MONTH) {
                    dateMenu.select(i);
                }
            }

            Panel upDown = new Panel();
            {
                upDown.setLayout(new GridLayout(2,1));

                // *** If the images are not found, we use the label.
                up = new Button("^");
                down = new Button("v");
                up.setBackground(DemoUtility.bgColor);
                down.setBackground(DemoUtility.bgColor);
                upDown.add(up);
                upDown.add(down);
                up.addActionListener(this);
                down.addActionListener(this);
            }

            rollAddPanel.add(dateLabel);
            rollAddPanel.add(dateMenu);
            rollAddPanel.add(rollAddBoxes);
            rollAddPanel.add(upDown);

        }
        Panel localePanel = new Panel();
        {
            // Make the locale popup menus
            localeMenu= new Choice();
            Locale defaultLocale = Locale.getDefault();
            int bestMatch = -1, thisMatch = -1;
            int selectMe = 0;
           
            for (int i = 0; i < locales.length; i++) {
View Full Code Here

       
        setLayout(new GridLayout(2, 1));

        Panel panel = new Panel();
        panel.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
        fItems = new Choice();

        if (names.length != values.length) {
            throw new IllegalArgumentException("Must have same number of names and values.");
        }
View Full Code Here

* create the choice of file types to download
* @return choice instance
*/
private Choice getChoice() {
  if (choice == null) {
    choice = new Choice();
    choice.setBounds(new Rectangle(450, 220, 100, 25));
   
    choice.insert("pdf", 0);
    choice.insert("doc", 1);
    choice.insert("fb2", 2);
View Full Code Here

   *  
   * @return java.awt.Choice 
   */
  private Choice getChoice0() {
    if (choice0 == null) {
      choice0 = new Choice();
      choice0.setBounds(new Rectangle(450, 70, 100, 25));
      choice0.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent e) {
                  if (choice0.getSelectedIndex() == 0)
                  {
View Full Code Here

   *  
   * @return java.awt.Choice 
   */
  private Choice getChoice1() {
    if (choice1 == null) {
      choice1 = new Choice();
      choice1.setBounds(new Rectangle(450, 100, 100, 25));
      choice1.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent e) {
                  if (choice1.getSelectedIndex() == 0)
                  {
View Full Code Here

   *  
   * @return java.awt.Choice 
   */
  private Choice getChoice2() {
    if (choice2 == null) {
      choice2 = new Choice();
      choice2.setBounds(new Rectangle(450, 130, 100, 25));
      choice2.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent e) {
                  if (choice2.getSelectedIndex() == 0)
                  {
View Full Code Here

TOP

Related Classes of java.awt.Choice$State

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.