Package java.awt

Examples of java.awt.Choice$AccessibleAWTChoice


        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


      updatePanel_.updatedDataSet();
      updatePanel_.updatedQueryData();
      return;
    }

    Choice c = (Choice)e.getItemSelectable();

    switch(type_) {
    case FL_HOUR:
      queryData_.setHour(c.getSelectedIndex()+1);
      break;
    case FL_MINUTE:
      queryData_.setMinute(c.getSelectedIndex()*5);
      break;
    case FL_AMPM:
      queryData_.setAmpm(c.getSelectedIndex());
      break;
    default:
      System.out.println("Invalid Item Listener");
      return;
    }
View Full Code Here

}

Label jl0 = new Label("                Message will be send to --->  ");
add(jl0);

ch = new Choice();
ch.addItem(ProtocolConstants.SEND_TO_ALL);
ch.addItemListener(this);
add(ch);

Label jl = new Label("  Messages  ");
View Full Code Here

    public DitherControls(DitherTest app, int s, int e, DitherMethod type,
            boolean vertical) {
        applet = app;
        setLayout(dcLayout);
        add(new Label(vertical ? "Vertical" : "Horizontal"));
        add(choice = new Choice());
        for (DitherMethod m : DitherMethod.values()) {
            choice.addItem(m.toString().substring(0, 1)
                    + m.toString().substring(1).toLowerCase());
        }
        choice.select(type.ordinal());
View Full Code Here

        b = new Button("last");
        b.addActionListener(this);
        p.add(b);

        Choice c = new Choice();
        c.addItem("one");
        c.addItem("two");
        c.addItem("three");
        c.addItem("four");
        c.addItem("five");
        c.addItem("six");
        c.addItemListener(this);
        p.add(c);
    }
View Full Code Here

        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

        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

     * @return java.awt.Choice
     */
    private Choice getMessageOutputLevelChoice() {
        if (iMessageOutputLevelChoice == null) {
            try {
                iMessageOutputLevelChoice = new Choice();
                iMessageOutputLevelChoice.setName("MessageOutputLevelChoice");
                iMessageOutputLevelChoice.add("Error");
                iMessageOutputLevelChoice.add("Warning");
                iMessageOutputLevelChoice.add("Info");
                iMessageOutputLevelChoice.add("Verbose");
View Full Code Here

      public void itemStateChanged(ItemEvent ie) {
        memberlist.setEnabled(!broadcast.getState());
      }
    });
    p3.add(broadcast);
    groups = new Choice();
    groups.add(ipmsg.getPref("allName"));
    groups.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent ie) {
        received = true;
        if (!refreshing) {
View Full Code Here

        Cp932.toCp932(ipmsg.makeListStr(users[0].getPack())));
      p1.add(user);
    } else {
      Label to = new Label(ipmsg.getPref("toMulticastLabel"));
      p1.add(to);
      Choice choice = new Choice();
      for (int i = 0; i < users.length; i++)
        choice.add(
          Cp932.toCp932(ipmsg.makeListStr(users[i].getPack())));
      p1.add(choice);
    }
    body = new TextArea();
    add("Center", body);
View Full Code Here

TOP

Related Classes of java.awt.Choice$AccessibleAWTChoice

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.