java.lang.Object
javax.swing.AbstractListModel
com.sshtools.common.ui.ColorComboBox.ColorComboModel
- All Implemented Interfaces:
- javax.swing.ComboBoxModel, javax.swing.ListModel, java.io.Serializable
- Enclosing class:
- ColorComboBox
- static class ColorComboBox.ColorComboModel
- extends javax.swing.AbstractListModel
- implements javax.swing.ComboBoxModel
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
colors
private java.util.Vector colors
selected
private java.lang.Object selected
ColorComboBox.ColorComboModel
ColorComboBox.ColorComboModel()
getSize
public int getSize()
- Description copied from interface:
javax.swing.ListModel
- Return the number of data elements in the list.
- Specified by:
getSize in interface javax.swing.ListModel
getElementAt
public java.lang.Object getElementAt(int i)
- Description copied from interface:
javax.swing.ListModel
- Retrieves a data element at a specified index.
- Specified by:
getElementAt in interface javax.swing.ListModel
setSelectedItem
public void setSelectedItem(java.lang.Object sel)
- Description copied from interface:
javax.swing.ComboBoxModel
- Sets the selected item in the combo box. Classes implementing this
interface should fire a javax.swing.event.ListDataEvent to all registered
javax.swing.event.ListDataListeners to indicate that the selection has changed.
- Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
getSelectedItem
public java.lang.Object getSelectedItem()
- Description copied from interface:
javax.swing.ComboBoxModel
- Returns the currently selected item in the combo box.
- Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
addColor
public void addColor(java.awt.Color c)