Home about services products contact login
   com.smardec.asc

Advanced Swing Components

  animatepanel
  autocomplete
  dropdown
  filechooser
  fontchooser
  gradient
  hyperlink
  outlookpanel
  outlookpanel.renderers
  quick
  rotate
  sliderpanel
  spantable
  splashscreen
  statusbar
  table
  table.renderers
  table.wrappers
  tree
  treetable
  util
  xmlbars
  xmlbars.menubar
  xmlbars.toolbar
  xmlbars.toolbar.layouts
com.smardec.asc.spantable
Class TableCell

java.lang.Object
|
+--com.smardec.asc.spantable.TableCell

public final class TableCell
extends java.lang.Object

TableCell is used to store user data and span info in DefaultSpanTableModel. You have no need to create TableCell's objects directly. In most cases you should use DefaultSpanTableModel.DefaultSpanTableModel(java.util.Vector, java.util.Vector) or AbstractTableModel.setValueAt(Object, int, int).


Constructor Summary
TableCell(int rowIndex, int columnIndex)
Creates TableCell object with the specified rowIndex, columnIndex and null user data.
TableCell(int rowIndex, int columnIndex, java.lang.Object data)
Creates TableCell object with the specified rowIndex, columnIndex and user data.
Method Summary
TableCell getAnchorCell()
Returns anchor cell for this cell.
int getColumnIndex()
Returns column index of this cell.
int getColumnSpan()
Returns number of spanned columns if this cell is in span, if not 1 is returned.
java.lang.Object getData()
Returns this cell's user object.
int getRowIndex()
Returns row index of this cell.
int getRowSpan()
Returns number of spanned rows if this cell is in span, if not 1 is returned.
boolean isAnchorCell()
Indicates whether this table cell is anchor.
boolean isEditable()
Indicates whether this table cell is editable.
boolean isInSpan()
Indicates whether this table cell is in span.
void setData(java.lang.Object data)
Specifies the user object for this cell to data.
void setEditable(boolean editable)
Specifies whether this table cell should be editable.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail
TableCell
public TableCell(int rowIndex, int columnIndex, java.lang.Object data)

Creates TableCell object with the specified rowIndex, columnIndex and user data.

Parameters:
rowIndex - row index
columnIndex - column index
data - user data

TableCell
public TableCell(int rowIndex, int columnIndex)
Creates TableCell object with the specified rowIndex, columnIndex and null user data.

Parameters:
rowIndex - row index
columnIndex - column index
Method Detail
getData
public java.lang.Object getData()
Returns this cell's user object.

Returns:
the Object stored at this cell by the user.
See Also:
setData(Object)

setData
public void setData(java.lang.Object data)
Specifies the user object for this cell to data.

Parameters:
data - the Object that constitutes this cell's user-specified data
See Also:
getData()

isEditable
public boolean isEditable()
Indicates whether this table cell is editable. The default value is true.

Returns:
true if this cell is editable, false otherwise.
See Also:
AbstractTableModel.isCellEditable(int, int), DefaultSpanTableModel.DefaultSpanTableModel(java.util.Vector, boolean, java.util.Vector)

setEditable
public void setEditable(boolean editable)
Specifies whether this table cell should be editable.

Parameters:
editable - true if this cell should be editable, false otherwise.
See Also:
AbstractTableModel.isCellEditable(int, int), DefaultSpanTableModel.DefaultSpanTableModel(java.util.Vector, boolean, java.util.Vector)

getRowIndex
public int getRowIndex()
Returns row index of this cell.

Returns:
row index of this cell.

getColumnIndex
public int getColumnIndex()
Returns column index of this cell.

Returns:
column index of this cell.

isAnchorCell
public boolean isAnchorCell()
Indicates whether this table cell is anchor. Anchor cell is a left top cell in cells span.
Note: Table gets view data for cells' span from anchor cell.

Returns:
true if this cell is anchor, false otherwise.

isInSpan
public boolean isInSpan()
Indicates whether this table cell is in span. If cell is anchor, it's in span too.

Returns:
true if this cell is anchor, false otherwise.

getAnchorCell
public TableCell getAnchorCell()
Returns anchor cell for this cell. If cell is not in span the this is returned.

Returns:
anchor cell for this cell.

getRowSpan
public int getRowSpan()
Returns number of spanned rows if this cell is in span, if not 1 is returned.

Returns:
number of spanned rows.

getColumnSpan
public int getColumnSpan()
Returns number of spanned columns if this cell is in span, if not 1 is returned.

Returns:
number of spanned columns.
Home about services products contact login