Example usage for Java javax.swing.table JTableHeader fields, constructors, methods, implement or subclass
The text is from its open source code.
JTableHeader(TableColumnModel cm) Constructs a JTableHeader which is initialized with cm as the column model. | |
JTableHeader() Constructs a JTableHeader with a default TableColumnModel . |
Component | add(String name, Component comp) Adds the specified component to this container. |
void | addMouseListener(MouseListener l) Adds the specified mouse listener to receive mouse events from this component. |
void | addMouseMotionListener(MouseMotionListener l) Adds the specified mouse motion listener to receive mouse motion events from this component. |
int | columnAtPoint(Point point) Returns the index of the column that point lies in, or -1 if it lies out of bounds. |
Color | getBackground() Gets the background color of this component. |
TableColumnModel | getColumnModel() Returns the TableColumnModel that contains all column information of this table header. |
TableCellRenderer | getDefaultRenderer() Returns the default renderer used when no headerRenderer is defined by a TableColumn . |
int | getDraggedDistance() Returns the column's horizontal distance from its original position, if and only if, a drag is in process. |
Font | getFont() Gets the font of this component. |
Color | getForeground() Gets the foreground color of this component. |
int | getHeight() Returns the current height of this component. |
Dimension | getPreferredSize() Returns the preferred size of the table header. |
boolean | getReorderingAllowed() Returns true if the user is allowed to rearrange columns by dragging their headers, false otherwise. |
TableColumn | getResizingColumn() Returns the resizing column. |
JTable | getTable() Returns the table associated with this header. |
int | getWidth() Returns the current width of this component. |
void | paint(Graphics g) Invoked by Swing to draw components. |
void | removeMouseListener(MouseListener l) Removes the specified mouse listener so that it no longer receives mouse events from this component. |
void | repaint() Repaints this component. |
void | resizeAndRepaint() Sizes the header and marks it as needing display. |
void | setBackground(Color bg) Sets the background color of this component. |
void | setColumnModel(TableColumnModel columnModel) Sets the column model for this table to newModel and registers for listener notifications from the new column model. |
void | setDefaultRenderer(TableCellRenderer defaultRenderer) Sets the default renderer to be used when no headerRenderer is defined by a TableColumn . |
void | setFont(Font font) Sets the font for this component. |
void | setForeground(Color fg) Sets the foreground color of this component. |
void | setLayout(LayoutManager mgr) Sets the layout manager for this container. |
void | setOpaque(boolean isOpaque) If true the component paints every pixel within its bounds. |
void | setPreferredSize(Dimension preferredSize) Sets the preferred size of this component. |
void | setReorderingAllowed(boolean reorderingAllowed) Sets whether the user can drag column headers to reorder columns. |
void | setResizingAllowed(boolean resizingAllowed) Sets whether the user can resize columns by dragging between headers. |
void | setSize(int width, int height) Resizes this component so that it has width width and height height . |
void | setToolTipText(String text) Registers the text to display in a tool tip. |
void | setUpdateTableInRealTime(boolean flag) Obsolete as of Java 2 platform v1.3. |