JComponentPack 1.3.0

com.zfqjava.swing
Class LargeDataGridModel

java.lang.Object
  extended by com.zfqjava.swing.AbstractDataGridModel
      extended by com.zfqjava.swing.LargeDataGridModel
All Implemented Interfaces:
CellSpanModel, DataGridModel, Serializable, TableModel

public class LargeDataGridModel
extends AbstractDataGridModel
implements Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.zfqjava.swing.AbstractDataGridModel
listenerList
 
Constructor Summary
LargeDataGridModel()
           
LargeDataGridModel(int rowCount, int columnCount)
           
 
Method Summary
 AttributeSet getCellAttributes(int row, int column)
          Returns the cell attributes.
 Class getCellClass(int row, int column)
          Returns the cell class.
 Boolean getCellEditable(int row, int column)
          Returns the editable property for the specified cell at rowIndex and columnIndex.
 Class getColumnClass(int column)
          Returns Object.class regardless of columnIndex.
 int getColumnCount()
           
 String getColumnName(int column)
          Returns a default name for the column using spreadsheet conventions: A, B, C, ...
 int getRowCount()
           
 Object getValueAt(int row, int column)
           
 boolean isCellEditable(int row, int column)
           
 void setCellAttributes(AttributeSet attributes, int row, int column)
          Sets the cell attributes.
 void setCellClass(Class c, int row, int column)
          Sets the cell class.
 void setCellEditable(boolean editable, int row, int column)
          Sets the editable value for the specified cell at rowIndex and columnIndex.
 void setColumnClass(Class c, int column)
          Sets the column class for the specified columnIndex.
 void setColumnCount(int columnCount)
          Sets the number of columns in the model.
 void setColumnName(String name, int column)
          Sets the column name for the specified columnIndex.
 void setRowCount(int rowCount)
          Sets the number of rows in the model.
 void setValueAt(Object aValue, int row, int column)
           
 
Methods inherited from class com.zfqjava.swing.AbstractDataGridModel
addCellSpanListener, addDataGridModelListener, addTableModelListener, addUndoableEditListener, calculateFormula, clear, endUndoableEdit, fill, fillCellAttributes, fireCellAttributesChanged, fireCellAttributesChanged, fireCellChanged, fireCellChanged, fireCellChanged, fireCellClassChanged, fireCellClassChanged, fireCellEditableChanged, fireCellEditableChanged, fireCellMerged, fireCellSpanChanged, fireCellSpanChanged, fireCellSplitted, fireCellValueChanged, fireCellValueChanged, fireTableCellUpdated, fireTableChanged, fireTableColumnsDeleted, fireTableColumnsInserted, fireTableColumnsUpdated, fireTableColumnUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableRowUpdated, fireTableStructureChanged, fireUndoableEditHappened, getAutoCalculateFormula, getAutoSetsCellClass, getAutoSetsCellValue, getCellSpanListeners, getCellSpans, getCellSpans, getColumnAttributes, getColumnEditable, getColumnHeaderAttributes, getDataGridModelListeners, getFormulaCells, getFormulaContext, getListeners, getRowAttributes, getRowEditable, getRowHeaderAttributes, getSpannedCells, getStringEscapeChar, getTableModelListeners, getUndoableEditListeners, hasCellSpans, hasCellSpans, isColumnEditable, isRowEditable, isSpannedCell, merge, removeCellSpanListener, removeDataGridModelListener, removeTableModelListener, removeUndoableEditListener, setAutoCalculateFormula, setAutoSetsCellClass, setAutoSetsCellValue, setCellAttributes, setCellClass, setColumnAttributes, setColumnEditable, setColumnHeaderAttributes, setRowAttributes, setRowEditable, setRowHeaderAttributes, setStringEscapeChar, split, startUndoableEdit, toModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LargeDataGridModel

public LargeDataGridModel()

LargeDataGridModel

public LargeDataGridModel(int rowCount,
                          int columnCount)
Method Detail

setRowCount

public void setRowCount(int rowCount)
Description copied from interface: DataGridModel
Sets the number of rows in the model.

Specified by:
setRowCount in interface DataGridModel
Parameters:
rowCount - the number of rows in the model
See Also:
TableModel.getRowCount(), DataGridModel.setColumnCount(int), TableModel.getColumnCount()

setColumnCount

public void setColumnCount(int columnCount)
Description copied from interface: DataGridModel
Sets the number of columns in the model.

Specified by:
setColumnCount in interface DataGridModel
Parameters:
columnCount - the number of columns in the model
See Also:
TableModel.getRowCount(), DataGridModel.setRowCount(int), TableModel.getColumnCount()

getColumnName

public String getColumnName(int column)
Description copied from class: AbstractDataGridModel
Returns a default name for the column using spreadsheet conventions: A, B, C, ... Z, AA, AB, etc. If column cannot be found, returns an empty string.

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractDataGridModel
Parameters:
column - the column being queried
Returns:
a string containing the default name of column

setColumnName

public void setColumnName(String name,
                          int column)
Description copied from interface: DataGridModel
Sets the column name for the specified columnIndex.

Specified by:
setColumnName in interface DataGridModel
Parameters:
name - the column name
column - the specified columnIndex
See Also:
TableModel.getColumnName(int)

getColumnClass

public Class getColumnClass(int column)
Description copied from class: AbstractDataGridModel
Returns Object.class regardless of columnIndex.

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractDataGridModel
Parameters:
column - the column being queried
Returns:
the Object.class

setColumnClass

public void setColumnClass(Class c,
                           int column)
Description copied from interface: DataGridModel
Sets the column class for the specified columnIndex.

Specified by:
setColumnClass in interface DataGridModel
Parameters:
c - the column class
column - the specified columnIndex
See Also:
TableModel.getColumnClass(int)

setCellEditable

public void setCellEditable(boolean editable,
                            int row,
                            int column)
Description copied from interface: DataGridModel
Sets the editable value for the specified cell at rowIndex and columnIndex.

Specified by:
setCellEditable in interface DataGridModel
Parameters:
editable - the cell editable value
row - the row whose value to be queried
column - the column whose value to be queried
See Also:
TableModel.setValueAt(java.lang.Object, int, int), TableModel.isCellEditable(int,int)

getCellAttributes

public AttributeSet getCellAttributes(int row,
                                      int column)
Description copied from interface: DataGridModel
Returns the cell attributes.

Specified by:
getCellAttributes in interface DataGridModel
Parameters:
row - the index of the row
column - the index of the column
Returns:
the attributes for the specified cell
See Also:
DataGridModel.setCellAttributes(javax.swing.text.AttributeSet, int, int)

setCellAttributes

public void setCellAttributes(AttributeSet attributes,
                              int row,
                              int column)
Description copied from interface: DataGridModel
Sets the cell attributes.

Specified by:
setCellAttributes in interface DataGridModel
Parameters:
attributes - the cell attributes
row - the index of the row
column - the index of the column
See Also:
DataGridModel.getCellAttributes(int, int)

getCellClass

public Class getCellClass(int row,
                          int column)
Description copied from interface: DataGridModel
Returns the cell class.

Specified by:
getCellClass in interface DataGridModel
Parameters:
row - the index of the row
column - the index of the column
Returns:
the class for the specified cell
See Also:
DataGridModel.setCellClass(java.lang.Class, int, int)

setCellClass

public void setCellClass(Class c,
                         int row,
                         int column)
Description copied from interface: DataGridModel
Sets the cell class.

Specified by:
setCellClass in interface DataGridModel
Parameters:
c - the class for the specified cell
row - the index of the row
column - the index of the column
See Also:
DataGridModel.getCellClass(int, int)

getRowCount

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

getColumnCount

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

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface TableModel

getCellEditable

public Boolean getCellEditable(int row,
                               int column)
Description copied from class: AbstractDataGridModel
Returns the editable property for the specified cell at rowIndex and columnIndex.

Overrides:
getCellEditable in class AbstractDataGridModel
Parameters:
row - the row whose value to be queried
column - the column whose value to be queried
Returns:
the editable property for the specified cell
See Also:
TableModel.setValueAt(java.lang.Object, int, int), DataGridModel.setCellEditable(boolean,int,int)

getValueAt

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

setValueAt

public void setValueAt(Object aValue,
                       int row,
                       int column)
Specified by:
setValueAt in interface TableModel

JComponentPack 1.3.0

Send your Feedback
JComponentPack 1.3.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.