SynthTableUI
public class BasicTableUI extends TableUI
Modifier and Type | Class | Description |
---|---|---|
class |
BasicTableUI.FocusHandler |
This class should be treated as a "protected" inner class. |
class |
BasicTableUI.KeyHandler |
This class should be treated as a "protected" inner class. |
class |
BasicTableUI.MouseInputHandler |
This class should be treated as a "protected" inner class. |
Modifier and Type | Field | Description |
---|---|---|
protected FocusListener |
focusListener |
FocusListener that are attached to the JTable . |
protected KeyListener |
keyListener |
KeyListener that are attached to the JTable . |
protected MouseInputListener |
mouseInputListener |
MouseInputListener that are attached to the JTable . |
protected CellRendererPane |
rendererPane |
The instance of CellRendererPane . |
protected JTable |
table |
The instance of JTable . |
Constructor | Description |
---|---|
BasicTableUI() |
Constructs a BasicTableUI . |
Modifier and Type | Method | Description |
---|---|---|
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 |
Returns a new instance of BasicTableUI . |
int |
getBaseline |
Returns the baseline. |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior |
Returns an enum indicating how the baseline of the component changes as the size changes. |
Dimension |
getMaximumSize |
Return the maximum size of the table. |
Dimension |
getMinimumSize |
Return the minimum size of the table. |
Dimension |
getPreferredSize |
Return the preferred size of the table. |
protected void |
installDefaults() |
Initialize JTable properties, e.g. font, foreground, and background. |
protected void |
installKeyboardActions() |
Register all keyboard actions on the JTable. |
protected void |
installListeners() |
Attaches listeners to the JTable. |
void |
paint |
Paint a representation of the table instance that was set in installUI(). |
protected void |
uninstallDefaults() |
Uninstalls default properties. |
protected void |
uninstallKeyboardActions() |
Unregisters keyboard actions. |
protected void |
uninstallListeners() |
Unregisters listeners. |
contains, getAccessibleChild, getAccessibleChildrenCount, installUI, uninstallUI, update
protected JTable table
JTable
.protected CellRendererPane rendererPane
CellRendererPane
.protected KeyListener keyListener
KeyListener
that are attached to the JTable
.protected FocusListener focusListener
FocusListener
that are attached to the JTable
.protected MouseInputListener mouseInputListener
MouseInputListener
that are attached to the JTable
.public BasicTableUI()
BasicTableUI
.protected KeyListener createKeyListener()
JTable
.JTable
protected FocusListener createFocusListener()
JTable
.JTable
protected MouseInputListener createMouseInputListener()
JTable
.JTable
public static ComponentUI createUI(JComponent c)
BasicTableUI
.c
- a componentBasicTableUI
protected void installDefaults()
protected void installListeners()
protected void installKeyboardActions()
protected void uninstallDefaults()
protected void uninstallListeners()
protected void uninstallKeyboardActions()
public int getBaseline(JComponent c, int width, int height)
getBaseline
in class ComponentUI
c
- JComponent
baseline is being requested forwidth
- the width to get the baseline forheight
- the height to get the baseline forNullPointerException
- if c
is null
IllegalArgumentException
- if width or height is < 0public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
getBaselineResizeBehavior
in class ComponentUI
c
- JComponent
to return baseline resize behavior forNullPointerException
- if c
is null
public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class ComponentUI
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 componentsDimension
object or null
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class ComponentUI
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 componentsDimension
object containing given component's preferred size appropriate for the look and feelpublic Dimension getMaximumSize(JComponent c)
getMaximumSize
in class ComponentUI
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 componentsDimension
object or null
public void paint(Graphics g, JComponent c)
table
instance that was set in installUI().paint
in class ComponentUI
g
- the Graphics
context in which to paintc
- the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicTableUI.html