This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.plaf.basic
class BasicTableHeaderUI

java.lang.Object extended by javax.swing.plaf.ComponentUI extended by javax.swing.plaf.TableHeaderUI extended by javax.swing.plaf.basic.BasicTableHeaderUI

public class BasicTableHeaderUI
extends TableHeaderUI

BasicTableHeaderUI implementation


Nested Class Summary
 class

           This inner class is marked "public" due to a compiler bug.
 
Field Summary
protected JTableHeader header
          The JTableHeader that is delegating the painting to this UI.
protected MouseInputListener mouseInputListener
          
protected CellRendererPane rendererPane
          
 
Constructor Summary

          
 
Method Summary
protected MouseInputListener

          Creates the mouse listener for the JTableHeader.
static ComponentUI

          
 int
getBaseline(JComponent c, int width, int height)

          Returns the baseline.
 Dimension

          Return the maximum size of the header.
 Dimension

          Return the minimum size of the header.
 Dimension

          Return the preferred size of the header.
protected int

          Returns the index of the column header over which the mouse currently is.
protected void

          Initialize JTableHeader properties, e.g.
protected void

          Register all keyboard actions on the JTableHeader.
protected void

          Attaches listeners to the JTableHeader.
 void

          Configures the specified component appropriate for the look and feel.
 void

          Paints the specified component appropriate for the look and feel.
protected void
rolloverColumnUpdated(int oldColumn, int newColumn)

          This method gets called every time the rollover column in the table header is updated.
protected void

          
protected void

          Unregisters default key actions.
protected void

          
 void

          Reverses configuration which was done on the specified component during installUI.
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

header

protected JTableHeader header
The JTableHeader that is delegating the painting to this UI.

mouseInputListener

protected MouseInputListener mouseInputListener

rendererPane

protected CellRendererPane rendererPane
Constructor Detail

BasicTableHeaderUI

public BasicTableHeaderUI()
Method Detail

createMouseInputListener

protected MouseInputListener createMouseInputListener()
Creates the mouse listener for the JTableHeader.


createUI

public static ComponentUI createUI(JComponent h)
Parameters:
h

getBaseline

public int getBaseline(JComponent c,
                       int width,
                       int height)
Returns the baseline.

Overrides:
getBaseline in class ComponentUI
Parameters:
c
width
height

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Return the maximum size of the header. The maximum width is the sum of the maximum widths of each column (plus inter-cell spacing).

Overrides:
getMaximumSize in class ComponentUI
Parameters:
c

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Return the minimum size of the header. The minimum width is the sum of the minimum widths of each column (plus inter-cell spacing).

Overrides:
getMinimumSize in class ComponentUI
Parameters:
c

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Return the preferred size of the header. The preferred height is the maximum of the preferred heights of all of the components provided by the header renderers. The preferred width is the sum of the preferred widths of each column (plus inter-cell spacing).

Overrides:
getPreferredSize in class ComponentUI
Parameters:
c

getRolloverColumn

protected int getRolloverColumn()
Returns the index of the column header over which the mouse currently is. When the mouse is not over the table header, -1 is returned.

Returns:
the index of the current rollover column

installDefaults

protected void installDefaults()
Initialize JTableHeader properties, e.g. font, foreground, and background. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.


installKeyboardActions

protected void installKeyboardActions()
Register all keyboard actions on the JTableHeader.


installListeners

protected void installListeners()
Attaches listeners to the JTableHeader.


installUI

public void installUI(JComponent c)
Overrides:
installUI in class ComponentUI
Parameters:
c

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class ComponentUI
Parameters:
g
c

rolloverColumnUpdated

protected void rolloverColumnUpdated(int oldColumn,
                                     int newColumn)
This method gets called every time the rollover column in the table header is updated. Every look and feel supporting rollover effect in table header should override this method and repaint the header.

Parameters:
oldColumn - the index of the previous rollover column or -1 if the mouse was not over a column
newColumn - the index of the new rollover column or -1 if the mouse is not over a column

uninstallDefaults

protected void uninstallDefaults()

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Unregisters default key actions.


uninstallListeners

protected void uninstallListeners()

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class ComponentUI
Parameters:
c


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.