|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnan.model.NewsgroupList
A list container for Newsgroups that also support JList components.
Field Summary | |
static java.lang.String |
XML_TAG
XML tag for serialization. |
static java.lang.String |
XML_UPDATED
XML tag for the last updated property. |
Constructor Summary | |
NewsgroupList()
Creates a new NewsgroupList object. |
Method Summary | |
void |
add(Newsgroup newsgroup)
Adds a Newsgroup to this list. |
void |
append(NewsgroupList list)
Appends the Newsgroups from a NewsgroupList onto this NewsgroupList. |
boolean |
contains(Newsgroup newsgroup)
Asks if a Newsgroup is contained in this list. |
Newsgroup |
get(int index)
Gets a Newsgroup from this list. |
javax.swing.ListModel |
getListModel()
Gets the ListModel. |
int |
getSize()
Gets the number of Newsgroups in this NewsgroupList. |
java.util.Date |
getUpdated()
Gets the last update time. |
Newsgroup |
remove(int index)
Removes a Newsgroup from this list. |
void |
setUpdated()
Sets the current time as the last update time. |
protected void |
setUpdated(java.util.Date date)
Sets the last update time. |
void |
sort()
Sorts this list by Newsgroup.compareTo, which by default is an alpbetical sort. |
java.lang.String |
toString()
Returns a String representation of this NewsgroupList. |
org.dom4j.Document |
toXML()
Converts an object into an XML Document. |
void |
transpose(java.lang.Object object)
Transposes (copies over) the values of another object of the same type onto this one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String XML_TAG
public static final java.lang.String XML_UPDATED
Constructor Detail |
public NewsgroupList()
Method Detail |
public void append(NewsgroupList list)
list
- The NewsgroupList to append from.public int getSize()
public boolean contains(Newsgroup newsgroup)
newsgroup
- The Newsgroup to check.
public void add(Newsgroup newsgroup)
newsgroup
- The Newsgroup.public Newsgroup remove(int index) throws java.lang.IndexOutOfBoundsException
index
- The index to remove at.
java.lang.IndexOutOfBoundsException
- if the index is invalid.public Newsgroup get(int index) throws java.lang.IndexOutOfBoundsException
index
- The index of the Newsgroup to retrieve.
java.lang.IndexOutOfBoundsException
- if the index is invalid.public void sort()
public javax.swing.ListModel getListModel()
protected void setUpdated(java.util.Date date)
date
- The new Date.public void setUpdated()
public java.util.Date getUpdated()
public org.dom4j.Document toXML()
toXML
in interface XMLSerializable
public void transpose(java.lang.Object object)
transpose
in interface Transposer
object
- The object to transpose over this one.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |