|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.models.CollectionToListModelAdapter
public class CollectionToListModelAdapter
The CollectionToListModelAdapter allows collections that extend from java.util.Collection
,
such as instances of java.util.List
and java.util.Set
, to be used as the
model for a javax.swing.JList
. The collection must be set as the model for the adapter,
which can then used as the model for the viewer.
Field Summary | |
---|---|
protected java.util.List |
delegate
Internal storage of data from collection |
protected java.util.Collection |
model
Model for the adapter |
protected javax.swing.event.SwingPropertyChangeSupport |
spcs
Used to support property changes in the webAF customizer |
Constructor Summary | |
---|---|
CollectionToListModelAdapter()
Default constructor |
|
CollectionToListModelAdapter(java.util.Collection c)
Overloaded constructor that intializes the adapter with the data given by the collection |
|
CollectionToListModelAdapter(int size)
Overloaded constructor that initializes the delegate to be of given size |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
protected void |
createDelegate()
Create the delegate object |
java.lang.Object |
getElementAt(int i)
Returns the value at the specified index. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
|
java.util.Collection |
getModel()
Returns the model of the adapter |
int |
getSize()
Returns the length of the list. |
void |
refresh()
Force a refresh on the adapter |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
setModel(java.util.Collection model)
Sets the model of the adapter to the given collection |
Field Detail |
---|
protected java.util.List delegate
protected java.util.Collection model
protected javax.swing.event.SwingPropertyChangeSupport spcs
Constructor Detail |
---|
public CollectionToListModelAdapter()
public CollectionToListModelAdapter(int size)
size
- Initial size of the delegate representing the collectionpublic CollectionToListModelAdapter(java.util.Collection c)
c
- Collection whose data will be used within the adapterMethod Detail |
---|
public int getSize()
getSize
in interface javax.swing.ListModel
public java.lang.Object getElementAt(int i)
getElementAt
in interface javax.swing.ListModel
public void setModel(java.util.Collection model)
model
- Collection whose data will be used within the adapterpublic java.util.Collection getModel()
protected void createDelegate()
public void refresh()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface com.sas.beans.PropertyChangeSource
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface com.sas.beans.PropertyChangeSource
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |