Package uk.ac.starlink.util.gui
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 Font
The font that we're displaying.protected int
The number of characters in the font.protected final int
The number of characters displayed in a row.protected int
Number of rows needed to display the whole font.Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
getColumnClass
(int index) Return the column classes.int
Returns the number of columns.getColumnName
(int index) Return the column names.int
Returns the number of records managed by the data source object.getValueAt
(int row, int column) Return the value of a given cell.boolean
isCellEditable
(int row, int column) Nothing is editable.void
Set the displayed font.void
setValueAt
(Object value, int row, int column) Since nothing can be changed.Methods inherited from class javax.swing.table.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:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
getColumnClass
Return the column classes. All Strings.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column) Nothing is editable.- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
setValueAt
Since nothing can be changed. This also does nothing.- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-