当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
ExtKit.BuildPopupMenuAction (Editor Library) - NetBeans API Javadoc (Current Development Version)
org.netbeans.editor.ext
Class ExtKit.BuildPopupMenuAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
org.netbeans.editor.BaseAction
org.netbeans.editor.ext.ExtKit.BuildPopupMenuAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Enclosing class:
- ExtKit
public static class ExtKit.BuildPopupMenuAction
- extends BaseAction
Called before the popup menu is shown to possibly rebuild
the popup menu.
- See Also:
- Serialized Form
Fields inherited from class org.netbeans.editor.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 |
Methods inherited from class org.netbeans.editor.BaseAction |
actionPerformed, asynchonous, createDefaultValue, findValue, getDefaultShortDescription, getPopupMenuItem, getPopupMenuText, getValue, settingsChange, updateComponent, updateComponent |
ExtKit.BuildPopupMenuAction
public ExtKit.BuildPopupMenuAction()
actionPerformed
public void actionPerformed(ActionEvent evt,
JTextComponent target)
- Description copied from class:
BaseAction
- The target method that performs the real action functionality.
- Specified by:
actionPerformed
in class BaseAction
- Parameters:
evt
- action event describing the action that occuredtarget
- target component where the action occured. It's retrieved
by the TextAction.getTextComponent(evt).
createPopupMenu
protected JPopupMenu createPopupMenu(JTextComponent target)
buildPopupMenu
protected JPopupMenu buildPopupMenu(JTextComponent target)
addAction
protected void addAction(JTextComponent target,
JPopupMenu popupMenu,
String actionName)
- Add the action to the popup menu. This method is called
for each action-name found in the action-name-list. It should
add the appopriate menu item to the popup menu.
- Parameters:
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().
debugPopupMenuItem
protected final void debugPopupMenuItem(JMenuItem item,
Action action)
getItemText
protected String getItemText(JTextComponent target,
String actionName,
Action a)