Changeset 4014
- Timestamp:
- 05/05/09 13:37:05 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PP/branches/leap-second-dev-branch/jungle/src/org/trinet/util/graphics/DeltaTimePanel.java
r3451 r4014 87 87 void addItems(JComboBox combo, String[] itemList) { 88 88 89 combo.setModel(new DefaultComboBoxModel(itemList)); 90 91 /* 89 92 try { 90 combo.removeAllItems();93 //combo.removeAllItems(); 91 94 } catch (IndexOutOfBoundsException ex) {} // does this if empty 92 95 93 if (itemList.length > 0) { 94 for (int i = 0; i < itemList.length; i++) { 95 combo.addItem(itemList[i]); 96 } 97 } 96 if (itemList.length > 0) { 97 for (int i = 0; i < itemList.length; i++) { 98 combo.addItem(itemList[i]); 99 } 100 } 101 */ 98 102 } 99 103 … … 115 119 /** Set the units combo box value. If the string is not in the box is will be added. */ 116 120 public void setUnits(String units) { 117 unitsBox.setSelectedItem(units); 121 int idx = TimeUnits.getUnitIndex(units); 122 if (idx >= 0) unitsBox.setSelectedIndex(idx); 118 123 } 119 124
Note: See TracChangeset
for help on using the changeset viewer.
