public abstract class RestrictedColumnComboBoxModel extends ColumnComboBoxModel
acceptColumn(uk.ac.starlink.table.ColumnInfo)
method appropriately. In the case that
acceptColumn
accepts everything, this will behave just the
same as a ColumnComboBoxModel (though perhaps less efficiently).NO_COLUMN
listenerList
Constructor and Description |
---|
RestrictedColumnComboBoxModel(TableColumnModel colModel,
boolean hasNone) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
acceptColumn(uk.ac.starlink.table.ColumnInfo cinfo)
Determines whether a column with given metadata in the column
model should show up in the combobox.
|
void |
columnAdded(TableColumnModelEvent evt) |
void |
columnMoved(TableColumnModelEvent evt) |
void |
columnRemoved(TableColumnModelEvent evt) |
TableColumn |
getElementAt(int index) |
int |
getSize() |
static RestrictedColumnComboBoxModel |
makeClassColumnComboBoxModel(TableColumnModel colModel,
boolean hasNone,
Class<?> clazz)
Returns a column combo box model which checks for compatibility
with a given class.
|
columnMarginChanged, columnSelectionChanged, getColumnModel, getSelectedItem, makeComboBox, setHasNone, setSelectedItem
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListDataListener, removeListDataListener
public RestrictedColumnComboBoxModel(TableColumnModel colModel, boolean hasNone)
public abstract boolean acceptColumn(uk.ac.starlink.table.ColumnInfo cinfo)
cinfo
- column metadata to assesstrue
iff the column is to be usedpublic TableColumn getElementAt(int index)
getElementAt
in interface ListModel<TableColumn>
getElementAt
in class ColumnComboBoxModel
public int getSize()
getSize
in interface ListModel<TableColumn>
getSize
in class ColumnComboBoxModel
public void columnAdded(TableColumnModelEvent evt)
columnAdded
in interface TableColumnModelListener
columnAdded
in class ColumnComboBoxModel
public void columnRemoved(TableColumnModelEvent evt)
columnRemoved
in interface TableColumnModelListener
columnRemoved
in class ColumnComboBoxModel
public void columnMoved(TableColumnModelEvent evt)
columnMoved
in interface TableColumnModelListener
columnMoved
in class ColumnComboBoxModel
public static RestrictedColumnComboBoxModel makeClassColumnComboBoxModel(TableColumnModel colModel, boolean hasNone, Class<?> clazz)
Number
) is considered
assignable to any other numeric class.colModel
- the column modelhasNone
- true if you want a NO_COLUMN entryclazz
- the class that available columns have to have
data assignable toCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.