public static class ExtKit.BuildPopupMenuAction extends BaseAction
ABBREV_RESET, CLEAR_STATUS_TEXT, ICON_RESOURCE_PROPERTY, LOCALE_DESC_PREFIX, LOCALE_POPUP_PREFIX, MAGIC_POSITION_RESET, NO_KEYBINDING, NO_RECORDING, POPUP_MENU_TEXT, SAVE_POSITION, SELECTION_REMOVE, UNDO_MERGE_RESET, updateMask, WORD_MATCH_RESET
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
BuildPopupMenuAction() |
BuildPopupMenuAction(Map attrs) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent evt,
JTextComponent target)
The target method that performs the real action functionality.
|
protected void |
addAction(JTextComponent target,
JPopupMenu popupMenu,
String actionName)
Add the action to the popup menu.
|
protected JPopupMenu |
buildPopupMenu(JTextComponent target) |
protected JPopupMenu |
createPopupMenu(JTextComponent target) |
protected void |
debugPopupMenuItem(JMenuItem item,
Action action) |
protected String |
getItemText(JTextComponent target,
String actionName,
Action a) |
actionNameUpdate, actionPerformed, asynchonous, createDefaultValue, findValue, getDefaultShortDescription, getPopupMenuItem, getPopupMenuText, getValue, putValue, updateComponent, updateComponent
augmentList, getFocusedComponent, getTextComponent
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, isEnabled, removePropertyChangeListener, setEnabled
public BuildPopupMenuAction()
public BuildPopupMenuAction(Map attrs)
public void actionPerformed(ActionEvent evt, JTextComponent target)
BaseAction
actionPerformed
in class BaseAction
evt
- action event describing the action that occuredtarget
- target component where the action occured. It's retrieved
by the TextAction.getTextComponent(evt).protected JPopupMenu createPopupMenu(JTextComponent target)
protected JPopupMenu buildPopupMenu(JTextComponent target)
protected void addAction(JTextComponent target, JPopupMenu popupMenu, String actionName)
target
- target component for which the menu is being
constructed.popupMenu
- popup menu to which this method should add
the item corresponding to the action-name.actionName
- name of the action to add. The real action
can be retrieved from the kit by calling getActionByName().protected String getItemText(JTextComponent target, String actionName, Action a)