net.sourceforge.fixagora.basis.client.model.editor
Class RolePermissionTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by net.sourceforge.fixagora.basis.client.model.editor.RolePermissionTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class RolePermissionTableModel
extends javax.swing.table.AbstractTableModel

The Class RolePermissionTableModel.

See Also:
Serialized Form

Constructor Summary
RolePermissionTableModel(AbstractBusinessObjectEditor abstractBusinessObjectEditor, java.util.List<FRole> roles)
          Instantiates a new role permission table model.
 
Method Summary
 void addAllExecute()
          Adds the all execute.
 void addAllRead()
          Adds the all read.
 void addAllWrite()
          Adds the all write.
 AbstractBusinessObjectEditor getAbstractBusinessObjectEditor()
          Gets the abstract business object editor.
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
 java.util.Set<FRole> getExecuteRoles()
          Gets the execute roles.
 java.util.Set<FRole> getReadRoles()
          Gets the read roles.
 java.util.List<FRole> getRoles()
          Gets the roles.
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 java.util.Set<FRole> getWriteRoles()
          Gets the write roles.
 boolean isAllExecuteSet()
          Checks if is all execute set.
 boolean isAllReadSet()
          Checks if is all read set.
 boolean isAllWriteSet()
          Checks if is all write set.
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 boolean isDirty()
          Checks if is dirty.
 void removeAllExecute()
          Removes the all execute.
 void removeAllRead()
          Removes the all read.
 void removeAllWrite()
          Removes the all write.
 void save()
          Save.
 void setMinWidth(int minWidth)
          Sets the min width.
 void setTable(javax.swing.JTable table)
          Sets the table.
 void setTableWidth()
          Sets the table width.
 void updateRoles(java.util.List<FRole> fRoles)
          Update roles.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RolePermissionTableModel

public RolePermissionTableModel(AbstractBusinessObjectEditor abstractBusinessObjectEditor,
                                java.util.List<FRole> roles)
Instantiates a new role permission table model.

Parameters:
abstractBusinessObjectEditor - the abstract business object editor
roles - the roles
Method Detail

getColumnCount

public int getColumnCount()

getColumnName

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

getRowCount

public int getRowCount()

getValueAt

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

setMinWidth

public void setMinWidth(int minWidth)
Sets the min width.

Parameters:
minWidth - the new min width

setTableWidth

public void setTableWidth()
Sets the table width.


setTable

public void setTable(javax.swing.JTable table)
Sets the table.

Parameters:
table - the new table

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getAbstractBusinessObjectEditor

public AbstractBusinessObjectEditor getAbstractBusinessObjectEditor()
Gets the abstract business object editor.

Returns:
the abstract business object editor

getRoles

public java.util.List<FRole> getRoles()
Gets the roles.

Returns:
the roles

isDirty

public boolean isDirty()
Checks if is dirty.

Returns:
true, if is dirty

getReadRoles

public java.util.Set<FRole> getReadRoles()
Gets the read roles.

Returns:
the read roles

getWriteRoles

public java.util.Set<FRole> getWriteRoles()
Gets the write roles.

Returns:
the write roles

getExecuteRoles

public java.util.Set<FRole> getExecuteRoles()
Gets the execute roles.

Returns:
the execute roles

save

public void save()
Save.


isAllReadSet

public boolean isAllReadSet()
Checks if is all read set.

Returns:
true, if is all read set

isAllWriteSet

public boolean isAllWriteSet()
Checks if is all write set.

Returns:
true, if is all write set

isAllExecuteSet

public boolean isAllExecuteSet()
Checks if is all execute set.

Returns:
true, if is all execute set

addAllRead

public void addAllRead()
Adds the all read.


addAllWrite

public void addAllWrite()
Adds the all write.


addAllExecute

public void addAllExecute()
Adds the all execute.


removeAllRead

public void removeAllRead()
Removes the all read.


removeAllWrite

public void removeAllWrite()
Removes the all write.


removeAllExecute

public void removeAllExecute()
Removes the all execute.


updateRoles

public void updateRoles(java.util.List<FRole> fRoles)
Update roles.

Parameters:
fRoles - the f roles