javax.swing.plaf.basic
Class BasicTableUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.TableUI
          extended by javax.swing.plaf.basic.BasicTableUI

public class BasicTableUI
extends TableUI


Nested Class Summary
 class BasicTableUI.FocusHandler
           
 class BasicTableUI.KeyHandler
          Handles key events for the JTable.
 class BasicTableUI.MouseInputHandler
           
 
Field Summary
protected  FocusListener focusListener
           
protected  KeyListener keyListener
           
protected  MouseInputListener mouseInputListener
           
protected  CellRendererPane rendererPane
           
protected  JTable table
           
 
Constructor Summary
BasicTableUI()
           
 
Method Summary
protected  FocusListener createFocusListener()
           
protected  KeyListener createKeyListener()
          Creates and returns a key listener for the JTable.
protected  MouseInputListener createMouseInputListener()
           
static ComponentUI createUI(JComponent comp)
           
 Dimension getMaximumSize(JComponent comp)
          Return the maximum size of the table.
 Dimension getMinimumSize(JComponent comp)
          Return the minimum size of the table.
 Dimension getPreferredSize(JComponent comp)
          Returns the preferred size for the table of that UI.
protected  void installDefaults()
           
protected  void installKeyboardActions()
          Installs keyboard actions on the table.
protected  void installListeners()
           
 void installUI(JComponent comp)
          Sets up the specified component so it conforms the the design guidelines of the implemented look and feel.
 void paint(Graphics gfx, JComponent ignored)
          Paint the associated table.
protected  void uninstallDefaults()
          Uninstalls UI defaults that have been installed by installDefaults().
protected  void uninstallKeyboardActions()
          Uninstalls the keyboard actions that have been installed by installKeyboardActions().
protected  void uninstallListeners()
           
 void uninstallUI(JComponent c)
          Puts the specified component into the state it had before ComponentUI.installUI(javax.swing.JComponent) was called.
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

focusListener

protected FocusListener focusListener

keyListener

protected KeyListener keyListener

mouseInputListener

protected MouseInputListener mouseInputListener

rendererPane

protected CellRendererPane rendererPane

table

protected JTable table
Constructor Detail

BasicTableUI

public BasicTableUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent comp)

createFocusListener

protected FocusListener createFocusListener()

createMouseInputListener

protected MouseInputListener createMouseInputListener()

createKeyListener

protected KeyListener createKeyListener()
Creates and returns a key listener for the JTable.

Returns:
a key listener for the JTable

getMaximumSize

public Dimension getMaximumSize(JComponent comp)
Return the maximum size of the table. The maximum height is the row height times the number of rows. The maximum width is the sum of the maximum widths of each column.

Overrides:
getMaximumSize in class ComponentUI
Parameters:
comp - the component whose maximum size is being queried, this is ignored.
Returns:
a Dimension object representing the maximum size of the table, or null if the table has no elements.

getMinimumSize

public Dimension getMinimumSize(JComponent comp)
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 in class ComponentUI
Parameters:
comp - the component whose minimum size is being queried, this is ignored.
Returns:
a Dimension object representing the minimum size of the table, or null if the table has no elements.

getPreferredSize

public Dimension getPreferredSize(JComponent comp)
Returns the preferred size for the table of that UI.

Overrides:
getPreferredSize in class ComponentUI
Parameters:
comp - ignored, the table field is used instead
Returns:
the preferred size for the table of that UI

installDefaults

protected void installDefaults()

installKeyboardActions

protected void installKeyboardActions()
Installs keyboard actions on the table.


installListeners

protected void installListeners()

uninstallDefaults

protected void uninstallDefaults()
Uninstalls UI defaults that have been installed by installDefaults().


uninstallKeyboardActions

protected void uninstallKeyboardActions()
Uninstalls the keyboard actions that have been installed by installKeyboardActions().


uninstallListeners

protected void uninstallListeners()

installUI

public void installUI(JComponent comp)
Description copied from class: ComponentUI
Sets up the specified component so it conforms the the design guidelines of the implemented look and feel. When the look and feel changes, a ComponentUI delegate is created. The delegate object then receives an installUI message.

This method should perform the following tasks:

Overrides:
installUI in class ComponentUI
Parameters:
comp - the component for which this delegate will provide services.
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallUI

public void uninstallUI(JComponent c)
Description copied from class: ComponentUI
Puts the specified component into the state it had before ComponentUI.installUI(javax.swing.JComponent) was called.

Overrides:
uninstallUI in class ComponentUI
Parameters:
c - the component for which this delegate has provided services.
See Also:
ComponentUI.installUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

paint

public void paint(Graphics gfx,
                  JComponent ignored)
Paint the associated table.

Overrides:
paint in class ComponentUI
Parameters:
gfx - the graphics for painting.
ignored - the component for which this delegate performs services.