Package javax.swing

Examples of javax.swing.DefaultComboBoxModel


   *  
   * @return javax.swing.DefaultComboBoxModel 
   */
  private DefaultComboBoxModel getEntryListModel() {
    if (entryListModel == null) {
      entryListModel = new DefaultComboBoxModel();
    }
    return entryListModel;
  }
View Full Code Here


        if (!currentGroup.equals("")) {
            this.currentGroup = currentGroup;
        }

        //buddyGroups = new JComboBox( getRosterGroups() );
        buddyGroups.setModel(new DefaultComboBoxModel(getRosterGroups()));

        validate();
    }
View Full Code Here

       box.firePropertyChange("itemCount", oldModel.getSize(), actions.length);
     }
   }
  
   private ComboBoxModel getComboBoxModel(ArtifactAction... actions) {
     ComboBoxModel result = new DefaultComboBoxModel(actions);
     result.setSelectedItem(actions[0]);
     return result;
   }
View Full Code Here

    showPollqCheckBox = new JCheckBox();
    settingMediator.add(Settings.SHOW_POLLQ, showPollqCheckBox);
    builder.append(showPollqCheckBox, 5);
    builder.nextLine();
   
    languageModel = new DefaultComboBoxModel();
    JComboBox lanuageComboBox = new JComboBox(languageModel);
    lanuageComboBox.setRenderer(new DefaultListCellRenderer() {
      public java.awt.Component getListCellRendererComponent(javax.swing.JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        if (value != null) {
          setText(((Locale)value).getDisplayName());
        }
        return this;
      }
    });
    languageLabel = builder.append("", lanuageComboBox, 2);
    builder.nextLine();
   
    builder.appendSeparator(i18n.tr("Behavior"));
   
    completionModeModel = new DefaultComboBoxModel();
    JComboBox completionModeComboBox = new JComboBox(completionModeModel);
    completionModeComboBox.setRenderer(new DefaultListCellRenderer() {
      public java.awt.Component getListCellRendererComponent(javax.swing.JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        if (value != null) {
View Full Code Here

    emailLabel = builder.append("", emailTextField, 3);
    builder.nextLine();
   
    builder.appendSeparator(i18n.tr("Parameter"));

    notificationModel = new DefaultComboBoxModel();
    JComboBox notificationComboBox = new JComboBox(notificationModel);
    notificationLabel = builder.append("", notificationComboBox, 2);
    builder.nextLine();
   
    resolutionModel = new DefaultComboBoxModel();
    JComboBox resolutionComboBox = new JComboBox(resolutionModel);
    resolutionLabel = builder.append("", resolutionComboBox, 2);
    builder.nextLine();

    priorityModel = new SpinnerNumberModel(0, 0, 255, 1);
    prioritySpinner = new JSpinner(priorityModel);
    priorityLabel = builder.append("", prioritySpinner);
    builder.nextLine();
   
    maxTriesSpinner = new JSpinner(new SpinnerNumberModel(1, 1, 255, 1));
    maxTriesLabel = builder.append("", maxTriesSpinner);
    builder.nextLine();
   
    maxDialsSpinner = new JSpinner(new SpinnerNumberModel(1, 1, 255, 1));
    maxDialsLabel = builder.append("", maxDialsSpinner);
    builder.nextLine();
   
    paperModel = new DefaultComboBoxModel();
    JComboBox paperComboBox = new JComboBox(paperModel);
    paperLabel = builder.append("", paperComboBox, 2);
  }
View Full Code Here

    btnFitWidth = new javax.swing.JToggleButton();
    pnlSep03 = new javax.swing.JPanel();
    btnZoomIn = new javax.swing.JButton();
    btnZoomOut = new javax.swing.JButton();
    cmbZoom = new javax.swing.JComboBox();
    DefaultComboBoxModel model = new DefaultComboBoxModel();
    for(int i = 0; i < zooms.length; i++)
    {
      model.addElement("" + zooms[i] + "%");
    }
    cmbZoom.setModel(model);

    pnlMain = new javax.swing.JPanel();
    scrollPane = new javax.swing.JScrollPane();
View Full Code Here

    vmMap = new java.util.HashMap();
    while (i.hasNext()) {
      WorksheetSingleClientModel crtM = (WorksheetSingleClientModel)i.next();
      vmMap.put(crtM.getName(),crtM);
    }
    jComboBox1.setModel(new DefaultComboBoxModel(new Vector(vmMap.keySet())));
    nameVM = (String)jComboBox1.getSelectedItem();
    urlVM = ((WorksheetSingleClientModel)vmMap.get(nameVM)).getAddress();
    jComboBox1.setPreferredSize(new java.awt.Dimension(280, 50));
    jComboBox1.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(10, 10, 10, 10)));
    jComboBox1.setMinimumSize(new java.awt.Dimension(280, 50));
View Full Code Here

    setAutoComplete();
  }

  private boolean getClosestFetch(String search) {
    int searchLength = search.length();
    DefaultComboBoxModel model = (DefaultComboBoxModel) getModel();
    for (int i = 0; i < model.getSize(); i++) {
      String entry = (String) model.getElementAt(i);
      if (entry.length() >= searchLength
          && entry.substring(0, searchLength).toLowerCase().equals(
              search.toLowerCase())) {
        ((JTextField) getEditor().getEditorComponent()).setText(entry);
        ((JTextField) getEditor().getEditorComponent()).select(
View Full Code Here

        predecessorColumn.setCellEditor(new DefaultCellEditor(comboBox));
    }

    private void setUpTypeComboColumn(TableColumn typeColumn) {
        // Set up the editor for the sport cells.
        DefaultComboBoxModel model = new DefaultComboBoxModel(CONSTRAINTS);
        JComboBox comboBox = new JComboBox(model);
        comboBox.setSelectedIndex(0);
        comboBox.setEditable(false);
        typeColumn.setCellEditor(new DefaultCellEditor(comboBox));
    }
View Full Code Here

        comboBox.setEditable(false);
        typeColumn.setCellEditor(new DefaultCellEditor(comboBox));
    }

    private void setUpHardnessColumnEditor(TableColumn hardnessColumn) {
        DefaultComboBoxModel model = new DefaultComboBoxModel(HARDNESS);
        JComboBox comboBox = new JComboBox(model);
        comboBox.setSelectedIndex(0);
        comboBox.setEditable(false);
        hardnessColumn.setCellEditor(new DefaultCellEditor(comboBox));     
    }
View Full Code Here

TOP

Related Classes of javax.swing.DefaultComboBoxModel

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.