|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openide.awt.DropDownButtonFactory
public final class DropDownButtonFactory
Factory creating buttons with a small arrow icon that shows a popup menu when clicked. The default button behavior hasn't changed except that the button doesn't display any text, just the icon.
| Field Summary | |
|---|---|
static java.lang.String |
PROP_DROP_DOWN_MENU
Use this property name to assign or remove popup menu to/from buttons created by this factory, e.g. |
| Method Summary | |
|---|---|
static javax.swing.JButton |
createDropDownButton(javax.swing.Icon icon,
javax.swing.JPopupMenu dropDownMenu)
Creates JButton with a small arrow that shows the provided popup menu when clicked. |
static javax.swing.JToggleButton |
createDropDownToggleButton(javax.swing.Icon icon,
javax.swing.JPopupMenu dropDownMenu)
Creates JToggleButton with a small arrow that shows the provided popup menu when clicked. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROP_DROP_DOWN_MENU
dropDownButton.putClientProperty( PROP_DROP_DOWN_MENU, new JPopupMenu() )
The property value must be JPopupMenu, removing this property removes the arrow from the button.
| Method Detail |
|---|
public static javax.swing.JButton createDropDownButton(javax.swing.Icon icon,
javax.swing.JPopupMenu dropDownMenu)
icon - The default icon, cannot be nulldropDownMenu - Popup menu to display when the arrow is clicked. If this parameter is null
then the button doesn't show any arrow and behaves like a regular JButton. It is possible to add
the popup menu later using PROP_DROP_DOWN_MENU client property.
public static javax.swing.JToggleButton createDropDownToggleButton(javax.swing.Icon icon,
javax.swing.JPopupMenu dropDownMenu)
icon - The default icon, cannot be nulldropDownMenu - Popup menu to display when the arrow is clicked. If this parameter is null
then the button doesn't show any arrow and behaves like a regular JToggleButton. It is possible to add
the popup menu later using PROP_DROP_DOWN_MENU client property.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||