Java javax.swing.table JTableHeader fields, constructors, methods, implement or subclass

Example usage for Java javax.swing.table JTableHeader fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing.table JTableHeader.

The text is from its open source code.

Subclass

javax.swing.table.JTableHeader has subclasses.
Click this link to see all its subclasses.

Constructor

JTableHeader(TableColumnModel cm)
Constructs a JTableHeader which is initialized with cm as the column model.
JTableHeader()
Constructs a JTableHeader with a default TableColumnModel.

Method

Componentadd(String name, Component comp)
Adds the specified component to this container.
voidaddMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component.
voidaddMouseMotionListener(MouseMotionListener l)
Adds the specified mouse motion listener to receive mouse motion events from this component.
intcolumnAtPoint(Point point)
Returns the index of the column that point lies in, or -1 if it lies out of bounds.
ColorgetBackground()
Gets the background color of this component.
TableColumnModelgetColumnModel()
Returns the TableColumnModel that contains all column information of this table header.
TableCellRenderergetDefaultRenderer()
Returns the default renderer used when no headerRenderer is defined by a TableColumn.
intgetDraggedDistance()
Returns the column's horizontal distance from its original position, if and only if, a drag is in process.
FontgetFont()
Gets the font of this component.
ColorgetForeground()
Gets the foreground color of this component.
intgetHeight()
Returns the current height of this component.
DimensiongetPreferredSize()
Returns the preferred size of the table header.
booleangetReorderingAllowed()
Returns true if the user is allowed to rearrange columns by dragging their headers, false otherwise.
TableColumngetResizingColumn()
Returns the resizing column.
JTablegetTable()
Returns the table associated with this header.
intgetWidth()
Returns the current width of this component.
voidpaint(Graphics g)
Invoked by Swing to draw components.
voidremoveMouseListener(MouseListener l)
Removes the specified mouse listener so that it no longer receives mouse events from this component.
voidrepaint()
Repaints this component.
voidresizeAndRepaint()
Sizes the header and marks it as needing display.
voidsetBackground(Color bg)
Sets the background color of this component.
voidsetColumnModel(TableColumnModel columnModel)
Sets the column model for this table to newModel and registers for listener notifications from the new column model.
voidsetDefaultRenderer(TableCellRenderer defaultRenderer)
Sets the default renderer to be used when no headerRenderer is defined by a TableColumn.
voidsetFont(Font font)
Sets the font for this component.
voidsetForeground(Color fg)
Sets the foreground color of this component.
voidsetLayout(LayoutManager mgr)
Sets the layout manager for this container.
voidsetOpaque(boolean isOpaque)
If true the component paints every pixel within its bounds.
voidsetPreferredSize(Dimension preferredSize)
Sets the preferred size of this component.
voidsetReorderingAllowed(boolean reorderingAllowed)
Sets whether the user can drag column headers to reorder columns.
voidsetResizingAllowed(boolean resizingAllowed)
Sets whether the user can resize columns by dragging between headers.
voidsetSize(int width, int height)
Resizes this component so that it has width width and height height .
voidsetToolTipText(String text)
Registers the text to display in a tool tip.
voidsetUpdateTableInRealTime(boolean flag)
Obsolete as of Java 2 platform v1.3.