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, removeListDataListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListDataListener, removeListDataListenerprivate int fontCount
private Font[] fonts
private Object selection
private static final long serialVersionUID
protected FontChooser.CustomComboBoxModel()
public void setSelectedItem(Object selection)
setSelectedItem in interface ComboBoxModelpublic Object getSelectedItem()
getSelectedItem in interface ComboBoxModelpublic Object getElementAt(int index)
getElementAt in interface ListModel