CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.cubetwister.doc
Class CubeColorComboBoxModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by ch.randelshofer.cubetwister.doc.CubeColorComboBoxModel
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.swing.ComboBoxModel, javax.swing.ListModel

public class CubeColorComboBoxModel
extends javax.swing.AbstractListModel
implements javax.swing.ComboBoxModel, java.beans.PropertyChangeListener

CubeColorComboBoxModel is used to present a choice of colors in the "Stickers" and "Parts" page of the CubeView.

Version:
1.0 2001-08-03
Author:
werni
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
CubeColorComboBoxModel()
           
 
Method Summary
 java.lang.Object getElementAt(int index)
          Returns the value at the specified index.
 java.lang.Object getSelectedItem()
          Return the selected item
 int getSize()
          Returns the length of the list.
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void setModel(CubeModel m)
           
 void setSelectedItem(java.lang.Object anItem)
          Set the selected item
 
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

CubeColorComboBoxModel

public CubeColorComboBoxModel()
Method Detail

setModel

public void setModel(CubeModel m)

getSelectedItem

public java.lang.Object getSelectedItem()
Return the selected item

Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel

setSelectedItem

public void setSelectedItem(java.lang.Object anItem)
Set the selected item

Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel

getSize

public int getSize()
Returns the length of the list.

Specified by:
getSize in interface javax.swing.ListModel

getElementAt

public java.lang.Object getElementAt(int index)
Returns the value at the specified index.

Specified by:
getElementAt in interface javax.swing.ListModel

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

(c) Werner Randelshofer.
All rights reserved.