本文整理了Java中javax.swing.JEditorPane.getActionMap()
方法的一些代码示例,展示了JEditorPane.getActionMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.getActionMap()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:getActionMap
暂无
代码示例来源:origin: de.sciss/jsyntaxpane
@Override
public void deinstall(JEditorPane editorPane) {
List<SyntaxComponent> l = editorComponents.get(editorPane);
for (SyntaxComponent c : editorComponents.get(editorPane)) {
c.deinstall(editorPane);
}
editorComponents.clear();
editorPane.getInputMap().clear();
editorPane.getActionMap().clear();
}
代码示例来源:origin: de.sciss/jsyntaxpane
Action action = editorPane.getActionMap().get(menuString);
if (action != null) {
JMenuItem menuItem;
代码示例来源:origin: de.sciss/syntaxpane
Action action = editorPane.getActionMap().get(menuString);
if (action != null) {
JMenuItem menuItem;
代码示例来源:origin: org.nuiton/nuiton-widgets
static protected void addUndoRedoSupport(JEditorPane editor) {
UndoManager undo = (UndoManager) editor.getClientProperty(UNDO_MANAGER);
if (undo == null) {
undo = new UndoManager();
editor.putClientProperty(UNDO_MANAGER, undo);
Action undoAction = new UndoAction(undo);
KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
Event.CTRL_MASK);
editor.getInputMap().put(key, "undo");
editor.getActionMap().put("undo", undoAction);
Action redoAction = new RedoAction(undo);
key = KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_MASK
+ KeyEvent.SHIFT_DOWN_MASK);
editor.getInputMap().put(key, "redo");
editor.getActionMap().put("redo", redoAction);
}
Document doc = editor.getDocument();
doc.addUndoableEditListener(undo);
}
代码示例来源:origin: de.sciss/syntaxpane
@Override
public void deinstall(JEditorPane editorPane) {
for (SyntaxComponent c : editorComponents.get(editorPane)) {
c.deinstall(editorPane);
}
editorComponents.clear();
editorPane.getInputMap().clear();
ActionMap m = editorPane.getActionMap();
for (Object key : editorPane.getActionMap().keys()) {
Action a = m.get(key);
if (a instanceof SyntaxAction) {
((SyntaxAction) a).deinstall(editorPane);
}
}
m.clear();
}
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-extra
static protected void addUndoRedoSupport(JEditorPane editor) {
UndoManager undo = (UndoManager) editor.getClientProperty(UNDO_MANAGER);
if (undo == null) {
undo = new UndoManager();
editor.putClientProperty(UNDO_MANAGER, undo);
Action undoAction = new UndoAction(undo);
KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
Event.CTRL_MASK);
editor.getInputMap().put(key, "undo");
editor.getActionMap().put("undo", undoAction);
Action redoAction = new RedoAction(undo);
key = KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_MASK
+ KeyEvent.SHIFT_DOWN_MASK);
editor.getInputMap().put(key, "redo");
editor.getActionMap().put("redo", redoAction);
}
Document doc = editor.getDocument();
doc.addUndoableEditListener(undo);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
editorPane.getActionMap().put(CANCEL_EDITING, cancelEditingAction);
textArea.getActionMap().put(CANCEL_EDITING, cancelEditingAction);
editorPane.getActionMap().put(SUBMIT_TEXT, textSubmitAction);
textArea.getActionMap().put(SUBMIT_TEXT, textSubmitAction);
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
editorPane.getActionMap().put(CANCEL_EDITING, cancelEditingAction);
textArea.getActionMap().put(CANCEL_EDITING, cancelEditingAction);
editorPane.getActionMap().put(SUBMIT_TEXT, textSubmitAction);
textArea.getActionMap().put(SUBMIT_TEXT, textSubmitAction);
代码示例来源:origin: stackoverflow.com
editor.getActionMap().put(DefaultEditorKit.copyAction, safeCopy);
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-io
public JEditorPane getEditorPane () {
if (pane == null) {
JComponent view = getView ();
pane = view instanceof CloneableEditorSupport.Pane ? ((CloneableEditorSupport.Pane) view).getEditorPane () : null;
//TODO This is temporary work around for NPE
Debug.warning("Pane is " + pane);
Debug.warning("Actin Map is "+ getActionMap());
if (pane == null) {
return null;
}
// End
getActionMap ().setParent (pane.getActionMap ());
pane.getActionMap ().remove ("cloneWindow"); // NOI18N
}
return pane;
}
代码示例来源:origin: net.imagej/ij
styleSheet.addRule("dl dt{font-face:bold;}");
editorPane.getActionMap().put("insert-break", new AbstractAction(){
public void actionPerformed(ActionEvent e) {}
代码示例来源:origin: freeplane/freeplane
textArea.getActionMap().put(dialogCloser, dialogCloser);
代码示例来源:origin: imagej/ImageJA
styleSheet.addRule("dl dt{font-face:bold;}");
editorPane.getActionMap().put("insert-break", new AbstractAction(){
public void actionPerformed(ActionEvent e) {}
代码示例来源:origin: de.sciss/syntaxpane
toolbar.addSeparator();
} else {
Action action = editorPane.getActionMap().get(menuString);
if (action != null && action.getValue(Action.SMALL_ICON) != null) {
JButton b = toolbar.add(action);
代码示例来源:origin: de.sciss/jsyntaxpane
imap.setParent(editorPane.getInputMap());
ActionMap amap = new ActionMap();
amap.setParent(editorPane.getActionMap());
Action action = editorPane.getActionMap().get(name);
if (action != null) {
configActionProperties(action, name, m.group1);
代码示例来源:origin: de.sciss/jsyntaxpane
toolbar.addSeparator();
} else {
Action action = editorPane.getActionMap().get(menuString);
if (action != null && action.getValue(Action.SMALL_ICON) != null) {
JButton b = toolbar.add(action);
代码示例来源:origin: de.sciss/syntaxpane
imap.setParent(editorPane.getInputMap());
ActionMap amap = new ActionMap();
amap.setParent(editorPane.getActionMap());
Action action = editorPane.getActionMap().get(name);
if (action != null) {
configActionProperties(action, name, m.group1);
代码示例来源:origin: freeplane/freeplane
final ActionMap actionMap = textfield.getActionMap();
actionMap.put(DefaultEditorKit.pasteAction, pasteAction);
内容来源于网络,如有侵权,请联系作者删除!