com.levigo.util.swing.table
Class EntryTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.levigo.util.swing.table.EntryTableModel
All Implemented Interfaces:
EditableRowHeaderTableModel, Serializable, TableModel

public class EntryTableModel
extends AbstractTableModel
implements EditableRowHeaderTableModel

The EntryTableModel provides a single-row model in order to allow the addition of a single row to an existing table which is defined by a master table model.

Author:
jh
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
EntryTableModel(AppendableTableModel masterTableModel)
          Construct an entry table model which uses the row scheme of the given master table model.
 
Method Summary
 boolean appendRow()
          Append the entered data by sending it to the master table model.
 void clear()
          Clear all entered data.
 int getColumnCount()
           
 String getColumnName(int i)
           
 int getRowCount()
           
 Object getValueAt(int row, int col)
           
 boolean isCellEditable(int arg0, int arg1)
           
 boolean isEdited()
          Gets whether at least one field has been edited.
 boolean isEntryRow(int row)
           
 boolean isRowLocked(int row)
           
 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, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryTableModel

public EntryTableModel(AppendableTableModel masterTableModel)
Construct an entry table model which uses the row scheme of the given master table model.

Method Detail

getColumnName

public String getColumnName(int i)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel

getValueAt

public Object getValueAt(int row,
                         int col)
Specified by:
getValueAt in interface TableModel

setValueAt

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

isCellEditable

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

clear

public void clear()
Clear all entered data.


appendRow

public boolean appendRow()
Append the entered data by sending it to the master table model.


isEdited

public boolean isEdited()
Gets whether at least one field has been edited.


isRowLocked

public boolean isRowLocked(int row)
Specified by:
isRowLocked in interface EditableRowHeaderTableModel

isEntryRow

public boolean isEntryRow(int row)
Specified by:
isEntryRow in interface EditableRowHeaderTableModel


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.