ComponentUI (Java SE 15 & JDK 15) (original) (raw)

Direct Known Subclasses:

[ButtonUI](ButtonUI.html "class in javax.swing.plaf"), [ColorChooserUI](ColorChooserUI.html "class in javax.swing.plaf"), [ComboBoxUI](ComboBoxUI.html "class in javax.swing.plaf"), [DesktopIconUI](DesktopIconUI.html "class in javax.swing.plaf"), [DesktopPaneUI](DesktopPaneUI.html "class in javax.swing.plaf"), [FileChooserUI](FileChooserUI.html "class in javax.swing.plaf"), [InternalFrameUI](InternalFrameUI.html "class in javax.swing.plaf"), [LabelUI](LabelUI.html "class in javax.swing.plaf"), [LayerUI](LayerUI.html "class in javax.swing.plaf"), [ListUI](ListUI.html "class in javax.swing.plaf"), [MenuBarUI](MenuBarUI.html "class in javax.swing.plaf"), [OptionPaneUI](OptionPaneUI.html "class in javax.swing.plaf"), [PanelUI](PanelUI.html "class in javax.swing.plaf"), [PopupMenuUI](PopupMenuUI.html "class in javax.swing.plaf"), [ProgressBarUI](ProgressBarUI.html "class in javax.swing.plaf"), [RootPaneUI](RootPaneUI.html "class in javax.swing.plaf"), [ScrollBarUI](ScrollBarUI.html "class in javax.swing.plaf"), [ScrollPaneUI](ScrollPaneUI.html "class in javax.swing.plaf"), [SeparatorUI](SeparatorUI.html "class in javax.swing.plaf"), [SliderUI](SliderUI.html "class in javax.swing.plaf"), [SpinnerUI](SpinnerUI.html "class in javax.swing.plaf"), [SplitPaneUI](SplitPaneUI.html "class in javax.swing.plaf"), [TabbedPaneUI](TabbedPaneUI.html "class in javax.swing.plaf"), [TableHeaderUI](TableHeaderUI.html "class in javax.swing.plaf"), [TableUI](TableUI.html "class in javax.swing.plaf"), [TextUI](TextUI.html "class in javax.swing.plaf"), [ToolBarUI](ToolBarUI.html "class in javax.swing.plaf"), [ToolTipUI](ToolTipUI.html "class in javax.swing.plaf"), [TreeUI](TreeUI.html "class in javax.swing.plaf"), [ViewportUI](ViewportUI.html "class in javax.swing.plaf")


public abstract class ComponentUI extends Object

The base class for all UI delegate objects in the Swing pluggable look and feel architecture. The UI delegate object for a Swing component is responsible for implementing the aspects of the component that depend on the look and feel. The JComponent class invokes methods from this class in order to delegate operations (painting, layout calculations, etc.) that may vary depending on the look and feel installed. Client programs should not invoke methods on this class directly.

See Also:

JComponent, UIManager

Constructors

Constructor Description
ComponentUI() Sole constructor.
Modifier and Type Method Description
boolean contains​(JComponent c, int x, int y) Returns true if the specified x,y location is contained within the look and feel's defined shape of the specified component.
static ComponentUI createUI​(JComponent c) Returns an instance of the UI delegate for the specified component.
Accessible getAccessibleChild​(JComponent c, int i) Returns the ith Accessible child of the object.
int getAccessibleChildrenCount​(JComponent c) Returns the number of accessible children in the object.
int getBaseline​(JComponent c, int width, int height) Returns the baseline.
Component.BaselineResizeBehavior getBaselineResizeBehavior​(JComponent c) Returns an enum indicating how the baseline of the component changes as the size changes.
Dimension getMaximumSize​(JComponent c) Returns the specified component's maximum size appropriate for the look and feel.
Dimension getMinimumSize​(JComponent c) Returns the specified component's minimum size appropriate for the look and feel.
Dimension getPreferredSize​(JComponent c) Returns the specified component's preferred size appropriate for the look and feel.
void installUI​(JComponent c) Configures the specified component appropriately for the look and feel.
void paint​(Graphics g,JComponent c) Paints the specified component appropriately for the look and feel.
void uninstallUI​(JComponent c) Reverses configuration which was done on the specified component duringinstallUI.
void update​(Graphics g,JComponent c) Notifies this UI delegate that it is time to paint the specified component.

Methods declared in class java.lang.Object

[clone](../../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../../java.base/java/lang/Object.html#notifyAll%28%29), [toString](../../../../java.base/java/lang/Object.html#toString%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long,int%29)