charvax.swing.table

Class TableHeader


public class TableHeader
extends Component

The TableHeader class is used by the ScrollPane for drawing the column headers of a table. It shares the TableModel of its companion Table object.

Field Summary

Fields inherited from class charva.awt.Component

BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT, _alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible

Constructor Summary

TableHeader(TableModel model_)
Constructs a table of numRows_ and numColumns_ of empty cells using a DefaultTableModel.

Method Summary

void
debug(int level_)
void
draw()
int
getHeight()
Dimension
getSize()
We pretend that the table header is two rows in height so that the box gets drawn correctly.
int
getWidth()
boolean
isFocusTraversable()
Dimension
minimumSize()
void
requestFocus()
void
setModel(TableModel model_)

Methods inherited from class charva.awt.Component

addFocusListener, addKeyListener, contains, contains, debug, draw, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getHeight, getLocation, getLocationOnScreen, getName, getParent, getSize, getWidth, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isTotallyObscured, isValid, isVisible, minimumSize, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, repaint, requestFocus, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor

Constructor Details

TableHeader

public TableHeader(TableModel model_)
Constructs a table of numRows_ and numColumns_ of empty cells using a DefaultTableModel.

Method Details

debug

public void debug(int level_)
Overrides:
debug in interface Component

draw

public void draw()
Overrides:
draw in interface Component

getHeight

public int getHeight()
Overrides:
getHeight in interface Component

getSize

public Dimension getSize()
We pretend that the table header is two rows in height so that the box gets drawn correctly.
Overrides:
getSize in interface Component

getWidth

public int getWidth()
Overrides:
getWidth in interface Component

isFocusTraversable

public boolean isFocusTraversable()
Overrides:
isFocusTraversable in interface Component

minimumSize

public Dimension minimumSize()
Overrides:
minimumSize in interface Component

requestFocus

public void requestFocus()
Overrides:
requestFocus in interface Component

setModel

public void setModel(TableModel model_)