Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia
Class ZrtpConfigureTableModel<T extends Enum<T>>

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by net.java.sip.communicator.impl.neomedia.ZrtpConfigureTableModel<T>
All Implemented Interfaces:
Serializable, TableModel

public class ZrtpConfigureTableModel<T extends Enum<T>>
extends AbstractTableModel

Author:
Werner Dittmann
See Also:
Serialized Form

Field Summary
(package private)  boolean[] onOff
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ZrtpConfigureTableModel(T algo, gnu.java.zrtp.ZrtpConfigure act, gnu.java.zrtp.ZrtpConfigure inAct, String savedConf)
           
 
Method Summary
 boolean checkEnableDown(int row)
           
 boolean checkEnableUp(int row)
           
 Class<?> getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 int getRowCount()
           
 Object getValueAt(int row, int col)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 int move(int row, boolean up, boolean upSave)
          Move a Configuration entry up or down one position.
 void saveConfig()
          Saves the ZrtpConfigure data for this algorithm to configure file
 void setStandardConfig()
          Sets the ZrtpConfigure data for this algorithm to a predefined set.
 void setValueAt(Object value, int row, int column)
           
 
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
 

Field Detail

onOff

boolean[] onOff
Constructor Detail

ZrtpConfigureTableModel

public ZrtpConfigureTableModel(T algo,
                               gnu.java.zrtp.ZrtpConfigure act,
                               gnu.java.zrtp.ZrtpConfigure inAct,
                               String savedConf)
Method Detail

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public Object getValueAt(int row,
                         int col)

isCellEditable

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

getColumnClass

public Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

setValueAt

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

move

public int move(int row,
                boolean up,
                boolean upSave)
Move a Configuration entry up or down one position. The "move up" is Converted to a "move down" with modified row index and flags.

Parameters:
row - Which row to move
up - If true move up, else move down
upSave - Because the functions converts a move up into a move down this flag shows what the caller intented. Needed to adjust an index return value.
Returns:
new row index of entry

checkEnableUp

public boolean checkEnableUp(int row)

checkEnableDown

public boolean checkEnableDown(int row)

saveConfig

public void saveConfig()
Saves the ZrtpConfigure data for this algorithm to configure file


setStandardConfig

public void setStandardConfig()
Sets the ZrtpConfigure data for this algorithm to a predefined set. The caller prepared active ZrtpConfigureto contain a standard set of algorithms. Get the names and construct a string, then call initialize to setup the inActive ZrtpConfigure data.


Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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