Package javax.swing

Examples of javax.swing.DefaultComboBoxModel.insertElementAt()


        {
          if (model.getSize() > 0)
          {
            model.removeElementAt(0);
          }
          model.insertElementAt(NO_MATCHING_RULE, 0);
        }
        combos[i].setSelectedIndex(index);
      }
    }
  }
View Full Code Here


                }
              }
              if (model.getIndexOf(newElement) == -1)
              {
                int index = model.getIndexOf(COMBO_SEPARATOR);
                model.insertElementAt(newElement, index + 1);
                if (otherBaseDns.size() == 1)
                {
                  model.insertElementAt(COMBO_SEPARATOR, index + 2);
                }
              }
View Full Code Here

              {
                int index = model.getIndexOf(COMBO_SEPARATOR);
                model.insertElementAt(newElement, index + 1);
                if (otherBaseDns.size() == 1)
                {
                  model.insertElementAt(COMBO_SEPARATOR, index + 2);
                }
              }
            }
            catch (Throwable t)
            {
View Full Code Here

        {
          if (model.getSize() > 0)
          {
            model.removeElementAt(0);
          }
          model.insertElementAt(INFO_CTRL_PANEL_DEFAULT_DEFINED_IN_SYNTAX.get(
              rules[i].getNameOrOID()), 0);
        }
        else
        {
          if (model.getSize() > 0)
View Full Code Here

        {
          if (model.getSize() > 0)
          {
            model.removeElementAt(0);
          }
          model.insertElementAt(NO_MATCHING_RULE, 0);
        }
        combos[i].setSelectedIndex(index);
      }
    }
  }
View Full Code Here

        updateTableVidal(selectedMKB10item);
        setEnabledComponents();
    resizeColumn();

        DefaultComboBoxModel model = new DefaultComboBoxModel(directoryMKB10.toArray(false, true));
        model.insertElementAt("", 0);
        model.setSelectedItem("");
        FilteredComboBoxModel filteredModel = new FilteredComboBoxModel(cbSearch, new FilteredComboBoxModel.MaskChecker(), false) {

            @Override
            public Object addItem(String txt) {
View Full Code Here

        updateTableVidal(selectedAtc);
        setEnabledComponents();
    resizeColumn();

        DefaultComboBoxModel model = new DefaultComboBoxModel(directoryVidalAtc.toArray(false, true));
        model.insertElementAt("", 0);
        model.setSelectedItem("");
        FilteredComboBoxModel filteredModel = new FilteredComboBoxModel(cbSearch, new FilteredComboBoxModel.MaskChecker(), false) {

            @Override
            public Object addItem(String txt) {
View Full Code Here

            cbSerren.setModel(new DefaultComboBoxModel(new String[] {noSerrensItem}));
            cbSerren.setEnabled(false);
            cbSerren.setSelectedItem(noSerrensItem);
        }else{
            DefaultComboBoxModel model = new DefaultComboBoxModel(serRenLocals.toArray());
            model.insertElementAt("Без посещения", 0);
            cbSerren.setModel(model);
        }
        //причина снятия
        DirectoryReasonDown directoryRD = DirectoryLocator.getDirectory(DirectoryReasonDown.class);
        cbReasonDown.setModel(new DefaultComboBoxModel(directoryRD.toArray()));
View Full Code Here

                }
            };
        }
        DefaultComboBoxModel model = new DefaultComboBoxModel(items);
        if (addEmpty) {
            model.insertElementAt("", 0);
        }
        filteredModel.setContainModel(model);
//        filteredModel.addEnterListener(new EnterKeyListener() {
//
//            @Override
View Full Code Here

            DirectoryVidalFarmItem parent = item.getParent();
            farmStrings[i] = item.getTitle() + (parent != null ? " (" + parent.getTitle() + ")" : "");
        }

        DefaultComboBoxModel model = new DefaultComboBoxModel(directoryVidalFarm.toArray(false, true)/*farmStrings*/);
        model.insertElementAt("", 0);
        model.setSelectedItem("");
        FilteredComboBoxModel filteredModel = new FilteredComboBoxModel(cbSearch, new FilteredComboBoxModel.MaskChecker(), false) {

            @Override
            public Object addItem(String txt) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.