public class ConstantColumn extends AbstractColumn
m_columnType, m_defaultValue, m_listeners, m_parser, m_readOnly
Constructor and Description |
---|
ConstantColumn(java.lang.Class type,
java.lang.Object defaultValue)
Create a new ConstantColumn.
|
Modifier and Type | Method and Description |
---|---|
void |
addColumnListener(ColumnListener listener)
Does nothing.
|
boolean |
canSet(java.lang.Class type)
Returns false.
|
java.lang.Object |
get(int row)
Get the data value at the specified row
|
int |
getRowCount()
Returns the number of rows in this data column
|
void |
removeColumnListener(ColumnListener listener)
Does nothing.
|
void |
set(java.lang.Object val,
int row)
Unsupported operation.
|
void |
setMaximumRow(int nrows)
Sets the number of rows in this data column
|
canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, fireColumnEvent, fireColumnEvent, fireColumnEvent, fireColumnEvent, fireColumnEvent, fireColumnEvent, fireColumnEvent, getBoolean, getColumnType, getDate, getDefaultValue, getDouble, getFloat, getInt, getLong, getParser, getString, isCellEditable, isReadOnly, revertToDefault, setBoolean, setDate, setDefaultValue, setDouble, setFloat, setInt, setLong, setParser, setReadOnly, setString
public ConstantColumn(java.lang.Class type, java.lang.Object defaultValue)
type
- the data type of this columndefaultValue
- the default value used for all rowspublic int getRowCount()
Column
Column.getRowCount()
public void setMaximumRow(int nrows)
Column
nrows
- the number of rowsColumn.setMaximumRow(int)
public java.lang.Object get(int row)
Column
row
- the row from which to retrieve the valueColumn.get(int)
public void set(java.lang.Object val, int row) throws DataTypeException
val
- the value to setrow
- the row at which to set the valueDataTypeException
Column.set(java.lang.Object, int)
public boolean canSet(java.lang.Class type)
canSet
in interface Column
canSet
in class AbstractColumn
type
- the Class of the data type to checkColumn.canSet(java.lang.Class)
public void addColumnListener(ColumnListener listener)
addColumnListener
in interface Column
addColumnListener
in class AbstractColumn
listener
- the ColumnListener to addColumn.addColumnListener(prefuse.data.event.ColumnListener)
public void removeColumnListener(ColumnListener listener)
removeColumnListener
in interface Column
removeColumnListener
in class AbstractColumn
listener
- the ColumnListener to removeColumn.removeColumnListener(prefuse.data.event.ColumnListener)
Copyright ? 2013 Regents of the University of California