public class MacButtonFactory extends Object
Constructor and Description |
---|
MacButtonFactory() |
Modifier and Type | Method and Description |
---|---|
static JComponent |
createGradientButton(Icon icon,
ActionListener actionListener)
Creates an Apple style gradient button using the given
Icon . |
static PopdownButton |
createGradientPopdownButton(Icon icon,
PopupMenuCustomizer popupMenuCustomizer)
Creates an Apple style gradient pop-down button using the given
Icon . |
static Painter<Component> |
getGradientButtonPainter()
|
static AbstractButton |
makePreferencesTabBarButton(AbstractButton button) |
static AbstractButton |
makeUnifiedToolBarButton(AbstractButton button) |
public static AbstractButton makeUnifiedToolBarButton(AbstractButton button)
public static AbstractButton makePreferencesTabBarButton(AbstractButton button)
public static Painter<Component> getGradientButtonPainter()
Painter
that paints a gradient matching Apple's
depiction of a "Gradient style" button, depicted
here.Painter
that paints an Apple style gradient-button
background.public static JComponent createGradientButton(Icon icon, ActionListener actionListener)
Icon
. The
given ActionListener
will be notified when the button's action
fires.icon
- the Icon
to use in the button.actionListener
- the ActionListener
to notify when the
created button is pressed.public static PopdownButton createGradientPopdownButton(Icon icon, PopupMenuCustomizer popupMenuCustomizer)
Icon
. The given PopupMenuCustomizer
will be notified
just prior to the pop-down menu being shown, and can thus add appropriate
menu items.icon
- the Icon
to use in the button.popupMenuCustomizer
- the PopupMenuCustomizer
to be notified
just prior to the popup menu being shown.