|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractListModel javax.swing.DefaultComboBoxModel biz.chitec.quarterback.swing.TimeZoneComboBoxModel
Special model to allow selection of a TimeZone The timezones are shown in alphabetical order. It is possible to have a special entry "not selected", which is selected if an empty timezone is set (null or empty string). Timezones can be selected either by their id or by giving a complete TimeZone instance
Field Summary | |
private java.util.ResourceBundle |
rb
|
private boolean |
withunselected
|
Fields inherited from class javax.swing.DefaultComboBoxModel |
|
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Constructor Summary | |
TimeZoneComboBoxModel()
Initializes the model with the list of timezones without "not selected" entry |
|
TimeZoneComboBoxModel(boolean withunselectedx)
Initializes the model either with or without the "unselected" entry. |
Method Summary | |
java.util.TimeZone |
indexToTimeZone(int index)
Returns the TimeZone at the given index. |
java.lang.String |
indexToTimeZoneID(int index)
Returns the ID of the timezone at the given index. |
private void |
initEntries()
Initializes the list of timezones. |
int |
timeZoneIDToIndex(java.lang.String id)
Returns the index of the timezone with the given ID. |
int |
timeZoneToIndex(java.util.TimeZone tz)
Returns the index in the model of the given timezone. |
Methods inherited from class javax.swing.DefaultComboBoxModel |
addElement, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.ListModel |
addListDataListener, removeListDataListener |
Field Detail |
private java.util.ResourceBundle rb
private boolean withunselected
Constructor Detail |
public TimeZoneComboBoxModel(boolean withunselectedx)
withunselectedx
- Flag whether the list should contain an "unselected" entry.public TimeZoneComboBoxModel()
Method Detail |
private void initEntries()
public int timeZoneToIndex(java.util.TimeZone tz)
tz
- Timezone to find, null to find "unselected"
public int timeZoneIDToIndex(java.lang.String id)
id
- ID of the timezone to find.
public java.util.TimeZone indexToTimeZone(int index)
index
- Index to give TimeZone to.
public java.lang.String indexToTimeZoneID(int index)
index
- Index to give timezone ID to.
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |