站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Java(TM) 2 Platform, Standard Edition, v1.2.2 API Specification: Class BasicTableUI - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

JavaTM 2 Platform
Standard Edition

javax.swing.plaf.basic
Class BasicTableUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TableUI
              |
              +--javax.swing.plaf.basic.BasicTableUI

public class BasicTableUI
extends TableUI

BasicTableUI implementation


Inner Class Summary
 class BasicTableUI.FocusHandler
          This inner class is marked "public" due to a compiler bug.
 class BasicTableUI.KeyHandler
          This inner class is marked "public" due to a compiler bug.
 class BasicTableUI.MouseInputHandler
          This inner class is marked "public" due to a compiler bug.
 
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()
          Creates the focus listener for handling keyboard navigation in the JTable.
protected  KeyListener createKeyListener()
          Creates the key listener for handling keyboard navigation in the JTable.
protected  MouseInputListener createMouseInputListener()
          Creates the mouse listener for the JTable.
static ComponentUI createUI(JComponent c)
           
 Dimension getMaximumSize(JComponent c)
          Return the maximum size of the table.
 Dimension getMinimumSize(JComponent c)
          Return the minimum size of the table.
 Dimension getPreferredSize(JComponent c)
          Return the preferred size of the table.
protected  void installDefaults()
          Initialize JTable properties, e.g.
protected  void installKeyboardActions()
          Register all keyboard actions on the JTable.
protected  void installListeners()
          Attaches listeners to the JTable.
 void installUI(JComponent c)
           
 void paint(Graphics g, JComponent c)
          Paint a representation of the table instance that was set in installUI().
protected  void uninstallDefaults()
           
protected  void uninstallKeyboardActions()
           
protected  void uninstallListeners()
           
 void uninstallUI(JComponent c)
           
 
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

table

protected JTable table

rendererPane

protected CellRendererPane rendererPane

keyListener

protected KeyListener keyListener

focusListener

protected FocusListener focusListener

mouseInputListener

protected MouseInputListener mouseInputListener
Constructor Detail

BasicTableUI

public BasicTableUI()
Method Detail

createKeyListener

protected KeyListener createKeyListener()
Creates the key listener for handling keyboard navigation in the JTable.

createFocusListener

protected FocusListener createFocusListener()
Creates the focus listener for handling keyboard navigation in the JTable.

createMouseInputListener

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

createUI

public static ComponentUI createUI(JComponent c)

installUI

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

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)

installListeners

protected void installListeners()
Attaches listeners to the JTable.

installKeyboardActions

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

uninstallUI

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

uninstallDefaults

protected void uninstallDefaults()

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Return the minimum size of the table. The minimum height is the row height (plus inter-cell spacing) times the number of rows. The minimum width is the sum of the minimum widths of each column (plus inter-cell spacing).
Overrides:
getMinimumSize in class ComponentUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Return the preferred size of the table. The preferred height is the row height (plus inter-cell spacing) times the number of rows. The preferred width is the sum of the preferred widths of each column (plus inter-cell spacing).
Overrides:
getPreferredSize in class ComponentUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Return the maximum size of the table. The maximum height is the row height (plus inter-cell spacing) times the number of rows. The maximum width is the sum of the maximum widths of each column (plus inter-cell spacing).
Overrides:
getMaximumSize in class ComponentUI

paint

public void paint(Graphics g,
                  JComponent c)
Paint a representation of the table instance that was set in installUI().
Overrides:
paint in class ComponentUI

JavaTM 2 Platform
Standard Edition

Submit a bug or feature
Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.