public abstract class MenuButtonBehaviorBase<C extends MenuButton> extends ButtonBehavior<C>
Modifier and Type | Field and Description |
---|---|
protected static List<KeyBinding> |
BASE_MENU_BUTTON_BINDINGS
The base key bindings for a MenuButton.
|
protected static String |
CLOSE_ACTION
Closes the popup menu.
|
protected static String |
OPEN_ACTION
Opens the popup menu.
|
BUTTON_BINDINGS
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS
Constructor and Description |
---|
MenuButtonBehaviorBase(C menuButton,
List<KeyBinding> bindings)
*
Constructors *
*
|
Modifier and Type | Method and Description |
---|---|
protected void |
callAction(String name)
Invokes the given named action.
|
void |
mousePressed(MouseEvent e,
boolean behaveLikeButton)
When a mouse button is pressed, we either want to behave like a button or
show the popup.
|
void |
mouseReleased(MouseEvent e)
Invoked when a mouse release has occurred.
|
void |
mouseReleased(MouseEvent e,
boolean behaveLikeButton)
Handles mouse release events.
|
focusChanged, mouseEntered, mouseExited, mousePressed
callActionForEvent, contextMenuRequested, dispose, getControl, matchActionForEvent, mouseDragged, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
protected static final String OPEN_ACTION
protected static final String CLOSE_ACTION
protected static final List<KeyBinding> BASE_MENU_BUTTON_BINDINGS
public MenuButtonBehaviorBase(C menuButton, List<KeyBinding> bindings)
protected void callAction(String name)
callAction
in class ButtonBehavior<C extends MenuButton>
name
- the name of the action to invokepublic void mousePressed(MouseEvent e, boolean behaveLikeButton)
e
- the mouse press eventbehaveLikeButton
- if true, this should act just like a buttonpublic void mouseReleased(MouseEvent e)
ButtonBehavior
mouseReleased
in class ButtonBehavior<C extends MenuButton>
e
- the mouse eventpublic void mouseReleased(MouseEvent e, boolean behaveLikeButton)
e
- the mouse press eventbehaveLikeButton
- if true, this should act just like a buttonCopyright © 2020. All rights reserved.