本文整理汇总了Java中javax.swing.ActionMap.remove方法的典型用法代码示例。如果您正苦于以下问题:Java ActionMap.remove方法的具体用法?Java ActionMap.remove怎么用?Java ActionMap.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.ActionMap
的用法示例。
在下文中一共展示了ActionMap.remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initActions
import javax.swing.ActionMap; //导入方法依赖的package包/类
private void initActions() {
InputMap inputMap = getInputMap(JComponent.WHEN_FOCUSED);
inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_ENTER, 0, false ), "defaultAction" );
inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_F10, KeyEvent.SHIFT_DOWN_MASK, false ), "popup" );
ActionMap map = getActionMap();
map.put( "defaultAction", new DefaultAction( this ) );
map.put( "popup", new PopupAction() );
map.put( "selectPreviousRow", new MoveFocusAction( map.get( "selectPreviousRow" ), false ) );
map.put( "selectNextRow", new MoveFocusAction( map.get( "selectNextRow" ), true ) );
map.put( "selectPreviousColumn", new MoveFocusAction( new ChangeColumnAction( map.get( "selectPreviousColumn" ), false ), false ) );
map.put( "selectNextColumn", new MoveFocusAction( new ChangeColumnAction( map.get( "selectNextColumn" ), true ), true ) );
Node categoryNode = category.getLookup().lookup(org.openide.nodes.Node.class);
if( null != categoryNode )
map.put( "paste", new Utils.PasteItemAction( categoryNode ) );
else
map.remove( "paste" );
map.put( "copy", new CutCopyAction( true ) );
map.put( "cut", new CutCopyAction( false ) );
}
示例2: detachSystemActionPerformer
import javax.swing.ActionMap; //导入方法依赖的package包/类
private void detachSystemActionPerformer(JTextComponent c){
if (c == null) return;
Action action = getEditorAction(c);
if (action == null) return;
Action globalSystemAction = getSystemAction(c);
if (globalSystemAction == null) return;
if (globalSystemAction instanceof CallbackSystemAction){
Object key = ((CallbackSystemAction)globalSystemAction).getActionMapKey();
ActionMap am = c.getActionMap();
if (am != null) {
Object ea = am.get(key);
if (action.equals(ea)) {
am.remove(key);
}
}
}
}
示例3: installKeyboardActions
import javax.swing.ActionMap; //导入方法依赖的package包/类
@Override
protected void installKeyboardActions() {
super.installKeyboardActions();
ActionMap am = SwingUtilities.getUIActionMap(graph);
am.remove(TransferHandler.getCutAction().getValue(Action.NAME));
am.remove(TransferHandler.getCopyAction().getValue(Action.NAME));
am.remove(TransferHandler.getPasteAction().getValue(Action.NAME));
SwingUtilities.replaceUIActionMap(graph, am);
}
示例4: installKeyboardActions
import javax.swing.ActionMap; //导入方法依赖的package包/类
@Override
protected void installKeyboardActions() {
super.installKeyboardActions();
ActionMap am = SwingUtilities.getUIActionMap(graph);
am.remove(TransferHandler.getCutAction().getValue(Action.NAME));
am.remove(TransferHandler.getCopyAction().getValue(Action.NAME));
am.remove(TransferHandler.getPasteAction().getValue(Action.NAME));
SwingUtilities.replaceUIActionMap(graph, am);
}