|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
javax.swing.DefaultComboBoxModel
de.tkuhn.swing.combobox.CascadingComboBoxModel
public class CascadingComboBoxModel
The CascadingComboBoxModel
is a means to provide a row of combo
boxes where the items selectable in one combobox depend on the selected item
in the previous combo box.
Field Summary |
---|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
CascadingComboBoxModel()
Creates a new CascadingComboBoxModel. |
|
CascadingComboBoxModel(javax.swing.ComboBoxModel superModel)
Creates a new CascadingComboBoxModel with the given super model |
|
CascadingComboBoxModel(java.lang.Object superSelected)
Creates a new CascadingComboBoxModel with contents based on the given object a it was selected in the super model. |
|
CascadingComboBoxModel(java.lang.Object[] items)
Constructs a CascadingComboBoxModel object initialized with an array of objects. |
|
CascadingComboBoxModel(java.lang.Object[] items,
javax.swing.ComboBoxModel superModel)
Constructs a CascadingComboBoxModel object initialized with an array of objects and the given super model. |
|
CascadingComboBoxModel(java.util.Vector<?> v)
Constructs a CascadingComboBoxModel object initialized with a vector. |
|
CascadingComboBoxModel(java.util.Vector<?> v,
javax.swing.ComboBoxModel superModel)
Constructs a CascadingComboBoxModel object initialized with a vector and the given super model. |
Method Summary | |
---|---|
void |
computeNewContents(java.lang.Object superSelected)
Compute the new Contents based on the new object selected in the super model. |
javax.swing.ComboBoxModel |
getSuperModel()
Getter for property superModel. |
java.lang.Object |
getSuperSelected()
Getter for property superSelected. |
void |
setSuperModel(javax.swing.ComboBoxModel superModel)
Setter for property superModel. |
protected void |
setSuperSelected(java.lang.Object selected)
Sets the new selected element of the super model only if it changed. |
Methods inherited from class javax.swing.DefaultComboBoxModel |
---|
addElement, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem |
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 |
Constructor Detail |
---|
public CascadingComboBoxModel()
public CascadingComboBoxModel(javax.swing.ComboBoxModel superModel)
superModel
- the model this model depends onpublic CascadingComboBoxModel(java.lang.Object superSelected)
superSelected
- the virtually selected Objectpublic CascadingComboBoxModel(java.lang.Object[] items)
items
- the items put into the combo boxpublic CascadingComboBoxModel(java.util.Vector<?> v)
v
- a vector containing the items put into the combo boxpublic CascadingComboBoxModel(java.lang.Object[] items, javax.swing.ComboBoxModel superModel)
items
- the items put into the combo boxsuperModel
- the model this model depends onpublic CascadingComboBoxModel(java.util.Vector<?> v, javax.swing.ComboBoxModel superModel)
v
- a vector containing the items put into the combo boxsuperModel
- the model this model depends onMethod Detail |
---|
public javax.swing.ComboBoxModel getSuperModel()
public void setSuperModel(javax.swing.ComboBoxModel superModel)
superModel
- New value of property superModel.protected void setSuperSelected(java.lang.Object selected)
computeNewContents()
selected
- the newly selected objectpublic void computeNewContents(java.lang.Object superSelected)
superSelected
- the newly selected object of the super modelpublic java.lang.Object getSuperSelected()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |