Package javax.swing

Examples of javax.swing.ComboBoxModel


  /**
   * Creates the property iterator panel initially disabled.
   */
  public GeneratorPropertyIteratorPanel() {
    String [] options = {Messages.getInstance().getString("GeneratorPropertyIteratorPanel_Options_Disabled_Text"), Messages.getInstance().getString("GeneratorPropertyIteratorPanel_Options_Enabled_Text")};
    ComboBoxModel cbm = new DefaultComboBoxModel(options);
    m_StatusBox.setModel(cbm);
    m_StatusBox.setSelectedIndex(0);
    m_StatusBox.addActionListener(this);
    m_StatusBox.setEnabled(false);
    m_ConfigureBut.setEnabled(false);
View Full Code Here


    @Override
    protected void bind() {
        super.bind();
        List<?> matchRules = getPatternModel().getMatchRules();
        // PENDING: map rules to localized strings
        ComboBoxModel model = new DefaultComboBoxModel(matchRules.toArray());
        model.setSelectedItem(getPatternModel().getMatchRule());
        searchCriteria.setModel(model);
        searchCriteria.setAction(getAction(MATCH_RULE_ACTION_COMMAND));
       
    }
View Full Code Here

                    toggleSelectLods();
                  }
                });
          }
          {
            ComboBoxModel jComboBoxMapServicesModel = new DefaultComboBoxModel();
            jComboBoxMapServices = new JComboBox();
            jPanelSetting.add(jComboBoxMapServices);
            jComboBoxMapServices
                .setModel(jComboBoxMapServicesModel);
            jComboBoxMapServices.setBounds(10, 46, 433, 35);
View Full Code Here

                jLabelWkid
                    .setPreferredSize(new java.awt.Dimension(
                        61, 22));
              }
              {
                ComboBoxModel jComboBoxWkidModel = new DefaultComboBoxModel(
                    new String[] {});
                jComboBoxWkid = new JComboBox();
                jPanel3.add(jComboBoxWkid);
                jComboBoxWkid.setModel(jComboBoxWkidModel);
                jComboBoxWkid
View Full Code Here

    return jCheckBoxUseTile;
  }

  private JComboBox getJComboBoxFormate() {
    if (jComboBoxFormat == null) {
      ComboBoxModel jComboBoxFormateModel = new DefaultComboBoxModel(
          new String[] { "PNG", "JPEG" });
      jComboBoxFormat = new JComboBox();
      jComboBoxFormat.setModel(jComboBoxFormateModel);
      jComboBoxFormat.setBounds(261, 86, 120, 29);
    }
View Full Code Here

            }
        }

        private void loadSimLimit(Integer val) {
            int value = val.intValue();
            ComboBoxModel model = simLimit.getModel();
            for (int i = 0; i < model.getSize(); i++) {
                Integer opt = (Integer) model.getElementAt(i);
                if (opt.intValue() == value) {
                    simLimit.setSelectedItem(opt);
                }
            }
        }
View Full Code Here

            throw(new JemmyException("Waiting has been interrupted!"));
        }
    }

    private int findDirIndex(String dir, StringComparator comparator) {
  ComboBoxModel cbModel = getPathCombo().getModel();
  for(int i = cbModel.getSize() - 1; i >= 0; i--) {
      if(comparator.equals(((File)cbModel.getElementAt(i)).getName(),
         dir)) {
    return(i);
      }
  }
  return(-1);
View Full Code Here

  }
  return(-1);
    }

    private int findFileTypeIndex(String fileType, StringComparator comparator) {
  ComboBoxModel cbModel = getFileTypesCombo().getModel();
  for(int i = 0; i < cbModel.getSize(); i++) {
      if(comparator.equals(((FileFilter)cbModel.getElementAt(i)).getDescription(),
         fileType)) {
    return(i);
      }
  }
  return(-1);
View Full Code Here

* @since 1.8.3.0
*/
public class ComboBoxUtil {

  public static void setSelected(JComboBox comboBox, String name) {
    ComboBoxModel model = comboBox.getModel();
    for (int i = 0; i < model.getSize(); i++) {
      String itemName = (String) model.getElementAt(i);
      if (itemName.equalsIgnoreCase(name)) {
        model.setSelectedItem(itemName);
        break;
      }
    }
  }
View Full Code Here

      }
    }
  }

  public static void setSelected(JComboBox comboBox, FontStyle fontStyle) {
    ComboBoxModel model = comboBox.getModel();
    for (int i = 0; i < model.getSize(); i++) {
      String name = (String) model.getElementAt(i);
      FontStyle style = FontStyle.fromName(name);
      if (style != null && style == fontStyle) {
        model.setSelectedItem(name);
        break;
      }
    }
  }
View Full Code Here

TOP

Related Classes of javax.swing.ComboBoxModel

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.