Class com.ibm.db.selector.ColumnSelector
java.lang.Object
|
+----com.ibm.db.selector.Selector
|
+----com.ibm.db.selector.SingleColumnSelector
|
+----com.ibm.db.selector.ColumnSelector
- public class ColumnSelector
- implements ComboBoxModel
- extends SingleColumnSelector
This class provides
access to a column subset of data contained
within an implementation of the TableModel interface.
It provides the means to
change the selected column, and to coerce the column 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
setColumnNumber(int)
, setStartRowNumber(int)
and setMaximumRows(int)
methods.
- See Also:
- setColumnNumber
- setStartRowNumber
- setMaximumRows
- Selector
- SingleColumnSelector
Constructor Index
- ColumnSelector()
- Create a ColumnSelector.
- ColumnSelector(TableModel)
- Create a ColumnSelector 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 ColumnSelector.
- getBigInteger()
- Return the current selection from the source TableModel
as a
java.math.BigInteger[]
, with one element for each cell
referenced by the ColumnSelector.
- getBoolean()
- Return the current selection from the source TableModel
as a
boolean[]
, with one element for each cell
referenced by the ColumnSelector.
- getByte()
- Return the current selection from the source TableModel
as a
byte[]
, with one element for each cell
referenced by the ColumnSelector.
- getByteArray()
- Return the current selection from the source TableModel
as a
byte[][]
, with one element for each cell
referenced by the ColumnSelector.
- getDate()
- Return the current selection from the source TableModel
as a
java.sql.Date[]
, with one element for each cell
referenced by the ColumnSelector.
- getDouble()
- Return the current selection from the source TableModel
as a
double[]
, with one element for each cell
referenced by the ColumnSelector.
- getElementAt(int)
- Return the value at the supplied row index.
- getFloat()
- Return the current selection from the source TableModel
as a
float[]
, with one element for each cell
referenced by the ColumnSelector.
- getIncludeColumnName()
- Return whether the column name is to be included as
the first element of column data obtained as String values.
- getInt()
- Return the current selection from the source TableModel
as a
int[]
, with one element for each cell
referenced by the ColumnSelector.
- getLong()
- Return the current selection from the source TableModel
as a
long[]
, with one element for each cell
referenced by the ColumnSelector.
- getMaximumRows()
- Returns the maximum number of rows that will be selected, or
Selector.NO_MAXIMUM
if the selection should extend to the
last available row.
- getObject()
- Return the current selection from the source TableModel
as an
Object[]
.
- 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 ColumnSelector.
- getSize()
- Return the number of rows addressed by the ColumnSelector.
- getStartRowNumber()
- Return the index number of the first row 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 ColumnSelector.
- getTime()
- Return the current selection from the source TableModel
as a
java.sql.Time[]
, with one element for each cell
referenced by the ColumnSelector.
- getTimestamp()
- Return the current selection from the source TableModel
as a
java.sql.Timestamp[]
, with one element for each cell
referenced by the ColumnSelector.
- getVector()
- Return the current selection from the source TableModel
as a
Vector
.
- isCellEditable(int)
- Return
true
if the cell at the supplied row index of the
column identified by the
ColumnSelector 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[]
.
- setIncludeColumnName(boolean)
- Specify whether the column name is to be included as
the first element of column data.
- setInt(int[])
- Update the current selection using the supplied
int[]
.
- setLong(long[])
- Update the current selection using the supplied
long[]
.
- setMaximumRows(int)
- Specify the maximum number of rows to be selected.
- setObject(Object[])
- Update the current selection using the supplied
Object[]
.
- setSelectedItem(Object)
- Set the selected item.
- setShort(short[])
- Update the current selection using the supplied
short[]
.
- setStartRowNumber(int)
- Specify the index number of the first row 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
ColumnSelector
public ColumnSelector()
- Create a ColumnSelector. The ColumnSelector has no data until
setModel
is called.
- See Also:
- setModel
ColumnSelector
public ColumnSelector(TableModel model)
- Create a ColumnSelector using the supplied
TableModel
.
- Parameters:
- model - the TableModel to be used as the source and target
for data for this ColumnSelector.
- 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 ColumnSelector.
- Returns:
- the BigDecimal[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- 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
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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 ColumnSelector.
- Returns:
- the BigInteger[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- 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
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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 ColumnSelector.
- Returns:
- the boolean[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a boolean.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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 ColumnSelector.
- Returns:
- the byte[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a byte.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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 ColumnSelector. 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- 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
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
- getByteArray
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 ColumnSelector.
- Returns:
- the Date[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- 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
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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 ColumnSelector.
- Returns:
- the double[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a double.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
- getDouble
getElementAt
public Object getElementAt(int index)
- Return the value at the supplied row index.
Implements
ListModel.getElementAt(Object anItem)
.
- Returns:
- the value at the supplied row index.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- setStartRowNumber
- MAXIMUM_ROWS
- setMaximumRows
getFloat
public float[] getFloat()
- Return the current selection from the source TableModel
as a
float[]
, with one element for each cell
referenced by the ColumnSelector.
- Returns:
- the float[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a float.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
- getFloat
getIncludeColumnName
public boolean getIncludeColumnName()
- Return whether the column name is to be included as
the first element of column data obtained as String values.
- Returns:
- boolean indicating whether the column name is to be included.
- See Also:
- setIncludeColumnName
getInt
public int[] getInt()
- Return the current selection from the source TableModel
as a
int[]
, with one element for each cell
referenced by the ColumnSelector.
- Returns:
- the int[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to an int.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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 ColumnSelector.
- Returns:
- the long[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a long.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
- getLong
getMaximumRows
public int getMaximumRows()
- Returns the maximum number of rows that will be selected, or
Selector.NO_MAXIMUM
if the selection should extend to the
last available row.
- Returns:
- the maximum number of selected rows,
or
Selector.NO_MAXIMUM
.
- See Also:
- setMaximumRows
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- See Also:
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
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 ColumnSelector.
- Returns:
- the short[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- if any of the values in the current selection cannot be coerced
to a short.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
- getShort
getSize
public int getSize()
- Return the number of rows addressed by the ColumnSelector.
Implements
ListModel.setSelectedItem(Object anItem)
.
- Returns:
- the number of rows addressed by the ColumnSelector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- See Also:
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- setStartRowNumber
- MAXIMUM_ROWS
- setMaximumRows
getStartRowNumber
public int getStartRowNumber()
- Return the index number of the first row for the currently selected cells,
adjusted according to the current value of
getIndexFromOne()
.
- Returns:
- the adjusted row index number for the first row of the
currently selected cells.
- See Also:
- setStartRowNumber
- setMaximumRows
- 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 ColumnSelector.
- Returns:
- the String[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- See Also:
- getString
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
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 ColumnSelector.
- Returns:
- the Time[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- 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
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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 ColumnSelector.
- Returns:
- the Timestamp[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- 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
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- See Also:
- setVectorContentType
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
isCellEditable
public boolean isCellEditable(int rowIndex)
- Return
true
if the cell at the supplied row index of the
column identified by the
ColumnSelector may be updated.
- Parameters:
- rowIndex - the row index of the cell of interest, relative to
the first row of the selection.
- Returns:
true
if the cell identified by the
CellSelector may be updated, otherwise false
.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
setByteArray
public void setByteArray(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.
The byte[][] is
treated as an array of byte[], with the first level index
identifying each byte[].
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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
setIncludeColumnName
public void setIncludeColumnName(boolean includeColumnName)
- Specify whether the column name is to be included as
the first element of column data. This only has effect when
column data are retrieved as String values.
- Parameters:
- includeColumnName - boolean controlling column name inclusion.
- See Also:
- setNotificationType
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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
setMaximumRows
public void setMaximumRows(int maximumRows)
- Specify the maximum number of rows to be selected.
- Parameters:
- maximumRows - the maximum number of selected rows,
or
Selector.NO_MAXIMUM
to
indicate that the last row of the selection should be the
last row in the source TableModel.
- See Also:
- setStartRowNumber
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
setStartRowNumber
public void setStartRowNumber(int startRowNumber)
- Specify the index number of the first row for the currently selected cells.
If
getIndexFromOne()
returns true
, then
startRowNumber should be specified as 1
to indicate the
first row in 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
startRowNumber, the startRowNumber 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 startRowNumber and the selected data may change.
The value specified for startRowNumber is not validated until an attempt is
made to retrieve data through the selector. If the source TableModel does
not contain the specified row, the startRowNumber is set to the last row
in the source TableModel and an exception is thrown.
- Parameters:
- startRowNumber - the row index number for the first row of the
currently selected cells.
- See Also:
- setMaximumRows
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- 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
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- START_ROW_NUMBER
- when the current selection start row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- MAXIMUM_ROWS
- when the current selection maximum number of rows is invalid.
- Throws: SelectorException
- COERCION
- when the supplied values cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- START_ROW_NUMBER
- MAXIMUM_ROWS
- COERCION
