javax.swing.plaf.basic

Class BasicTableHeaderUI

public class BasicTableHeaderUI extends TableHeaderUI

Basic pluggable look and feel interface for JTableHeader.
Nested Class Summary
classBasicTableHeaderUI.MouseInputHandler
Handles column movement and rearrangement by mouse.
Field Summary
protected JTableHeaderheader
The table header that is using this interface.
protected MouseInputListenermouseInputListener
The mouse input listener, responsible for mouse manipulations with the table header.
protected CellRendererPanerendererPane
Paint the header cell.
Constructor Summary
BasicTableHeaderUI()
Construct a new BasicTableHeaderUI, create mouse listeners.
Method Summary
protected MouseInputListenercreateMouseInputListener()
Create and return the mouse input listener.
static ComponentUIcreateUI(JComponent h)
DimensiongetPreferredSize(JComponent ignored)
Get the preferred header size.
protected voidinstallDefaults()
protected voidinstallKeyboardActions()
protected voidinstallListeners()
Add the mouse listener and the mouse motion listener to the table header.
voidinstallUI(JComponent c)
voidpaint(Graphics gfx, JComponent c)
Repaint the table header.
protected voiduninstallDefaults()
protected voiduninstallKeyboardActions()
protected voiduninstallListeners()
Remove the previously installed listeners.
voiduninstallUI(JComponent c)

Field Detail

header

protected JTableHeader header
The table header that is using this interface.

mouseInputListener

protected MouseInputListener mouseInputListener
The mouse input listener, responsible for mouse manipulations with the table header.

rendererPane

protected CellRendererPane rendererPane
Paint the header cell.

Constructor Detail

BasicTableHeaderUI

public BasicTableHeaderUI()
Construct a new BasicTableHeaderUI, create mouse listeners.

Method Detail

createMouseInputListener

protected MouseInputListener createMouseInputListener()
Create and return the mouse input listener.

Returns: the mouse listener ({@link MouseInputHandler}, if not overridden.

createUI

public static ComponentUI createUI(JComponent h)

getPreferredSize

public Dimension getPreferredSize(JComponent ignored)
Get the preferred header size.

Parameters: ignored unused

Returns: the preferred size of the associated header.

installDefaults

protected void installDefaults()

installKeyboardActions

protected void installKeyboardActions()

installListeners

protected void installListeners()
Add the mouse listener and the mouse motion listener to the table header. The listeners support table column resizing and rearrangement by mouse.

installUI

public void installUI(JComponent c)

paint

public void paint(Graphics gfx, JComponent c)
Repaint the table header.

uninstallDefaults

protected void uninstallDefaults()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

uninstallListeners

protected void uninstallListeners()
Remove the previously installed listeners.

uninstallUI

public void uninstallUI(JComponent c)