public class SocialCommitmentListModel extends AbstractFadingListModel implements Observer
SocialCommitmentListModel
is an implementation of AbstractFadingListModel that is used to fade out the list of commitments in a pretty way.Modifier and Type | Field and Description |
---|---|
(package private) Vector<SocialCommitment> |
commitmentList |
(package private) SocialCommitmentsStore |
commitmentStore |
(package private) SocialCommitmentComparator |
comparator |
(package private) SocialCommitmentFilter |
filter |
private long |
purgeDueTime |
private static long |
purgeInterval |
private static long |
serialVersionUID |
FADE_TIME
listenerList
Constructor and Description |
---|
SocialCommitmentListModel(SocialCommitmentsStore newCommitmentStore)
Creates a new
SocialCommitmentList object. |
Modifier and Type | Method and Description |
---|---|
void |
addMember(Object socialCommitment)
commitmentAdded does...
|
void |
addMember(SocialCommitment socialCommitment) |
Object |
getElementAt(int index) |
int |
getSize() |
private void |
purge() |
void |
refreshList() |
void |
removeMember(Object socialCommitment)
commitmentRemoved does...
|
void |
removeMember(SocialCommitment socialCommitment) |
void |
setComparator(SocialCommitmentComparator commitmentComparator)
This changes the comparator used to sort the list.
|
void |
update(Observable o,
Object arg) |
private void |
updateList()
Updates the commiment list used by the list model based on the social
commitment store and the current comparator.
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
private static final long serialVersionUID
SocialCommitmentsStore commitmentStore
Vector<SocialCommitment> commitmentList
SocialCommitmentComparator comparator
SocialCommitmentFilter filter
private static final long purgeInterval
private long purgeDueTime
public SocialCommitmentListModel(SocialCommitmentsStore newCommitmentStore)
SocialCommitmentList
object.
TODO Fill in specific information for constructor.private void updateList()
public void setComparator(SocialCommitmentComparator commitmentComparator)
comparator
- The comparator to set.public Object getElementAt(int index)
getElementAt
in interface ListModel
public void removeMember(SocialCommitment socialCommitment)
public void removeMember(Object socialCommitment)
removeMember
in class AbstractFadingListModel
socialCommitment
- public void addMember(SocialCommitment socialCommitment)
public void update(Observable o, Object arg)
private void purge()
public void addMember(Object socialCommitment)
addMember
in class AbstractFadingListModel
socialCommitment
- public void refreshList()
refreshList
in class AbstractFadingListModel