Package javax.swing

Examples of javax.swing.JComboBox.removeAllItems()



  private void setComboBoxItems(int i,TableRowOrdering[] orderings)
  {
    JComboBox box = selectors[i];
    box.removeAllItems();
    for (int j=0;j<orderings.length;j++)
    {
      box.addItem(orderings[j]);
    }
    box.setVisible(true);
View Full Code Here


        harness.check(combo.getItemCount(), 10, "removeItem");
       
        combo.removeItemAt(0);
        harness.check(combo.getItemCount(), 9, "removeItemAt");
       
        combo.removeAllItems();
        harness.check(combo.getItemCount(), 0, "removeAllItems");

    }

}
View Full Code Here

        harness.check(ok, "removeItemAt");
        ok = false;

        try
        {
            combo.removeAllItems();
        }
        catch (RuntimeException re)
        {
            ok = true;
        }
View Full Code Here

    }

    public void setSelectorItems(String selectorName, String[] items,
        int defaultIdx) {
      JComboBox combo = getCombo(selectorName);
      combo.removeAllItems();
      for (String item : items)
        combo.addItem(item);
      selectorDefaults[combos.indexOf(combo)] = defaultIdx;
      combo.setVisible(items.length > 0);
    }
View Full Code Here

    // We disable the MSMS selector first and then enable it again later
    // after updating the items. If we skip this, the size of the
    // selector may not be adjusted properly (timing issues?)
    msmsSelector.setEnabled(false);

    msmsSelector.removeAllItems();
    boolean msmsVisible = false;

    // Add parent scan to MS/MS selector combo

    NumberFormat rtFormat = MZmineCore.getConfiguration().getRTFormat();
View Full Code Here

                    // Automatically select single device
                    deviceList.setSelectedIndex(1);
                  }
                }

                manualDeviceList.removeAllItems();
                for (DialServer dialServer : manualServers) {
                  manualDeviceList.addItem(dialServer);
                }
                manualDeviceList.setVisible(true);
                storeProperties();
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.