javax.swing.plaf.basic
Class BasicTableHeaderUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.TableHeaderUI sample code for javax.swing.plaf.TableHeaderUI definition code for javax.swing.plaf.TableHeaderUI 
          extended by javax.swing.plaf.basic.BasicTableHeaderUI

public class BasicTableHeaderUI
extends TableHeaderUI sample code for javax.swing.plaf.TableHeaderUI definition code for javax.swing.plaf.TableHeaderUI

BasicTableHeaderUI implementation


Nested Class Summary
 class BasicTableHeaderUI.MouseInputHandler sample code for javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler definition code for javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler
          This inner class is marked "public" due to a compiler bug.
 
Field Summary
protected  JTableHeader sample code for javax.swing.table.JTableHeader definition code for javax.swing.table.JTableHeader header sample code for javax.swing.plaf.basic.BasicTableHeaderUI.header definition code for javax.swing.plaf.basic.BasicTableHeaderUI.header
          The JTableHeader that is delegating the painting to this UI.
protected  MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener mouseInputListener sample code for javax.swing.plaf.basic.BasicTableHeaderUI.mouseInputListener definition code for javax.swing.plaf.basic.BasicTableHeaderUI.mouseInputListener
           
protected  CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane rendererPane sample code for javax.swing.plaf.basic.BasicTableHeaderUI.rendererPane definition code for javax.swing.plaf.basic.BasicTableHeaderUI.rendererPane
           
 
Constructor Summary
BasicTableHeaderUI sample code for javax.swing.plaf.basic.BasicTableHeaderUI.BasicTableHeaderUI() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.BasicTableHeaderUI() ()
           
 
Method Summary
protected  MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener createMouseInputListener sample code for javax.swing.plaf.basic.BasicTableHeaderUI.createMouseInputListener() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.createMouseInputListener() ()
          Creates the mouse listener for the JTable.
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicTableHeaderUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  h)
           
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMaximumSize sample code for javax.swing.plaf.basic.BasicTableHeaderUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.getMaximumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Return the maximum size of the header.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for javax.swing.plaf.basic.BasicTableHeaderUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.getMinimumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Return the minimum size of the header.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Return the preferred size of the header.
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.installDefaults() ()
          Initialize JTableHeader properties, e.g.
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.installKeyboardActions() ()
          Register all keyboard actions on the JTableHeader.
protected  void installListeners sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installListeners() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.installListeners() ()
          Attaches listeners to the JTableHeader.
 void installUI sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.installUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Configures the specified component appropriate for the look and feel.
 void paint sample code for javax.swing.plaf.basic.BasicTableHeaderUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.paint(java.awt.Graphics, javax.swing.JComponent) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Paints the specified component appropriate for the look and feel.
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallDefaults() ()
           
protected  void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallKeyboardActions() ()
           
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallListeners() ()
           
 void uninstallUI sample code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Reverses configuration which was done on the specified component during installUI.
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) , update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

header sample code for javax.swing.plaf.basic.BasicTableHeaderUI.header

protected JTableHeader sample code for javax.swing.table.JTableHeader definition code for javax.swing.table.JTableHeader  header
The JTableHeader that is delegating the painting to this UI.


rendererPane sample code for javax.swing.plaf.basic.BasicTableHeaderUI.rendererPane

protected CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane  rendererPane

mouseInputListener sample code for javax.swing.plaf.basic.BasicTableHeaderUI.mouseInputListener

protected MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener  mouseInputListener
Constructor Detail

BasicTableHeaderUI sample code for javax.swing.plaf.basic.BasicTableHeaderUI() definition code for javax.swing.plaf.basic.BasicTableHeaderUI()

public BasicTableHeaderUI()
Method Detail

createMouseInputListener sample code for javax.swing.plaf.basic.BasicTableHeaderUI.createMouseInputListener() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.createMouseInputListener()

protected MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener  createMouseInputListener()
Creates the mouse listener for the JTable.


createUI sample code for javax.swing.plaf.basic.BasicTableHeaderUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  h)

installUI sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.installUI(javax.swing.JComponent)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent)
Configures the specified component appropriate for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
  1. Install any default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.

Overrides:
installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) , JComponent.setUI(javax.swing.plaf.ComponentUI) sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

installDefaults sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.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.

See Also:
installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.installUI(javax.swing.JComponent)

installListeners sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installListeners() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.installListeners()

protected void installListeners()
Attaches listeners to the JTableHeader.


installKeyboardActions sample code for javax.swing.plaf.basic.BasicTableHeaderUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.installKeyboardActions()

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


uninstallUI sample code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallUI(javax.swing.JComponent)

public void uninstallUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent)
Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
  1. Remove any UI-set borders from the component.
  2. Remove any UI-set layout managers on the component.
  3. Remove any UI-added sub-components from the component.
  4. Remove any UI-added event/property listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Nullify any allocated instance data objects to allow for GC.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

uninstallDefaults sample code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallDefaults()

protected void uninstallDefaults()

uninstallListeners sample code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallListeners()

protected void uninstallListeners()

uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicTableHeaderUI.uninstallKeyboardActions()

protected void uninstallKeyboardActions()

paint sample code for javax.swing.plaf.basic.BasicTableHeaderUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.paint(java.awt.Graphics, javax.swing.JComponent)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                  JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
Paints the specified component appropriate for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

Overrides:
paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
g - the Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

getMinimumSize sample code for javax.swing.plaf.basic.BasicTableHeaderUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.getMinimumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.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 sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
a Dimension object or null
See Also:
JComponent.getMinimumSize() sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , LayoutManager.minimumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) , ComponentUI.getPreferredSize(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)

getPreferredSize sample code for javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.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 sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
JComponent.getPreferredSize() sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , LayoutManager.preferredLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)

getMaximumSize sample code for javax.swing.plaf.basic.BasicTableHeaderUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableHeaderUI.getMaximumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMaximumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.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 sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
a Dimension object or null
See Also:
JComponent.getMaximumSize() sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , LayoutManager2.maximumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container)