public class LocaleComboBoxModel extends javax.swing.AbstractListModel implements javax.swing.ComboBoxModel
Constructor and Description |
---|
LocaleComboBoxModel() |
LocaleComboBoxModel(java.util.Locale[] locales) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getElementAt(int pos) |
java.util.Locale |
getLocaleAt(int pos) |
java.lang.String |
getSelectedItem() |
java.util.Locale |
getSelectedLocale() |
int |
getSize() |
void |
setSelectedItem(java.lang.Object item)
Sets the selected item.
|
void |
setSelectedLocale(java.util.Locale locale) |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
public LocaleComboBoxModel()
public LocaleComboBoxModel(java.util.Locale[] locales)
public java.lang.String getElementAt(int pos)
getElementAt
in interface javax.swing.ListModel
public int getSize()
getSize
in interface javax.swing.ListModel
public java.lang.String getSelectedItem()
getSelectedItem
in interface javax.swing.ComboBoxModel
public void setSelectedItem(java.lang.Object item)
Locale
-object which equals one of the ojects
present in this model can be passed here.setSelectedItem
in interface javax.swing.ComboBoxModel
java.lang.IllegalArgumentException
- if the passed object does not equal one object in the
listComboBoxModel.setSelectedItem(java.lang.Object)
public java.util.Locale getLocaleAt(int pos)
public java.util.Locale getSelectedLocale()
public void setSelectedLocale(java.util.Locale locale)