|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.explodingpixels.macwidgets.MacButtonFactory
public class MacButtonFactory
A factory for creating Mac-style buttons.
Constructor Summary | |
---|---|
MacButtonFactory()
|
Method Summary | |
---|---|
static javax.swing.JComponent |
createGradientButton(javax.swing.Icon icon,
java.awt.event.ActionListener actionListener)
Creates an Apple style gradient button using the given Icon . |
static com.explodingpixels.widgets.PopdownButton |
createGradientPopdownButton(javax.swing.Icon icon,
com.explodingpixels.widgets.PopupMenuCustomizer popupMenuCustomizer)
Creates an Apple style gradient pop-down button using the given Icon . |
static com.explodingpixels.painter.Painter<java.awt.Component> |
getGradientButtonPainter()
Returns a Painter that paints a gradient matching Apple's
depiction of a "Gradient style" button, depicted
here. |
static javax.swing.AbstractButton |
makePreferencesTabBarButton(javax.swing.AbstractButton button)
|
static javax.swing.AbstractButton |
makeUnifiedToolBarButton(javax.swing.AbstractButton button)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MacButtonFactory()
Method Detail |
---|
public static javax.swing.AbstractButton makeUnifiedToolBarButton(javax.swing.AbstractButton button)
public static javax.swing.AbstractButton makePreferencesTabBarButton(javax.swing.AbstractButton button)
public static com.explodingpixels.painter.Painter<java.awt.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 javax.swing.JComponent createGradientButton(javax.swing.Icon icon, java.awt.event.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 com.explodingpixels.widgets.PopdownButton createGradientPopdownButton(javax.swing.Icon icon, com.explodingpixels.widgets.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.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |