private Action getAction(String key) { if (key == null) { return null; } // Try to find the action from kit. EditorKit kit = editorPane.getEditorKit(); if (kit == null) { // kit is cleared in closeDocument() return null; } Action[] actions = kit.getActions(); for (int i = 0; i < actions.length; i++) { if (key.equals(actions[i].getValue(Action.NAME))) { return actions[i]; } } return null; }
public Action[] getActions() { if (Settings.debug) System.err.println("Delegating getActions"); return delegate.getActions(); }