Class com.ibm.db.selector.RowSelector
java.lang.Object
|
+----com.ibm.db.selector.Selector
|
+----com.ibm.db.selector.RowSelector
- public class RowSelector
- implements ComboBoxModel
- extends Selector
This class provides
access to a row subset of data contained
within an implementation of the TableModel interface.
It provides the means to
change the selected row, and to coerce the row values
to an alternative data type. Data coercion maximizes the opportunity
for connecting a selector bean to other beans.
Data values may be obtained or supplied as a one dimensional array,
or as a Vector.
This class also implements the com.sun.java.swing.ComboBoxModel interface, so
it can be directly used as the model for a JList or a JComboBox.
To control the cells within the source TableModel that are of interest,
use the
setRowNumber(int)
, setStartColumnNumber(int)
and setMaximumColumns(int)
methods.
- See Also:
- setRowNumber
- setStartColumnNumber
- setMaximumColumns
- Selector
Constructor Index
- RowSelector()
- Create a RowSelector.
- RowSelector(TableModel)
- Create a RowSelector using the supplied
TableModel
.
Method Index
- addListDataListener(ListDataListener)
- Add the supplied ListDataListener to the set of listeners to receive
ListDataEvents.
- getBigDecimal()
- Return the current selection from the source TableModel
as a
java.math.BigDecimal[]
, with one element for each cell
referenced by the RowSelector.
- getBigInteger()
- Return the current selection from the source TableModel
as a
java.math.BigInteger[]
, with one element for each cell
referenced by the RowSelector.
- getBoolean()
- Return the current selection from the source TableModel
as a
boolean[]
, with one element for each cell
referenced by the RowSelector.
- getByte()
- Return the current selection from the source TableModel
as a
byte[]
, with one element for each cell
referenced by the RowSelector.
- getByteArray()
- Return the current selection from the source TableModel
as a
byte[][]
, with one element for each cell
referenced by the RowSelector.
- getColumnNames()
- Return a String[] containing the names of the columns currently
referenced by this selector.
- getDate()
- Return the current selection from the source TableModel
as a
java.sql.Date[]
, with one element for each cell
referenced by the RowSelector.
- getDouble()
- Return the current selection from the source TableModel
as a
double[]
, with one element for each cell
referenced by the RowSelector.
- getElementAt(int)
- Return the value at the supplied column index.
- getFloat()
- Return the current selection from the source TableModel
as a
float[]
, with one element for each cell
referenced by the RowSelector.
- getInt()
- Return the current selection from the source TableModel
as a
int[]
, with one element for each cell
referenced by the RowSelector.
- getLong()
- Return the current selection from the source TableModel
as a
long[]
, with one element for each cell
referenced by the RowSelector.
- getMaximumColumns()
- Return the maximum number of columns to be selected, or
Selector.NO_MAXIMUM
if the selection should extend to the
last available column.
- getObject()
- Return the current selection from the source TableModel
as an
Object[]
.
- getRowNumber()
- Return the index number of the row currently selected from the
source TableModel.
- getSelectedItem()
- Return the selected item.
- getShort()
- Return the current selection from the source TableModel
as a
short[]
, with one element for each cell
referenced by the RowSelector.
- getSize()
- Return the number of columns addressed by the RowSelector.
- getStartColumnNumber()
- Return the index number of the first column for the currently selected cells,
adjusted according to the current value of
getIndexFromOne()
.
- getString()
- Return the current selection from the source TableModel
as a
String[]
, with one element for each cell
referenced by the RowSelector.
- getTime()
- Return the current selection from the source TableModel
as a
java.sql.Time[]
, with one element for each cell
referenced by the RowSelector.
- getTimestamp()
- Return the current selection from the source TableModel
as a
java.sql.Timestamp[]
, with one element for each cell
referenced by the RowSelector.
- getVector()
- Return the current selection from the source TableModel
as a
Vector
.
- isCellEditable(int)
- Return
true
if the cell at the supplied column index of the
row identified by the
RowSelector may be updated.
- removeListDataListener(ListDataListener)
- Remove the supplied ListDataListener from the set of listeners to receive
ListDataEvents.
- setBigDecimal(BigDecimal[])
- Update the current selection using the supplied
java.math.BigDecimal[]
.
- setBigInteger(BigInteger[])
- Update the current selection using the supplied
java.math.BigInteger[]
.
- setBoolean(boolean[])
- Update the current selection using the supplied
boolean[]
.
- setByte(byte[])
- Update the current selection using the supplied
byte[]
.
- setByteArray(byte[][])
- Update the current selection using the supplied
byte[][]
.
- setDate(Date[])
- Update the current selection using the supplied
java.sql.Date[]
.
- setDouble(double[])
- Update the current selection using the supplied
double[]
.
- setFloat(float[])
- Update the current selection using the supplied
float[]
.
- setInt(int[])
- Update the current selection using the supplied
int[]
.
- setLong(long[])
- Update the current selection using the supplied
long[]
.
- setMaximumColumns(int)
- Specify the maximum number of columns to be selected..
- setObject(Object[])
- Update the current selection using the supplied
Object[]
.
- setRowNumber(int)
- Specify the index number of the row selected from the source
TableModel.
- setSelectedItem(Object)
- Set the selected item.
- setShort(short[])
- Update the current selection using the supplied
short[]
.
- setStartColumnNumber(int)
- Specify the index number of the first column for the currently selected cells.
- setString(String[])
- Update the current selection using the supplied
String[]
.
- setTime(Time[])
- Update the current selection using the supplied
java.sql.Time[]
.
- setTimestamp(Timestamp[])
- Update the current selection using the supplied
java.sql.Timestamp[]
.
- setVector(Vector)
- Update the current selection using the supplied
Vector
.
Constructors
RowSelector
public RowSelector()
- Create a RowSelector. The RowSelector has no data until
setModel
is called.
- See Also:
- setModel
RowSelector
public RowSelector(TableModel model)
- Create a RowSelector using the supplied
TableModel
.
- Parameters:
- model - the TableModel to be used as the source and target
for data for this RowSelector.
- See Also:
- setModel
Methods
addListDataListener
public void addListDataListener(ListDataListener listDataListener)
- Add the supplied ListDataListener to the set of listeners to receive
ListDataEvents.
Implements
ListModel.addListDataListener(ListDataListener)
.
- Parameters:
- listDataListener - the listener to be added.
getBigDecimal
public BigDecimal[] getBigDecimal()
- Return the current selection from the source TableModel
as a
java.math.BigDecimal[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the BigDecimal[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a BigDecimal and is not null.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getBigDecimal
getBigInteger
public BigInteger[] getBigInteger()
- Return the current selection from the source TableModel
as a
java.math.BigInteger[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the BigInteger[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a BigInteger and is not null.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getBigInteger
getBoolean
public boolean[] getBoolean()
- Return the current selection from the source TableModel
as a
boolean[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the boolean[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a boolean.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getBoolean
getByte
public byte[] getByte()
- Return the current selection from the source TableModel
as a
byte[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the byte[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a byte.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getByte
getByteArray
public byte[][] getByteArray()
- Return the current selection from the source TableModel
as a
byte[][]
, with one element for each cell
referenced by the RowSelector. The byte[][] can be
treated as an array of byte[], with the first level index
identifying the cell.
- Returns:
- the byte[][] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a byte[] and is not null.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getByteArray
getColumnNames
public String[] getColumnNames()
- Return a String[] containing the names of the columns currently
referenced by this selector.
- Returns:
- a String[] containing the names of the columns currently
referenced by this selector.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- MAXIMUM_COLUMNS
getDate
public Date[] getDate()
- Return the current selection from the source TableModel
as a
java.sql.Date[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the Date[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a Date and is not null.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getDate
getDouble
public double[] getDouble()
- Return the current selection from the source TableModel
as a
double[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the double[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a double.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getDouble
getElementAt
public Object getElementAt(int index)
- Return the value at the supplied column index.
Implements
ListModel.getElementAt(Object anItem)
.
- Returns:
- the value at the supplied column index.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
getFloat
public float[] getFloat()
- Return the current selection from the source TableModel
as a
float[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the float[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a float.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getFloat
getInt
public int[] getInt()
- Return the current selection from the source TableModel
as a
int[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the int[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a int.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getInt
getLong
public long[] getLong()
- Return the current selection from the source TableModel
as a
long[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the long[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a long.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getLong
getMaximumColumns
public int getMaximumColumns()
- Return the maximum number of columns to be selected, or
Selector.NO_MAXIMUM
if the selection should extend to the
last available column.
- Returns:
- the maximum number of selected columns,
or
Selector.NO_MAXIMUM
.
- See Also:
- setMaximumColumns
- NO_MAXIMUM
getObject
public Object[] getObject()
- Return the current selection from the source TableModel
as an
Object[]
.
Some beans accept objects and test their class to
detect objects that they understand.
- Returns:
- the Object[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
getRowNumber
public int getRowNumber()
- Return the index number of the row currently selected from the
source TableModel.
- Returns:
- the index number of the currently selected row.
- See Also:
- setRowNumber
getSelectedItem
public Object getSelectedItem()
- Return the selected item. Implements
ComboBoxModel.getSelectedItem()
.
- Returns:
- the currently selected item.
- See Also:
- setSelectedItem
getShort
public short[] getShort()
- Return the current selection from the source TableModel
as a
short[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the short[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a short.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getShort
getSize
public int getSize()
- Return the number of columns addressed by the RowSelector.
Implements
ListModel.setSelectedItem(Object anItem)
.
- Returns:
- the number of columns addressed by the RowSelector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- See Also:
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
getStartColumnNumber
public int getStartColumnNumber()
- Return the index number of the first column for the currently selected cells,
adjusted according to the current value of
getIndexFromOne()
.
- Returns:
- the adjusted column index number for the first column of the
currently selected cells.
- See Also:
- setStartColumnNumber
- setMaximumColumns
- setIndexFromOne
getString
public String[] getString()
- Return the current selection from the source TableModel
as a
String[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the String[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- See Also:
- getString
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
getTime
public Time[] getTime()
- Return the current selection from the source TableModel
as a
java.sql.Time[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the Time[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a Time and is not null.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getTime
getTimestamp
public Timestamp[] getTimestamp()
- Return the current selection from the source TableModel
as a
java.sql.Timestamp[]
, with one element for each cell
referenced by the RowSelector.
- Returns:
- the Timestamp[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a Timestamp and is not null.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
- getTimestamp
getVector
public Vector getVector()
- Return the current selection from the source TableModel
as a
Vector
.
The type of the vector elements
is determined by the current vectorContentType
.
- Returns:
- a Vector containing values derived from the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- setVectorContentType
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
isCellEditable
public boolean isCellEditable(int columnIndex)
- Return
true
if the cell at the supplied column index of the
row identified by the
RowSelector may be updated.
- Parameters:
- columnIndex - the column index of the cell of interest, relative to
the first column of the selection.
- Returns:
true
if the cell identified by the
RowSelector may be updated, otherwise false
.
- See Also:
- setStartColumnNumber
removeListDataListener
public void removeListDataListener(ListDataListener listDataListener)
- Remove the supplied ListDataListener from the set of listeners to receive
ListDataEvents.
Implements
ListModel.removeListDataListener(ListDataListener)
.
- Parameters:
- listDataListener - the listener to be removed.
setBigDecimal
public void setBigDecimal(BigDecimal[] values)
- Update the current selection using the supplied
java.math.BigDecimal[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the BigDecimal[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setBigInteger
public void setBigInteger(BigInteger[] values)
- Update the current selection using the supplied
java.math.BigInteger[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the BigInteger[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setBoolean
public void setBoolean(boolean[] values)
- Update the current selection using the supplied
boolean[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the boolean[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setByte
public void setByte(byte[] values)
- Update the current selection using the supplied
byte[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the byte[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setByteArray
public void setByteArray(byte[][] values)
- Update the current selection using the supplied
byte[][]
.
The byte[][] is
treated as an array of byte[], with the first level index
identifying each byte[].
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the byte[][] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setDate
public void setDate(Date[] values)
- Update the current selection using the supplied
java.sql.Date[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the Date[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setDouble
public void setDouble(double[] values)
- Update the current selection using the supplied
double[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the double[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setFloat
public void setFloat(float[] values)
- Update the current selection using the supplied
float[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the float[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setInt
public void setInt(int[] values)
- Update the current selection using the supplied
int[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the int[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setLong
public void setLong(long[] values)
- Update the current selection using the supplied
long[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the long[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setMaximumColumns
public void setMaximumColumns(int maximumColumns)
- Specify the maximum number of columns to be selected..
- Parameters:
- maximumColumns - the maximum number of selected columns,
or
Selector.NO_MAXIMUM
to
indicate that the last column of the selection should be the
last column in the source TableModel.
- See Also:
- setStartColumnNumber
- NO_MAXIMUM
setObject
public void setObject(Object[] values)
- Update the current selection using the supplied
Object[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the Object[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setRowNumber
public void setRowNumber(int rowNumber)
- Specify the index number of the row selected from the source
TableModel.
After the source TableModel has been set for the selector,
if rows are inserted or deleted into the source TableModel prior to the
rowNumber, the rowNumber is automatically adjusted so the
selected data is not changed.
If the source TableModel is reset or the source TableModel triggers an
event that the table has completely changed, then no attempt is made to
modify the rowNumber and the selected data may change.
The value specified for rowNumber is not validated until an attempt is
made to retrieve/set data through the selector. If the source TableModel does
not contain the specified row, the rowNumber is set to the last
row in the source TableModel and an exception is thrown.
- Parameters:
- int - index number of the currently selected row.
- See Also:
- setIndexFromOne
setSelectedItem
public void setSelectedItem(Object anItem)
- Set the selected item. Implements
ComboBoxModel.setSelectedItem(Object anItem)
.
- Parameters:
- Object - the item to be treated as selected.
setShort
public void setShort(short[] values)
- Update the current selection using the supplied
short[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the short[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setStartColumnNumber
public void setStartColumnNumber(int startColumnNumber)
- Specify the index number of the first column for the currently selected cells.
If
getIndexFromOne()
returns true
, then
startColumnNumber should be specified as 1
to indicate the
first row in the source TableModel.
The value specified for startColumnNumber is not validated until an attempt is
made to retrieve/set data through the selector. If the source TableModel does
not contain the specified column, the startColumnNumber is set to the last
column in the source TableModel and an exception is thrown.
- Parameters:
- startColumnNumber - the column index number for the first column of the
currently selected cells.
- See Also:
- setMaximumColumns
- setIndexFromOne
setString
public void setString(String[] values)
- Update the current selection using the supplied
String[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the String[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setTime
public void setTime(Time[] values)
- Update the current selection using the supplied
java.sql.Time[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the Time[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setTimestamp
public void setTimestamp(Timestamp[] values)
- Update the current selection using the supplied
java.sql.Timestamp[]
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the Timestamp[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
setVector
public void setVector(Vector values)
- Update the current selection using the supplied
Vector
.
If there are more values supplied than are referenced by this
selector, excess values will be ignored.
If the supplied values cannot be interpreted as the type of the
corresponding current selection cells, a SelectorException is thrown.
- Parameters:
- value - the Vector containing the values used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- START_COLUMN_NUMBER
- when the current selection start column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_COLUMNS
- when the current selection maximum number of columns is invalid.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- START_COLUMN_NUMBER
- setStartColumnNumber
- MAXIMUM_COLUMNS
- setMaximumColumns
- ROW_NUMBER
- setRowNumber
- COERCION
