|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.components.table.TableRowArray
public class TableRowArray
TableRowArray
is support implementation of
TableRow
build around ArrayList
.
Field Summary | |
---|---|
protected TableRowModel |
parentModel
|
protected java.util.List<java.lang.Object> |
values
|
Constructor Summary | |
---|---|
TableRowArray()
Creates new instance. |
|
TableRowArray(java.util.List<java.lang.Object> l)
Creates new instance. |
|
TableRowArray(java.lang.Object[] l)
Creates new instance. |
Method Summary | |
---|---|
void |
addValue(int index,
java.lang.Object value)
Inserts new value to this row at specified position. |
void |
addValue(java.lang.Object value)
Adds new value to the end of this row. |
int |
compareTo(TableRow row,
int valueIndex)
Compares this table row with the specified table row for order. |
protected void |
fireUpdate()
|
protected void |
fireUpdate(int index)
|
TableRowModel |
getParentModel()
The parent model which contains this row. |
java.lang.Object |
getValueAt(int column)
Returns value at column index. |
int |
getValueCount()
Returns the number values int this row. |
boolean |
isValueSettable(int index)
Return true if value at specified column index is editable. |
void |
setParentModel(TableRowModel model)
This method is called when row is added to model. |
java.lang.Object |
setValue(int index,
java.lang.Object newValue)
Replaces value at specified index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<java.lang.Object> values
protected TableRowModel parentModel
Constructor Detail |
---|
public TableRowArray()
public TableRowArray(java.lang.Object[] l)
l
- values as arraypublic TableRowArray(java.util.List<java.lang.Object> l)
l
- values as ListMethod Detail |
---|
public java.lang.Object getValueAt(int column)
TableRow
getValueAt
in interface TableRow
column
- the column index
public int getValueCount()
TableRow
getValueCount
in interface TableRow
public void setParentModel(TableRowModel model)
TableRow
null
.
Row can call on parent model method
fireRowUpdate(TableRow,int)
when want to notify model
listeners (specially the JTable) about data changes.
setParentModel
in interface TableRow
model
- the model to which row was added, or null
,
when row is removed form modelTableRowModel.fireRowUpdate(TableRow, int)
public TableRowModel getParentModel()
TableRow
getParentModel
in interface TableRow
public void addValue(java.lang.Object value)
value
- the value added to the end of this rowpublic void addValue(int index, java.lang.Object value)
index
- where to insert valuevalue
- new inserted valuepublic java.lang.Object setValue(int index, java.lang.Object newValue)
index
- where value is setnewValue
- new value
protected void fireUpdate()
protected void fireUpdate(int index)
public boolean isValueSettable(int index)
TableRow
true
if value at specified column index is editable.
isValueSettable
in interface TableRow
index
- the column index
true
if value at the specified column index is
editablepublic int compareTo(TableRow row, int valueIndex)
TableRow
compareTo
in interface TableRow
row
- a row, to which it is comparedvalueIndex
- the index of value, which is compared in row
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |