com.sas.swing.models
Class ListModelPropertyChangeAdapter
com.sas.swing.models.ListModelPropertyChangeAdapter
All Implemented Interfaces: com.sas.beans.PropertyChangeSource, java.beans.PropertyChangeListener , java.io.Serializable , java.util.EventListener , javax.swing.ComboBoxModel , javax.swing.ListModel
public class ListModelPropertyChangeAdapter implements java.beans.PropertyChangeListener , javax.swing.ComboBoxModel , com.sas.beans.PropertyChangeSource
Implements the javax.swing.ListModel and gets the list contents using the
specified source and property. The property can be an array, a java.util.List implementation,
or an implementation of com.sas.util.Enumerable. If the source property is not any of these,
the list will have a size of 0 and return no elements. If the source property fires a
PropertyChangeEvent, the contents of the ListModel will be updated to reflect the current
contents of the source property.
See Also: Serialized Form
selectedObject
protected java.lang.Object selectedObject
source
protected java.lang.Object source
property
protected java.lang.String property
sourceList
protected java.util.List sourceList
propertyChangeSupport
protected java.beans.PropertyChangeSupport propertyChangeSupport
emptyList
protected static java.util.List emptyList
ListModelPropertyChangeAdapter
public ListModelPropertyChangeAdapter ()
ListModelPropertyChangeAdapter
public ListModelPropertyChangeAdapter (java.lang.Object sourceObject,
java.lang.String propertyName)
getExtendedBeanInfo
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo ()
addPropertyChangeListener
public void addPropertyChangeListener (java.beans.PropertyChangeListener listener)
Specified by: addPropertyChangeListener
in interface com.sas.beans.PropertyChangeSource
removePropertyChangeListener
public void removePropertyChangeListener (java.beans.PropertyChangeListener listener)
Specified by: removePropertyChangeListener
in interface com.sas.beans.PropertyChangeSource
firePropertyChange
protected void firePropertyChange (java.beans.PropertyChangeEvent evt)
firePropertyChange
protected void firePropertyChange (java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
getSource
public java.lang.Object getSource ()
setSource
public void setSource (java.lang.Object sourceObject)
getPropertyName
public java.lang.String getPropertyName ()
setPropertyName
public void setPropertyName (java.lang.String propertyName)
setPropertySource
public void setPropertySource (java.lang.Object sourceObject,
java.lang.String propertyName)
propertyChange
public void propertyChange (java.beans.PropertyChangeEvent evt)
Specified by: propertyChange
in interface java.beans.PropertyChangeListener
updateSourceList
protected void updateSourceList ()
getSize
public int getSize ()
Specified by: getSize
in interface javax.swing.ListModel
getElementAt
public java.lang.Object getElementAt (int i)
Specified by: getElementAt
in interface javax.swing.ListModel
getSelectedItem
public java.lang.Object getSelectedItem ()
Specified by: getSelectedItem
in interface javax.swing.ComboBoxModel
setSelectedItem
public void setSelectedItem (java.lang.Object item)
Specified by: setSelectedItem
in interface javax.swing.ComboBoxModel
Copyright © 2009 SAS Institute Inc. All Rights Reserved.