Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sshtools.common.ui
Class ColorComboBox.ColorComboModel  view ColorComboBox.ColorComboModel download ColorComboBox.ColorComboModel.java

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended bycom.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


Field Summary
private  java.util.Vector colors
           
private  java.lang.Object selected
           
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
(package private) ColorComboBox.ColorComboModel()
           
 
Method Summary
 void addColor(java.awt.Color c)
           
 java.lang.Object getElementAt(int i)
          Retrieves a data element at a specified index.
 java.lang.Object getSelectedItem()
          Returns the currently selected item in the combo box.
 int getSize()
          Return the number of data elements in the list.
 void setSelectedItem(java.lang.Object sel)
          Sets the selected item in the combo box.
 
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

colors

private java.util.Vector colors

selected

private java.lang.Object selected
Constructor Detail

ColorComboBox.ColorComboModel

ColorComboBox.ColorComboModel()
Method Detail

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)