|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcharva.awt.Component
charvax.swing.JComponent
charvax.swing.JTable
GUI.ColouredJTable
public class ColouredJTable
JTable is a user-interface component that displays data in a two- dimensional table format.
The user-interface works as follows:
The user can select a column by pressing the left or right arrow keys
to move to the desired column, and then pressing ENTER.
He/she can select a row by pressing the up and down arrow keys to move to
the desired row, then pressing ENTER.
Depending on the value of the selection mode, multiple rows and/or columns
may be selected. By default the selection mode is set to SINGLE_SELECTION
so that only a single row or column can be selected at a time. Selection
of rows and/or columns can be enabled/disabled by means of the
setRowSelectionAllowed() and setColumnSelectionAllowed() methods.
| Field Summary |
|---|
| Fields inherited from class charvax.swing.JTable |
|---|
_columnSelectionModel, _rowSelectionModel |
| Fields inherited from class charvax.swing.JComponent |
|---|
_border |
| Fields inherited from class charva.awt.Component |
|---|
_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Constructor Summary | |
|---|---|
ColouredJTable()
Default constructor |
|
ColouredJTable(charvax.swing.table.TableModel model_)
Construct a JTable with the specified data model. |
|
| Method Summary | |
|---|---|
void |
draw()
|
boolean |
getColumnSelectionAllowed()
Returns true if columns can be selected; otherwise false. |
boolean |
getRowSelectionAllowed()
Returns true if rows can be selected; otherwise false. |
java.lang.Object |
getValueAt(int row_,
int column_)
|
void |
processKeyEvent(charva.awt.event.KeyEvent ke_)
|
void |
setColumnSelectionAllowed(boolean allowed_)
Set whether selection of columns is allowed. |
void |
setRowSelectionAllowed(boolean allowed_)
Set whether selection of rows is allowed. |
| Methods inherited from class charvax.swing.JTable |
|---|
addColumnSelectionInterval, addRowSelectionInterval, addScrollListener, debug, getHeight, getModel, getPreferredScrollableViewportSize, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionMode, getSelectionModel, getSize, getWidth, isColumnSelected, isRowSelected, minimumSize, processScrollEvent, removeScrollListener, requestFocus, setColumnSelectionInterval, setModel, setPreferredScrollableViewportSize, setRowSelectionInterval, setSelectionMode, setSelectionModel, setValueAt, tableChanged, valueChanged |
| Methods inherited from class charvax.swing.JComponent |
|---|
getBorder, getInsets, setBorder |
| Methods inherited from class charva.awt.Component |
|---|
addFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isTotallyObscured, isValid, isVisible, processEvent, processFocusEvent, processMouseEvent, repaint, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface charvax.swing.event.TableModelListener |
|---|
tableChanged |
| Methods inherited from interface charva.awt.Scrollable |
|---|
addScrollListener, getLocation, getPreferredScrollableViewportSize, processScrollEvent, removeScrollListener |
| Methods inherited from interface charvax.swing.event.ListSelectionListener |
|---|
valueChanged |
| Constructor Detail |
|---|
public ColouredJTable()
public ColouredJTable(charvax.swing.table.TableModel model_)
| Method Detail |
|---|
public java.lang.Object getValueAt(int row_,
int column_)
getValueAt in class charvax.swing.JTablepublic void draw()
draw in class charvax.swing.JTablepublic void processKeyEvent(charva.awt.event.KeyEvent ke_)
processKeyEvent in class charvax.swing.JTablepublic void setColumnSelectionAllowed(boolean allowed_)
setColumnSelectionAllowed in class charvax.swing.JTablepublic boolean getColumnSelectionAllowed()
getColumnSelectionAllowed in class charvax.swing.JTablepublic void setRowSelectionAllowed(boolean allowed_)
setRowSelectionAllowed in class charvax.swing.JTablepublic boolean getRowSelectionAllowed()
getRowSelectionAllowed in class charvax.swing.JTable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||