java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
org.monte.media.swing.plaf.CustomButtonUI
- All Implemented Interfaces:
PlafConstants
CustomButtonUI draws a BackdropBorder in the background of the button.
This allows for easy visual customization of buttons.
Usage:
JButton b = new JButton(); b.setUI((ButtonUI) CustomButtonUI.createUI(b)); b.setBorder(new BackdropBorder(....));
- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffsetFields inherited from interface org.monte.media.swing.plaf.PlafConstants
ALL, CENTER, EAST, NONE, PROP_BEVEL, WEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BasicButtonListenerstatic ComponentUIvoidvoidpaint(Graphics g, JComponent c) protected voidprotected voidpaintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) protected voidpaintText(Graphics g, JComponent c, Rectangle textRect, String text) voidMethods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUIMethods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
Constructor Details
-
CustomButtonUI
public CustomButtonUI()
-
-
Method Details
-
createUI
-
installDefaults
- Overrides:
installDefaultsin classBasicButtonUI
-
uninstallDefaults
- Overrides:
uninstallDefaultsin classBasicButtonUI
-
createButtonListener
- Overrides:
createButtonListenerin classBasicButtonUI
-
paint
- Overrides:
paintin classBasicButtonUI
-
paintButtonPressed
- Overrides:
paintButtonPressedin classBasicButtonUI
-
paintFocus
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) - Overrides:
paintFocusin classBasicButtonUI
-
paintText
- Overrides:
paintTextin classBasicButtonUI
-