grendel.view
Interface MessageSetView

All Known Subinterfaces:
FolderView

public abstract interface MessageSetView

Represents a view on messages. There is no implication that these messages all come from the same Folder, or even from the same kind of Folder.

The messages are presented in a particular sorted order, and have also possibly been threaded.


Field Summary
static int AUTHOR
           
static int DATE
           
static int DELETED
           
static int FLAGGED
           
static int NUMBER
           
static int READ
           
static int SIZE
           
static int SUBJECT
           
 
Method Summary
 void addObserver(MessageSetViewObserver obs)
           
 ViewedMessage getMessageRoot()
          Gets the root of the tree of messages that are being viewed.
 int[] getSortOrder()
           
 boolean isThreaded()
           
 void prependSortOrder(int order)
          Prepend a new sort order.
 void removeObserver(MessageSetViewObserver obs)
           
 void reThread()
          Cause the messages to get resorted and possibly threaded, according to previous calls to setSortOrder(), prependSortOrder(), and setIsThreaded().
 void setIsThreaded(boolean b)
          Set whether to do threading on these messages.
 void setSortOrder(int[] order)
          Set the sort order for display.
 

Field Detail

NUMBER

public static final int NUMBER

DATE

public static final int DATE

SUBJECT

public static final int SUBJECT

AUTHOR

public static final int AUTHOR

READ

public static final int READ

FLAGGED

public static final int FLAGGED

SIZE

public static final int SIZE

DELETED

public static final int DELETED
Method Detail

getMessageRoot

public ViewedMessage getMessageRoot()
Gets the root of the tree of messages that are being viewed.

setSortOrder

public void setSortOrder(int[] order)
Set the sort order for display. This is an array of the sort keys listed above. It is an array so that the caller can define secondary sorts. Duplicates will be removed and other optimizations possibly made, so getSortOrder() may not necessarily return the same thing. Note that the messages won't actually get resorted until reThread() is called.

prependSortOrder

public void prependSortOrder(int order)
Prepend a new sort order. This will become the new primary sort; whatever sort was being done becomes secondary sorts. Note that the messages won't actually get resorted until reThread() is called.

getSortOrder

public int[] getSortOrder()

setIsThreaded

public void setIsThreaded(boolean b)
Set whether to do threading on these messages. If false, then things just get sorted into one long list. Note that the messages won't actually get resorted or threaded until reThread() is called.

isThreaded

public boolean isThreaded()

reThread

public void reThread()
Cause the messages to get resorted and possibly threaded, according to previous calls to setSortOrder(), prependSortOrder(), and setIsThreaded().

addObserver

public void addObserver(MessageSetViewObserver obs)

removeObserver

public void removeObserver(MessageSetViewObserver obs)