java.awt.event.HierarchyBoundsListener#org.openide.actions.RedoAction源码实例Demo

下面列出了java.awt.event.HierarchyBoundsListener#org.openide.actions.RedoAction 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: NbEditorKit.java
protected @Override void updateActions() {
    addSystemActionMapping(cutAction, javax.swing.text.DefaultEditorKit.cutAction);
    addSystemActionMapping(copyAction, javax.swing.text.DefaultEditorKit.copyAction);
    addSystemActionMapping(pasteAction, org.openide.actions.PasteAction.class);
    // #69077 - DeleteAction now delegates to deleteNextCharAction
    addSystemActionMapping(deleteNextCharAction, "delete");
    addSystemActionMapping(showPopupMenuAction, org.openide.actions.PopupAction.class);

    addSystemActionMapping(gotoAction, org.openide.actions.GotoAction.class);

    addSystemActionMapping(undoAction, org.openide.actions.UndoAction.class);
    addSystemActionMapping(redoAction, org.openide.actions.RedoAction.class);
}
 
源代码2 项目: netbeans   文件: NbEditorKit.java
public @Override void actionPerformed(ActionEvent evt, JTextComponent target) {
    Document doc = target.getDocument();
    if (doc.getProperty(BaseDocument.UNDO_MANAGER_PROP) != null ||
        doc.getProperty(UndoManager.class) != null )
    {
        super.actionPerformed(evt, target);
    } else { // Deleagte to system undo action
        // Delegate to system redo action
        RedoAction ra = (RedoAction)SystemAction.get(RedoAction.class);
        if (ra != null && ra.isEnabled()) {
            ra.actionPerformed(evt);
        }
    }
}