static class FontChooser.CustomComboBoxModel extends AbstractListModel implements ComboBoxModel
Modifier and Type | Field and Description |
---|---|
private int |
fontCount
The total number of fonts.
|
private Font[] |
fonts
An array of the fonts themselves.
|
private Object |
selection
The currently selected item
|
private static long |
serialVersionUID
Serialization ID
|
listenerList
Modifier | Constructor and Description |
---|---|
protected |
FontChooser.CustomComboBoxModel()
Create a custom data model for a JComboBox
|
Modifier and Type | Method and Description |
---|---|
Object |
getElementAt(int index) |
Object |
getSelectedItem() |
int |
getSize() |
void |
setSelectedItem(Object selection) |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListDataListener, removeListDataListener
private int fontCount
private Font[] fonts
private Object selection
private static final long serialVersionUID
protected FontChooser.CustomComboBoxModel()
public void setSelectedItem(Object selection)
setSelectedItem
in interface ComboBoxModel
public Object getSelectedItem()
getSelectedItem
in interface ComboBoxModel
public Object getElementAt(int index)
getElementAt
in interface ListModel