org.xulux.guilayer.swing.models
Class NyxTableModel

java.lang.Object
  extended by org.xulux.gui.XuluxListener
      extended by org.xulux.guilayer.swing.models.NyxTableModel
All Implemented Interfaces:
javax.swing.table.TableModel, org.xulux.api.gui.IXuluxListener

public class NyxTableModel
extends org.xulux.gui.XuluxListener
implements javax.swing.table.TableModel

The nyx tablemodel contains all magic for tables.

Version:
$Id: NyxTableModel.java,v 1.1 2005/12/18 12:58:21 mvdb Exp $
Author:
Martin van den Bemt

Field Summary
protected  javax.swing.table.TableModel model
          the tablemodel
protected  Table table
          the table
 
Fields inherited from class org.xulux.gui.XuluxListener
processing, widget
 
Constructor Summary
NyxTableModel()
           
NyxTableModel(Table table)
           
NyxTableModel(javax.swing.table.TableModel model, Table table)
           
 
Method Summary
 void addTableModelListener(javax.swing.event.TableModelListener l)
           
 void destroy()
          Destroy the tablemodel..
 java.lang.Class getColumnClass(int columnIndex)
           
 int getColumnCount()
          Not used,we use a columnmodel.
 java.lang.String getColumnName(int columnIndex)
          Not used, we use a columnmodel for that...
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Returns the row object if the columnIndex is -1.
 boolean hasModel()
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void refresh()
          refreshes the table, since there is new content
 void removeTableModelListener(javax.swing.event.TableModelListener l)
           
 void setModel(javax.swing.table.TableModel model)
           
 void setTable(Table table)
          Set the table to be used in this tablemodel
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
          Sets the value of a bean..
 
Methods inherited from class org.xulux.gui.XuluxListener
accepted, completed, completed, completedPart, getWidget, isProcessing, processEvent, setWidget, started
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected Table table
the table


model

protected javax.swing.table.TableModel model
the tablemodel

Constructor Detail

NyxTableModel

public NyxTableModel()

NyxTableModel

public NyxTableModel(Table table)
Parameters:
table - the table

NyxTableModel

public NyxTableModel(javax.swing.table.TableModel model,
                     Table table)
Parameters:
model - the model
table - the table
Method Detail

setModel

public void setModel(javax.swing.table.TableModel model)
Parameters:
model - the model

hasModel

public boolean hasModel()
Returns:
if the model has a model already

setTable

public void setTable(Table table)
Set the table to be used in this tablemodel

Parameters:
table - the table

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel
See Also:
TableModel.getRowCount()

getColumnCount

public int getColumnCount()
Not used,we use a columnmodel.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
See Also:
TableModel.getColumnCount()

getColumnName

public java.lang.String getColumnName(int columnIndex)
Not used, we use a columnmodel for that...

Specified by:
getColumnName in interface javax.swing.table.TableModel
See Also:
TableModel.getColumnName(int)

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
See Also:
TableModel.getColumnClass(int)

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
See Also:
TableModel.isCellEditable(int, int)

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Returns the row object if the columnIndex is -1.

Specified by:
getValueAt in interface javax.swing.table.TableModel
See Also:
TableModel.getValueAt(int, int)

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
Sets the value of a bean..

Specified by:
setValueAt in interface javax.swing.table.TableModel
See Also:
TableModel.setValueAt(java.lang.Object, int, int)

addTableModelListener

public void addTableModelListener(javax.swing.event.TableModelListener l)
Specified by:
addTableModelListener in interface javax.swing.table.TableModel
See Also:
TableModel.addTableModelListener(javax.swing.event.TableModelListener)

removeTableModelListener

public void removeTableModelListener(javax.swing.event.TableModelListener l)
Specified by:
removeTableModelListener in interface javax.swing.table.TableModel
See Also:
TableModel.removeTableModelListener(javax.swing.event.TableModelListener)

destroy

public void destroy()
Destroy the tablemodel..


refresh

public void refresh()
refreshes the table, since there is new content



Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.