com.oxfordmathcenter.breadboards
Class BreadboardComboBoxModel

java.lang.Object
  extended by com.oxfordmathcenter.breadboards.BreadboardComboBoxModel
All Implemented Interfaces:
javax.swing.ComboBoxModel, javax.swing.ListModel, javax.swing.MutableComboBoxModel

public class BreadboardComboBoxModel
extends java.lang.Object
implements javax.swing.MutableComboBoxModel

This class allows one to easily update the items in the combo box on a ComboBoxWithButtonsBreadboard object on the fly, after init() has executed.

Author:
oser

Constructor Summary
BreadboardComboBoxModel(java.lang.String[] strings)
           
 
Method Summary
 void addElement(java.lang.Object string)
           
 void addListDataListener(javax.swing.event.ListDataListener arg0)
           
 java.lang.Object getElementAt(int index)
           
 java.lang.Object getSelectedItem()
           
 int getSize()
           
 void insertElementAt(java.lang.Object string, int index)
           
 void removeElement(java.lang.Object string)
           
 void removeElementAt(int index)
           
 void removeListDataListener(javax.swing.event.ListDataListener arg0)
           
 void setSelectedItem(java.lang.Object string)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreadboardComboBoxModel

public BreadboardComboBoxModel(java.lang.String[] strings)
Method Detail

getSelectedItem

public java.lang.Object getSelectedItem()
Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel

setSelectedItem

public void setSelectedItem(java.lang.Object string)
Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel

addListDataListener

public void addListDataListener(javax.swing.event.ListDataListener arg0)
Specified by:
addListDataListener in interface javax.swing.ListModel

getElementAt

public java.lang.Object getElementAt(int index)
Specified by:
getElementAt in interface javax.swing.ListModel

getSize

public int getSize()
Specified by:
getSize in interface javax.swing.ListModel

removeListDataListener

public void removeListDataListener(javax.swing.event.ListDataListener arg0)
Specified by:
removeListDataListener in interface javax.swing.ListModel

addElement

public void addElement(java.lang.Object string)
Specified by:
addElement in interface javax.swing.MutableComboBoxModel

insertElementAt

public void insertElementAt(java.lang.Object string,
                            int index)
Specified by:
insertElementAt in interface javax.swing.MutableComboBoxModel

removeElement

public void removeElement(java.lang.Object string)
Specified by:
removeElement in interface javax.swing.MutableComboBoxModel

removeElementAt

public void removeElementAt(int index)
Specified by:
removeElementAt in interface javax.swing.MutableComboBoxModel