public class ColumnSelectorModel extends Object
ColumnSelector
. Contains information about
how you get a value of a given type (such as Right Ascension)
from a table.Constructor and Description |
---|
ColumnSelectorModel(TopcatModel tcModel,
uk.ac.starlink.table.ValueInfo info)
Constructs a new model for a given table and value type.
|
Modifier and Type | Method and Description |
---|---|
uk.ac.starlink.table.ColumnData |
getColumnData()
Returns the (effective) column currently selected by the user.
|
ComboBoxModel<uk.ac.starlink.table.ColumnData> |
getColumnModel()
Returns the model used for choosing columns.
|
ComboBoxModel<ColumnConverter> |
getConverterModel()
Returns the model used for choosing converters.
|
uk.ac.starlink.table.ValueInfo |
getValueInfo()
Returns this model's value description.
|
void |
setTable(TopcatModel tcModel)
Sets the table that this selector model is configured for.
|
boolean |
setTextValue(String colTxt,
String convTxt)
Sets the content of this model given textual values for the
column specification and for the converter.
|
public ColumnSelectorModel(TopcatModel tcModel, uk.ac.starlink.table.ValueInfo info)
tcModel
- table modelinfo
- description of the kind of column which is requiredpublic void setTable(TopcatModel tcModel)
tcModel
- new tablepublic uk.ac.starlink.table.ValueInfo getValueInfo()
public ComboBoxModel<uk.ac.starlink.table.ColumnData> getColumnModel()
ColumnData
and will not take account of any selected converter.
The selected item may be of some other type (currently String),
and this should be ignored (treated as null) for the purposes
of data access.public ComboBoxModel<ColumnConverter> getConverterModel()
public uk.ac.starlink.table.ColumnData getColumnData()
The returned ColumnData object has an intelligent implementation
of equals
(and hashCode
), in that
two invocations of this method without any intervening change of
of state of this model will evaluate equal.
public boolean setTextValue(String colTxt, String convTxt)
colTxt
- text content for column specificationconvTxt
- name of converter required; may be nullCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.