org.ceryle.ui.xnode
Class XNodeRevisionManagerPanel.SubsetRevisionTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.ceryle.ui.xnode.XNodeRevisionManagerPanel.SubsetRevisionTableModel
All Implemented Interfaces:
Serializable, TableModel, RevisionTableModel
Enclosing class:
XNodeRevisionManagerPanel

protected class XNodeRevisionManagerPanel.SubsetRevisionTableModel
extends AbstractTableModel
implements RevisionTableModel

Provides a seven-column table model for tables of XNodes and XNodeRevisions. Columns for this table implementation are as follows:

numberreferencename
0COL_CHCK checkbox
1COL_REVN revision number
2COL_DATE date
3COL_CREA creator/author
4COL_FRMT format
5COL_DIFF diff button
6COL_SIZE size

Author:
MurrayAltheim
See Also:
Serialized Form

Field Summary
static int COL_CHCK
          Constant column reference.
static int COL_CREA
          Constant column reference.
static int COL_DATE
          Constant column reference.
static int COL_DIFF
          Constant column reference.
static int COL_FRMT
          Constant column reference.
static int COL_REVN
          Constant column reference.
static int COL_SIZE
          Constant column reference.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
XNodeRevisionManagerPanel.SubsetRevisionTableModel()
           
 
Method Summary
 void addRevision(XNodeRevision revision)
          Add XNodeRevision revision to the table.
 void clear()
           
 Class getColumnClass(int c)
           
 int getColumnCount()
           
 String getColumnName(int col)
           
 String getFormatOf(XNodeRevision xnr)
          Returns the MIME-style format string for the given revision.
 int getRepositorySize()
           
 XNodeRevision getRevision(int i)
           
 int getRowCount()
           
 List getSelectedRevisions()
          Return the list of selected XNodeRevisions.
 Object getValueAt(int row, int col)
           
 boolean isCellEditable(int row, int col)
           
 void setSelectAll(boolean selected)
           
 void setValueAt(Object value, int row, int col)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COL_CHCK

public static final int COL_CHCK
Constant column reference.

See Also:
Constant Field Values

COL_REVN

public static final int COL_REVN
Constant column reference.

See Also:
Constant Field Values

COL_DATE

public static final int COL_DATE
Constant column reference.

See Also:
Constant Field Values

COL_CREA

public static final int COL_CREA
Constant column reference.

See Also:
Constant Field Values

COL_FRMT

public static final int COL_FRMT
Constant column reference.

See Also:
Constant Field Values

COL_DIFF

public static final int COL_DIFF
Constant column reference.

See Also:
Constant Field Values

COL_SIZE

public static final int COL_SIZE
Constant column reference.

See Also:
Constant Field Values
Constructor Detail

XNodeRevisionManagerPanel.SubsetRevisionTableModel

public XNodeRevisionManagerPanel.SubsetRevisionTableModel()
Method Detail

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel
Specified by:
getColumnCount in interface RevisionTableModel

addRevision

public void addRevision(XNodeRevision revision)
Description copied from interface: RevisionTableModel
Add XNodeRevision revision to the table.

Specified by:
addRevision in interface RevisionTableModel

getRevision

public XNodeRevision getRevision(int i)
Specified by:
getRevision in interface RevisionTableModel

clear

public void clear()
Specified by:
clear in interface RevisionTableModel

getSelectedRevisions

public List getSelectedRevisions()
Description copied from interface: RevisionTableModel
Return the list of selected XNodeRevisions. If none are selected, returns an empty Set rather than null.

Specified by:
getSelectedRevisions in interface RevisionTableModel

getRepositorySize

public int getRepositorySize()
Specified by:
getRepositorySize in interface RevisionTableModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel
Specified by:
getRowCount in interface RevisionTableModel

getColumnName

public String getColumnName(int col)
Specified by:
getColumnName in interface TableModel
Specified by:
getColumnName in interface RevisionTableModel
Overrides:
getColumnName in class AbstractTableModel

getValueAt

public Object getValueAt(int row,
                         int col)
Specified by:
getValueAt in interface TableModel
Specified by:
getValueAt in interface RevisionTableModel

getFormatOf

public String getFormatOf(XNodeRevision xnr)
Description copied from interface: RevisionTableModel
Returns the MIME-style format string for the given revision.

Specified by:
getFormatOf in interface RevisionTableModel

getColumnClass

public Class getColumnClass(int c)
Specified by:
getColumnClass in interface TableModel
Specified by:
getColumnClass in interface RevisionTableModel
Overrides:
getColumnClass in class AbstractTableModel

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface TableModel
Specified by:
isCellEditable in interface RevisionTableModel
Overrides:
isCellEditable in class AbstractTableModel

setSelectAll

public void setSelectAll(boolean selected)
Specified by:
setSelectAll in interface RevisionTableModel

setValueAt

public void setValueAt(Object value,
                       int row,
                       int col)
Specified by:
setValueAt in interface TableModel
Specified by:
setValueAt in interface RevisionTableModel
Overrides:
setValueAt in class AbstractTableModel


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.