Interface MenuAction
-
- All Superinterfaces:
Action,ActionListener,EventListener
public interface MenuAction extends Action
Add this contract on any action that should be in a menu.The keyStroke will be generated (from 'A', 'B', ...), should be more customizable but form the moment KISS approach.
Created on 23/11/2020.
- Since:
- 3.0
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Field Summary
-
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AbstractButtongetEditor()default KeyStrokegetMenuKeyStroke()static KeyStrokegetMenuKeyStroke(JPopupMenu popupMenu)JPopupMenugetPopupMenu()default voidinitEditor()default voidinitUI()static voidpreparePopup(JPopupMenu popupMenu, JComponent c, boolean selectLast)static voidselectFirst(JPopupMenu popupMenu)static voidselectLast(JPopupMenu popupMenu)voidsetKeyStroke(KeyStroke keyStroke)-
Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
-
-
-
-
Method Detail
-
getMenuKeyStroke
static KeyStroke getMenuKeyStroke(JPopupMenu popupMenu)
-
preparePopup
static void preparePopup(JPopupMenu popupMenu, JComponent c, boolean selectLast)
-
selectFirst
static void selectFirst(JPopupMenu popupMenu)
-
selectLast
static void selectLast(JPopupMenu popupMenu)
-
getPopupMenu
JPopupMenu getPopupMenu()
-
getEditor
AbstractButton getEditor()
-
setKeyStroke
void setKeyStroke(KeyStroke keyStroke)
-
initUI
default void initUI()
-
initEditor
default void initEditor()
-
getMenuKeyStroke
default KeyStroke getMenuKeyStroke()
-
-