Package java.awt

Examples of java.awt.Choice$State


    OK = new JButton("OK!");
    OK.setBounds((WIDTH - 100), (HEIGHT - 70), 80, 30);
    OK.addActionListener(this);
    window.add(OK);
   
    res = new Choice();
    resLabel = new JLabel("Resolution: ");
    res.setBounds(150, 80, 130, 25);
    resLabel.setBounds(50, 77, 130, 25);
    res.add("640, 480");
    res.add("800, 600");
    res.add("1024, 768");
    res.add("854, 480 (Widescreen)");
    res.add("960, 540 (Widescreen)");
    res.add("1024, 576 (Widescreen)");
    res.add("1366, 768 (Widescreen)");
    res.add("1920, 1080 (Widescreen)");
    res.select(Config.loadConfig("res/settings/config.xml", "resSelection"));
    window.add(res);
    window.add(resLabel);
   
    fullScreen = new Choice();
    fullScreenLabel = new JLabel("Full Screen: ");
    fullScreen.setBounds(150, 105, 130, 25);
    fullScreenLabel.setBounds(50, 105, 130, 25);
    fullScreen.add("On");
    fullScreen.add("Off");
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

        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

    /**
     * The dropdown menu at the top for selecting an algorithm for solving the puzzle.
     * @return a dropdown/down component.
     */
    private Choice createAlgorithmDropdown() {
        algorithmChoice_ = new Choice();
        algorithmChoice_.addItemListener(this);
        for (AlgorithmEnum a: algorithmValues_) {
            algorithmChoice_.add(a.getLabel());
        }
        algorithmChoice_.select(controller_.getAlgorithm().ordinal());
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

        GridBagConstraints gbc = new GridBagConstraints();
        panel.setLayout(gbl);
        mutateLabel = new Label(Integer.toString(MUTATE_PERCENTAGE[0]));
        scrollbar = new Scrollbar(Scrollbar.HORIZONTAL,
                                  MUTATE_PERCENTAGE[0], 1, 0, 100);
        choice = new Choice();
        choice.add("Random pitch change");
        choice.add("Bar sequence mutations");
        choice.add("Split and merge");
        choice.add("Step interpolation");
        choice.add("Tonal Pauses");
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

    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
View Full Code Here

    localPanel1.setBackground(SystemColor.control);
    localPanel3.setBackground(SystemColor.control);
    localPanel2.setBackground(SystemColor.control);
    localPanel4.setBackground(SystemColor.control);
    localPanel2.add(createLabel("Recent:"));
    this.recent = new Choice();
    try
    {
      this.settings = ConnectionDialogCommon.loadRecentConnectionSettings();
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
    }
    this.recent.add(ConnectionDialogCommon.emptySettingName);
    Enumeration localEnumeration = this.settings.elements();
    while (localEnumeration.hasMoreElements())
      this.recent.add(((ConnectionSetting)localEnumeration.nextElement()).getName());
    this.recent.addItemListener(new ItemListener()
    {
      public void itemStateChanged(ItemEvent paramItemEvent)
      {
        String str = (String)paramItemEvent.getItem();
        ConnectionSetting localConnectionSetting = (ConnectionSetting)ConnectionDialog.this.settings.get(str);
        if (localConnectionSetting != null)
        {
          ConnectionDialog.this.mName.setText(localConnectionSetting.getName());
          ConnectionDialog.this.mDriver.setText(localConnectionSetting.getDriver());
          ConnectionDialog.this.mURL.setText(localConnectionSetting.getUrl());
          ConnectionDialog.this.mUser.setText(localConnectionSetting.getUser());
          ConnectionDialog.this.mPassword.setText(localConnectionSetting.getPassword());
        }
      }
    });
    localPanel3.add(this.recent);
    Button localButton = new Button("Clr");
    localButton.setActionCommand("Clear");
    localButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramActionEvent)
      {
        ConnectionDialogCommon.deleteRecentConnectionSettings();
        ConnectionDialog.access$002(ConnectionDialog.this, new Hashtable());
        ConnectionDialog.this.recent.removeAll();
        ConnectionDialog.this.recent.add(ConnectionDialogCommon.emptySettingName);
        ConnectionDialog.this.mName.setText(null);
      }
    });
    localPanel5.add(localButton);
    localPanel2.add(createLabel("Setting Name:"));
    this.mName = new TextField("");
    localPanel3.add(this.mName);
    localPanel2.add(createLabel("Type:"));
    this.types = new Choice();
    this.connTypes = ConnectionDialogCommon.getTypes();
    for (int i = 0; i < this.connTypes.length; i++)
      this.types.add(this.connTypes[i][0]);
    this.types.addItemListener(this);
    localPanel3.add(this.types);
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.