siuying.gm.app.gmailer4j.model
Class ThreadsTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by siuying.gm.app.gmailer4j.model.ThreadsTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Direct Known Subclasses:
TreeThreadsTableModel

public class ThreadsTableModel
extends javax.swing.table.AbstractTableModel

ThreadsTableModel

Version:
v0.1.2
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ThreadsTableModel()
           
 
Method Summary
 void clear()
           
 java.util.ArrayList getBox(java.lang.String box)
           
 java.lang.Class getColumnClass(int index)
           
 int getColumnCount()
          getColumnCount
 java.lang.String getColumnName(int idx)
           
 java.lang.String getMailboxName()
           
 java.util.ArrayList getMessageThreads()
           
 int getRowCount()
          getRowCount
 GMThread getThread(int idx)
          get a Thread from current selected message threads (of a mailbox)
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          getValueAt
 void setCurrentBox(java.lang.String box)
           
 void setMessageThreads(java.lang.String box, java.util.ArrayList messageThreads)
           
 java.lang.String toString()
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadsTableModel

public ThreadsTableModel()
Method Detail

getColumnCount

public int getColumnCount()
getColumnCount

Returns:
int

getRowCount

public int getRowCount()
getRowCount

Returns:
int

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
getValueAt

Parameters:
rowIndex - int
columnIndex - int
Returns:
Object

getColumnClass

public java.lang.Class getColumnClass(int index)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

getMessageThreads

public java.util.ArrayList getMessageThreads()

getColumnName

public java.lang.String getColumnName(int idx)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

setCurrentBox

public void setCurrentBox(java.lang.String box)

getMailboxName

public java.lang.String getMailboxName()

setMessageThreads

public void setMessageThreads(java.lang.String box,
                              java.util.ArrayList messageThreads)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clear

public void clear()

getBox

public java.util.ArrayList getBox(java.lang.String box)

getThread

public GMThread getThread(int idx)
get a Thread from current selected message threads (of a mailbox)

Parameters:
idx - index of the thread
Returns:
GMThread Return select message thread; if the index is not valid (smaller than zero or larger than message thread size), or no message threads selected, return null