Package Summary  Overview Summary

class:MetalButtonUI [NONE]


public class MetalButtonUIextends BasicButtonUI
MetalButtonUI implementation

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see XMLEncoder.

field:focusColor [NONE]

  • focusColor

    protected Color focusColor
    The color of the focused button.
  • field:selectColor [NONE]

    selectColor

    protected Color selectColor
    The color of the selected button.

    field:disabledTextColor [NONE]

    disabledTextColor

    protected Color disabledTextColor
    The color of the disabled color.

    constructor:MetalButtonUI() [NONE]

    • MetalButtonUI

      public MetalButtonUI()
      Constructs a MetalButtonUI.

    method:createUI(javax.swing.JComponent) [NONE]

  • createUI

    public static  ComponentUI createUI (JComponent c)
    Returns an instance of MetalButtonUI.
    Parameters:
    c - a component
    Returns:
    an instance of MetalButtonUI
  • method:installDefaults(javax.swing.AbstractButton) [NONE]

    installDefaults

    public void installDefaults (AbstractButton b)
    Description copied from class: BasicButtonUI
    Installs default properties.
    Overrides:
    installDefaults in class BasicButtonUI
    Parameters:
    b - an abstract button

    method:uninstallDefaults(javax.swing.AbstractButton) [NONE]

    uninstallDefaults

    public void uninstallDefaults (AbstractButton b)
    Description copied from class: BasicButtonUI
    Uninstalls default properties.
    Overrides:
    uninstallDefaults in class BasicButtonUI
    Parameters:
    b - an abstract button

    method:createButtonListener(javax.swing.AbstractButton) [NONE]

    createButtonListener

    protected BasicButtonListener createButtonListener (AbstractButton b)
    Description copied from class: BasicButtonUI
    Returns a new instance of BasicButtonListener.
    Overrides:
    createButtonListener in class BasicButtonUI
    Parameters:
    b - an abstract button
    Returns:
    a new instance of BasicButtonListener

    method:getSelectColor() [NONE]

    getSelectColor

    protected Color getSelectColor()
    Returns the color of the selected button.
    Returns:
    the color of the selected button

    method:getDisabledTextColor() [NONE]

    getDisabledTextColor

    protected Color getDisabledTextColor()
    Returns the color of a disabled text.
    Returns:
    the color of a disabled text

    method:getFocusColor() [NONE]

    getFocusColor

    protected Color getFocusColor()
    Returns the color of the focused button.
    Returns:
    the color of the focused button

    method:update(java.awt.Graphics,javax.swing.JComponent) [NONE]

    update

    public void update (Graphics g, JComponent c)
    If necessary paints the background of the component, then invokes paint.
    Overrides:
    update in class ComponentUI
    Parameters:
    g - Graphics to paint to
    c - JComponent painting on
    Throws:
    NullPointerException - if g or c is null
    Since:
    1.5
    See Also:

    method:paintButtonPressed(java.awt.Graphics,javax.swing.AbstractButton) [NONE]

    paintButtonPressed

    protected void paintButtonPressed (Graphics g, AbstractButton b)
    Description copied from class: BasicButtonUI
    Paints a pressed button.
    Overrides:
    paintButtonPressed in class BasicButtonUI
    Parameters:
    g - an instance of Graphics
    b - an abstract button

    method:paintFocus(java.awt.Graphics,javax.swing.AbstractButton,java.awt.Rectangle,java.awt.Rectangle,java.awt.Rectangle) [NONE]

    paintFocus

    protected void paintFocus (Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
    Description copied from class: BasicButtonUI
    Paints a focused button.
    Overrides:
    paintFocus in class BasicButtonUI
    Parameters:
    g - an instance of Graphics
    b - an abstract button
    viewRect - a bounding rectangle to render the button
    textRect - a bounding rectangle to render the text
    iconRect - a bounding rectangle to render the icon

    method:paintText(java.awt.Graphics,javax.swing.JComponent,java.awt.Rectangle,java.lang.String) [NONE]

    paintText

    protected void paintText (Graphics g, JComponent c, Rectangle textRect, String text)
    Description copied from class: BasicButtonUI
    Method which renders the text of the current button. As of Java 2 platform v 1.4 this method should not be used or overriden. Use the paintText method which takes the AbstractButton argument.
    Overrides:
    paintText in class BasicButtonUI
    Parameters:
    g - an instance of Graphics
    c - a component
    textRect - a bounding rectangle to render the text
    text - a string to render

    © 2022 Oracle Corporation and/or its affiliates