charvax.swing.table
Class TableHeader

java.lang.Object
  extended bycharva.awt.Component
      extended bycharvax.swing.table.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
_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
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()
          To be implemented by concrete subclasses.
 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()
          Indicates whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal.
 Dimension minimumSize()
           
 void requestFocus()
          This method should be invoked by all subclasses of Component which override this method; because this method generates the FOCUS_GAINED event when the component gains the keyboard focus.
 void setModel(TableModel model_)
           
 
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, isTotallyObscured, isValid, isVisible, processEvent, processFocusEvent, processKeyEvent, 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
 

Constructor Detail

TableHeader

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

Method Detail

setModel

public void setModel(TableModel model_)

isFocusTraversable

public boolean isFocusTraversable()
Description copied from class: Component
Indicates whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal. If this method returns "false" it can still request focus using requestFocus(), but it will not automatically be assigned focus during keyboard focus traversal.

Overrides:
isFocusTraversable in class Component

requestFocus

public void requestFocus()
Description copied from class: Component
This method should be invoked by all subclasses of Component which override this method; because this method generates the FOCUS_GAINED event when the component gains the keyboard focus.

Overrides:
requestFocus in class Component

draw

public void draw()
Description copied from class: Component
To be implemented by concrete subclasses.

Specified by:
draw in class Component

getSize

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

Specified by:
getSize in class Component

minimumSize

public Dimension minimumSize()
Specified by:
minimumSize in class Component

getWidth

public int getWidth()
Specified by:
getWidth in class Component

getHeight

public int getHeight()
Specified by:
getHeight in class Component

debug

public void debug(int level_)
Specified by:
debug in class Component