Package javax.swing

Examples of javax.swing.DefaultComboBoxModel.removeAllElements()


    public void displayData() {
        DefaultComboBoxModel lm = (DefaultComboBoxModel)jChoice1.getModel();
        usedByTable.setTitle("Used by Code");
        usesTable.setTitle("Uses tables");
        referencesTable.setTitle("Referenced by other tables");
        lm.removeAllElements();
        if(oraConn!=null){
            ResultSet res;
            try {
                res = oraConn.executeStatement("select distinct object_type from user_objects order by object_type");
                while(res.next()){
View Full Code Here


    public static List<Profile> updateProfiles(JComboBox rCombo, boolean withEmpty) throws SQLException, Exception {

        List<Profile> profiles = ConnectionDrivers.listProfile("");

        DefaultComboBoxModel dfcbm = (DefaultComboBoxModel) rCombo.getModel();
        dfcbm.removeAllElements();

        if (withEmpty){
            profiles.add(0, new Profile("", ""));
        }
View Full Code Here

      throw new IllegalArgumentException("Selection modes cannot be empty.");
   
    this.selectionModes.clear();

    DefaultComboBoxModel theModel = (DefaultComboBoxModel)this.cboSelectionMode.getModel();
    theModel.removeAllElements();

    this.selectionModes = EnumSet.allOf(SelectionMode.class);

    this.updateCboSelectionMode();
  }
View Full Code Here

    Week selectedWeek = (Week)this.cboWeek.getSelectedItem();

    this.cboWeek.removeActionListener(this);

    DefaultComboBoxModel cboWeekModel = (DefaultComboBoxModel)this.cboWeek.getModel();
    cboWeekModel.removeAllElements();
   
    if(this.cboYear.getSelectedItem() != null){
      int selectedYear = (Integer)cboYear.getSelectedItem();

      int minimumYear = this.lowerBound.getYear();
View Full Code Here

    Month selectedMonth = (Month)this.cboMonth.getSelectedItem();

    this.cboMonth.removeActionListener(this);

    DefaultComboBoxModel cboMonthModel = (DefaultComboBoxModel)this.cboMonth.getModel();
    cboMonthModel.removeAllElements();

    if(this.cboYear.getSelectedItem() != null){     
      int selectedYear = (Integer)cboYear.getSelectedItem();

      int minimumYear = this.lowerBound.getYear();
View Full Code Here

    this.cboYear.removeActionListener(this);
   
    DateTime dateIterator = this.upperBound;

    DefaultComboBoxModel cboYearModel = (DefaultComboBoxModel)this.cboYear.getModel();
    cboYearModel.removeAllElements();
   
    while(dateIterator.getYear() >=  this.lowerBound.getYear()){
      this.cboYear.addItem(new Year(dateIterator.getYear()));

      dateIterator = dateIterator.minusYears(1);
View Full Code Here

      jTextFieldWohnort.setText(selection.getWohnort());
    }
   
    DefaultComboBoxModel model = (DefaultComboBoxModel) jComboBoxBundesland.getModel();
     
    model.removeAllElements();
    for (String bundesland : selection.getBundeslaender()) {
      model.addElement(bundesland);
    }
    model.setSelectedItem(selection.getSelektiertesBundesland());
 
View Full Code Here

      jTextFieldEnde.setText(dateformat.format(new Date(selection.getVertragsende())));
    } else {
      jTextFieldEnde.setText("unbekannt/offen");
    }
    DefaultComboBoxModel model = (DefaultComboBoxModel) jComboBoxProdukt.getModel();
    model.removeAllElements();   
    for (String produkt : selection.getProdukte()) {
      model.addElement(produkt)
    }
    model.setSelectedItem(selection.getSelektiertesProdukt());   
   
View Full Code Here

      jTextFieldEnde.setText(dateformat.format(new Date(selection.getVertragsende())));
    } else {
      jTextFieldEnde.setText("unbekannt/offen");
    }
    DefaultComboBoxModel model = (DefaultComboBoxModel) jComboBoxProdukt.getModel();
    model.removeAllElements();   
    for (String produkt : selection.getProdukte()) {
      model.addElement(produkt)
    }
    model.setSelectedItem(selection.getSelektiertesProdukt());   
   
View Full Code Here

      jTextFieldWohnort.setText(selection.getWohnort());
    }
   
    DefaultComboBoxModel model = (DefaultComboBoxModel) jComboBoxBundesland.getModel();
     
    model.removeAllElements();
    for (String bundesland : selection.getBundeslaender()) {
      model.addElement(bundesland);
    }
    model.setSelectedItem(selection.getSelektiertesBundesland());
 
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.