javax.swing.plaf.basic

Class BasicTableUI

public class BasicTableUI extends TableUI

Nested Class Summary
classBasicTableUI.FocusHandler
classBasicTableUI.KeyHandler
Handles key events for the JTable.
classBasicTableUI.MouseInputHandler
Field Summary
protected FocusListenerfocusListener
protected KeyListenerkeyListener
protected MouseInputListenermouseInputListener
protected CellRendererPanerendererPane
protected JTabletable
Method Summary
protected FocusListenercreateFocusListener()
protected KeyListenercreateKeyListener()
Creates and returns a key listener for the JTable.
protected MouseInputListenercreateMouseInputListener()
static ComponentUIcreateUI(JComponent comp)
DimensiongetMaximumSize(JComponent comp)
Return the maximum size of the table.
DimensiongetMinimumSize(JComponent comp)
Return the minimum size of the table.
DimensiongetPreferredSize(JComponent comp)
Returns the preferred size for the table of that UI.
protected voidinstallDefaults()
protected voidinstallKeyboardActions()
Installs keyboard actions on the table.
protected voidinstallListeners()
voidinstallUI(JComponent comp)
voidpaint(Graphics gfx, JComponent ignored)
Paint the associated table.
protected voiduninstallDefaults()
Uninstalls UI defaults that have been installed by {@link #installDefaults()}.
protected voiduninstallKeyboardActions()
Uninstalls the keyboard actions that have been installed by {@link #installKeyboardActions()}.
protected voiduninstallListeners()
voiduninstallUI(JComponent c)

Field Detail

focusListener

protected FocusListener focusListener

keyListener

protected KeyListener keyListener

mouseInputListener

protected MouseInputListener mouseInputListener

rendererPane

protected CellRendererPane rendererPane

table

protected JTable table

Method Detail

createFocusListener

protected FocusListener createFocusListener()

createKeyListener

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

Returns: a key listener for the JTable

createMouseInputListener

protected MouseInputListener createMouseInputListener()

createUI

public static ComponentUI createUI(JComponent comp)

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.

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.

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.

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()

installUI

public void installUI(JComponent comp)

paint

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

uninstallDefaults

protected void uninstallDefaults()
Uninstalls UI defaults that have been installed by {@link #installDefaults()}.

uninstallKeyboardActions

protected void uninstallKeyboardActions()
Uninstalls the keyboard actions that have been installed by {@link #installKeyboardActions()}.

uninstallListeners

protected void uninstallListeners()

uninstallUI

public void uninstallUI(JComponent c)