javax.swing.plaf.basic
Class BasicTableUI

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.TableUI sample code for javax.swing.plaf.TableUI definition code for javax.swing.plaf.TableUI 
          extended by javax.swing.plaf.basic.BasicTableUI

public class BasicTableUI
extends TableUI sample code for javax.swing.plaf.TableUI definition code for javax.swing.plaf.TableUI

BasicTableUI implementation


Nested Class Summary
 class BasicTableUI.FocusHandler sample code for javax.swing.plaf.basic.BasicTableUI.FocusHandler definition code for javax.swing.plaf.basic.BasicTableUI.FocusHandler
          This inner class is marked "public" due to a compiler bug.
 class BasicTableUI.KeyHandler sample code for javax.swing.plaf.basic.BasicTableUI.KeyHandler definition code for javax.swing.plaf.basic.BasicTableUI.KeyHandler
          This inner class is marked "public" due to a compiler bug.
 class BasicTableUI.MouseInputHandler sample code for javax.swing.plaf.basic.BasicTableUI.MouseInputHandler definition code for javax.swing.plaf.basic.BasicTableUI.MouseInputHandler
          This inner class is marked "public" due to a compiler bug.
 
Field Summary
protected  FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener focusListener sample code for javax.swing.plaf.basic.BasicTableUI.focusListener definition code for javax.swing.plaf.basic.BasicTableUI.focusListener
           
protected  KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener keyListener sample code for javax.swing.plaf.basic.BasicTableUI.keyListener definition code for javax.swing.plaf.basic.BasicTableUI.keyListener
           
protected  MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener mouseInputListener sample code for javax.swing.plaf.basic.BasicTableUI.mouseInputListener definition code for javax.swing.plaf.basic.BasicTableUI.mouseInputListener
           
protected  CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane rendererPane sample code for javax.swing.plaf.basic.BasicTableUI.rendererPane definition code for javax.swing.plaf.basic.BasicTableUI.rendererPane
           
protected  JTable sample code for javax.swing.JTable definition code for javax.swing.JTable table sample code for javax.swing.plaf.basic.BasicTableUI.table definition code for javax.swing.plaf.basic.BasicTableUI.table
           
 
Constructor Summary
BasicTableUI sample code for javax.swing.plaf.basic.BasicTableUI.BasicTableUI() definition code for javax.swing.plaf.basic.BasicTableUI.BasicTableUI() ()
           
 
Method Summary
protected  FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener createFocusListener sample code for javax.swing.plaf.basic.BasicTableUI.createFocusListener() definition code for javax.swing.plaf.basic.BasicTableUI.createFocusListener() ()
          Creates the focus listener for handling keyboard navigation in the JTable.
protected  KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener createKeyListener sample code for javax.swing.plaf.basic.BasicTableUI.createKeyListener() definition code for javax.swing.plaf.basic.BasicTableUI.createKeyListener() ()
          Creates the key listener for handling keyboard navigation in the JTable.
protected  MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener createMouseInputListener sample code for javax.swing.plaf.basic.BasicTableUI.createMouseInputListener() definition code for javax.swing.plaf.basic.BasicTableUI.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.BasicTableUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
           
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMaximumSize sample code for javax.swing.plaf.basic.BasicTableUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.getMaximumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Return the maximum size of the table.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for javax.swing.plaf.basic.BasicTableUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.getMinimumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Return the minimum size of the table.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for javax.swing.plaf.basic.BasicTableUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.getPreferredSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Return the preferred size of the table.
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicTableUI.installDefaults() definition code for javax.swing.plaf.basic.BasicTableUI.installDefaults() ()
          Initialize JTable properties, e.g.
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicTableUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicTableUI.installKeyboardActions() ()
          Register all keyboard actions on the JTable.
protected  void installListeners sample code for javax.swing.plaf.basic.BasicTableUI.installListeners() definition code for javax.swing.plaf.basic.BasicTableUI.installListeners() ()
          Attaches listeners to the JTable.
 void installUI sample code for javax.swing.plaf.basic.BasicTableUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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.BasicTableUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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)
          Paint a representation of the table instance that was set in installUI().
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicTableUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTableUI.uninstallDefaults() ()
           
protected  void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicTableUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicTableUI.uninstallKeyboardActions() ()
           
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicTableUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicTableUI.uninstallListeners() ()
           
 void uninstallUI sample code for javax.swing.plaf.basic.BasicTableUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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

table sample code for javax.swing.plaf.basic.BasicTableUI.table

protected JTable sample code for javax.swing.JTable definition code for javax.swing.JTable  table

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

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

keyListener sample code for javax.swing.plaf.basic.BasicTableUI.keyListener

protected KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener  keyListener

focusListener sample code for javax.swing.plaf.basic.BasicTableUI.focusListener

protected FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener  focusListener

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

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

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

public BasicTableUI()
Method Detail

createKeyListener sample code for javax.swing.plaf.basic.BasicTableUI.createKeyListener() definition code for javax.swing.plaf.basic.BasicTableUI.createKeyListener()

protected KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener  createKeyListener()
Creates the key listener for handling keyboard navigation in the JTable.


createFocusListener sample code for javax.swing.plaf.basic.BasicTableUI.createFocusListener() definition code for javax.swing.plaf.basic.BasicTableUI.createFocusListener()

protected FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener  createFocusListener()
Creates the focus listener for handling keyboard navigation in the JTable.


createMouseInputListener sample code for javax.swing.plaf.basic.BasicTableUI.createMouseInputListener() definition code for javax.swing.plaf.basic.BasicTableUI.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.BasicTableUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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  c)

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

protected void installDefaults()
Initialize JTable 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.BasicTableUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.installUI(javax.swing.JComponent)

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

protected void installListeners()
Attaches listeners to the JTable.


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

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


uninstallUI sample code for javax.swing.plaf.basic.BasicTableUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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.BasicTableUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicTableUI.uninstallDefaults()

protected void uninstallDefaults()

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

protected void uninstallListeners()

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

protected void uninstallKeyboardActions()

getMinimumSize sample code for javax.swing.plaf.basic.BasicTableUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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 table. The minimum height is the row height times the number of rows. The minimum width is the sum of the minimum widths of each column.

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.BasicTableUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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 table. The preferred height is the row height times the number of rows. The preferred width is the sum of the preferred widths of each column.

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.BasicTableUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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 table. The maximum height is the row heighttimes the number of rows. The maximum width is the sum of the maximum widths of each column.

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)

paint sample code for javax.swing.plaf.basic.BasicTableUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicTableUI.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)
Paint a representation of the table instance that was set in installUI().

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)