|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.models.TransformingListModel
public class TransformingListModel
TransformingListModel is a model that is used for instances of javax.swing.JList that can use transforms derived from com.sas.util.transforms.TransformInterface.
The TransformingListModel creates a new default model which is set to be a javax.swing.DefaultListModel to be used as the model for the list. No default transform is set so no transformation will take place on the items in the list unless a transform is provided.
Field Summary | |
---|---|
protected javax.swing.ListModel |
model
Model to be used for the list |
protected java.beans.PropertyChangeSupport |
propertyChangeSupport
|
protected com.sas.util.transforms.TransformInterface |
transform
Transform to be used on the model |
Constructor Summary | |
---|---|
TransformingListModel()
Default constructor that sets a new default model |
|
TransformingListModel(javax.swing.ListModel model)
Constructor that sets the model of the list |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
contentsChanged(javax.swing.event.ListDataEvent event)
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods. |
protected void |
firePropertyChange(java.beans.PropertyChangeEvent evt)
|
protected void |
firePropertyChange(java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
java.lang.Object |
getElementAt(int index)
Returns the value at the specified index |
javax.swing.ListModel |
getModel()
Return current model |
int |
getSize()
Returns the length of the list |
com.sas.util.transforms.TransformInterface |
getTransform()
Return current transform, which can be null |
void |
intervalAdded(javax.swing.event.ListDataEvent event)
Sent after the indices in the index0,index1 interval have been inserted in the data model. |
void |
intervalRemoved(javax.swing.event.ListDataEvent event)
Sent after the indices in the index0,index1 interval have been removed from the data model. |
protected javax.swing.ListModel |
newDefaultModel()
Create a default model for the list |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
setModel(javax.swing.ListModel newModel)
Set model of the list to given model |
void |
setTransform(com.sas.util.transforms.TransformInterface newTransform)
Set transform to given transform, which can be null |
Field Detail |
---|
protected java.beans.PropertyChangeSupport propertyChangeSupport
protected javax.swing.ListModel model
protected com.sas.util.transforms.TransformInterface transform
Constructor Detail |
---|
public TransformingListModel()
public TransformingListModel(javax.swing.ListModel model)
model
- model to be setMethod Detail |
---|
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
protected void firePropertyChange(java.beans.PropertyChangeEvent evt)
protected void firePropertyChange(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)
protected javax.swing.ListModel newDefaultModel()
public javax.swing.ListModel getModel()
public void setModel(javax.swing.ListModel newModel)
newModel
- model to be setpublic com.sas.util.transforms.TransformInterface getTransform()
public void setTransform(com.sas.util.transforms.TransformInterface newTransform)
newTransform
- transform to be setpublic java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
public int getSize()
getSize
in interface javax.swing.ListModel
public void intervalAdded(javax.swing.event.ListDataEvent event)
intervalAdded
in interface javax.swing.event.ListDataListener
event
- a ListDataEvent encapuslating the event informationpublic void intervalRemoved(javax.swing.event.ListDataEvent event)
intervalRemoved
in interface javax.swing.event.ListDataListener
event
- a ListDataEvent encapuslating the event informationpublic void contentsChanged(javax.swing.event.ListDataEvent event)
contentsChanged
in interface javax.swing.event.ListDataListener
event
- a ListDataEvent encapuslating the event information
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |