Synergy Home Page

au.edu.swin.synergy.plugin.rtp
Class BPermissionModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--au.edu.swin.synergy.plugin.rtp.BPermissionModel

public class BPermissionModel
extends AbstractTableModel

Provides the data model for the permissions table

Author:
Shane Fitzgibbon
Copyright Belongs To:
Synergy Software 1999
See Also:
Serialized Form

Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
BPermissionModel()
           
 
Method Summary
 void add(String name, boolean read, boolean write, int member, int realm)
          adds a row to the table
 void clear()
          clears the table model
 Class getColumnClass(int col)
          Gets the class of the column
 int getColumnCount()
          gets the number of columns in the table model
 String getColumnName(int col)
          Gets the name of the column for a certain column index
 Vector getDescriptors()
           
 int getRowCount()
          Gets the number of rows that current contain data
 Object getValueAt(int row, int col)
          Gets the value of a cell in the table
 boolean isCellEditable(int row, int col)
          destermines if a cell in the table model is editable
 void setEnabled(boolean flag)
           
 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, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BPermissionModel

public BPermissionModel()
Method Detail

getColumnCount

public int getColumnCount()
gets the number of columns in the table model
Returns:
the number of columns
Overrides:
getColumnCount in class AbstractTableModel

getRowCount

public int getRowCount()
Gets the number of rows that current contain data
Overrides:
getRowCount in class AbstractTableModel

getColumnName

public String getColumnName(int col)
Gets the name of the column for a certain column index
Parameters:
col - the index of the column
Returns:
the name of the column
Overrides:
getColumnName in class AbstractTableModel

getValueAt

public Object getValueAt(int row,
                         int col)
Gets the value of a cell in the table
Parameters:
row - the row of the cell
col - the column of the cell
Returns:
the value of the cell
Overrides:
getValueAt in class AbstractTableModel

getColumnClass

public Class getColumnClass(int col)
Gets the class of the column
Parameters:
col - the index of the column
Returns:
the class of the column
Overrides:
getColumnClass in class AbstractTableModel

add

public void add(String name,
                boolean read,
                boolean write,
                int member,
                int realm)
adds a row to the table
Parameters:
name - the name of the member
read - statu of this members read access
write - status of the members write access
member - the member id
realm - the realm of the member

clear

public void clear()
clears the table model

getDescriptors

public Vector getDescriptors()

isCellEditable

public boolean isCellEditable(int row,
                              int col)
destermines if a cell in the table model is editable
Parameters:
row - the row of the cell
col - the column of the cell
Overrides:
isCellEditable in class AbstractTableModel

setEnabled

public void setEnabled(boolean flag)

setValueAt

public void setValueAt(Object value,
                       int row,
                       int col)
Overrides:
setValueAt in class AbstractTableModel

Synergy Home Page