Class SelectCharactersModel
java.lang.Object
javax.swing.table.AbstractTableModel
uk.ac.starlink.util.gui.SelectCharactersModel
- All Implemented Interfaces:
Serializable, TableModel
SelectCharactersModel is an implementation of the TableModel
interface for displaying all the characters in a given font.
- Since:
- $Date$, 03-NOV-2000
- Version:
- $Id$
- Author:
- Peter W. Draper
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FontThe font that we're displaying.protected intThe number of characters in the font.protected final intThe number of characters displayed in a row.protected intNumber of rows needed to display the whole font.Fields inherited from class AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> getColumnClass(int index) Return the column classes.intReturns the number of columns.getColumnName(int index) Return the column names.intReturns the number of records managed by the data source object.getValueAt(int row, int column) Return the value of a given cell.booleanisCellEditable(int row, int column) Nothing is editable.voidSet the displayed font.voidsetValueAt(Object value, int row, int column) Since nothing can be changed.Methods inherited from class AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
font
The font that we're displaying. -
numChars
protected int numCharsThe number of characters in the font. -
numColumns
protected final int numColumnsThe number of characters displayed in a row.- See Also:
-
numRows
protected int numRowsNumber of rows needed to display the whole font.
-
-
Constructor Details
-
SelectCharactersModel
Create an instance of this class.
-
-
Method Details
-
setFont
Set the displayed font. -
getRowCount
public int getRowCount()Returns the number of records managed by the data source object. -
getColumnCount
public int getColumnCount()Returns the number of columns. Always two, the plot name and whether it is displaying the "current" spectrum. -
getValueAt
Return the value of a given cell. -
getColumnName
Return the column names. There are none.- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
Return the column classes. All Strings.- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column) Nothing is editable.- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
setValueAt
Since nothing can be changed. This also does nothing.- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-