Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.chatconfig.replacement
Class ReplacementConfigurationTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by net.java.sip.communicator.plugin.chatconfig.replacement.ReplacementConfigurationTableModel
All Implemented Interfaces:
Serializable, TableModel

public class ReplacementConfigurationTableModel
extends AbstractTableModel

Table model for the table in ReplacementConfigPanel listing all available replacement sources

Author:
Purvesh Sahoo
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ReplacementConfigurationTableModel(ArrayList<String> source)
          Creates an instance of ReplacementConfigurationTableModel by specifying the source list.
 
Method Summary
 Class<?> getColumnClass(int columnIndex)
           
 int getColumnCount()
          
 int getRowCount()
          
 Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void setValueAt(Object value, int rowIndex, int columnIndex)
          Set the value at rowIndex and columnIndex.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplacementConfigurationTableModel

public ReplacementConfigurationTableModel(ArrayList<String> source)
Creates an instance of ReplacementConfigurationTableModel by specifying the source list.

Parameters:
source - the source list to initialize the table model with
Method Detail

getColumnClass

public Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel
Parameters:
columnIndex -
Returns:
the Class of the column. Boolean for the first column.

getColumnCount

public int getColumnCount()


getRowCount

public int getRowCount()


getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Parameters:
rowIndex - the row index.
columnIndex - the column index
Returns:
the value specified rowIndex and columnIndex. boolean in case of the first column, String replacement source label in case of the second column; null otherwise

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel
Parameters:
rowIndex - the row index
columnIndex - the column index
Returns:
boolean; true for first column false otherwise

setValueAt

public void setValueAt(Object value,
                       int rowIndex,
                       int columnIndex)
Set the value at rowIndex and columnIndex. Sets the replacement source property enabled/disabled based on whether the first column is true or false.

Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel
Parameters:
value - The object to set at rowIndex and columnIndex
rowIndex -
columnIndex -

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.