本文整理汇总了Java中org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.getInputMap方法的典型用法代码示例。如果您正苦于以下问题:Java RSyntaxTextArea.getInputMap方法的具体用法?Java RSyntaxTextArea.getInputMap怎么用?Java RSyntaxTextArea.getInputMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
的用法示例。
在下文中一共展示了RSyntaxTextArea.getInputMap方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installKeyboardShortcuts
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //导入方法依赖的package包/类
/**
* Installs extra keyboard shortcuts supported by this language support.
*
* @param textArea The text area to install the shortcuts into.
*/
private void installKeyboardShortcuts(RSyntaxTextArea textArea) {
InputMap im = textArea.getInputMap();
ActionMap am = textArea.getActionMap();
int c = textArea.getToolkit().getMenuShortcutKeyMask();
int shift = InputEvent.SHIFT_MASK;
im.put(KeyStroke.getKeyStroke(KeyEvent.VK_O, c|shift), "GoToType");
am.put("GoToType", new GoToMemberAction(JavaOutlineTree.class));
}
示例2: uninstallKeyboardShortcuts
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //导入方法依赖的package包/类
/**
* Uninstalls any keyboard shortcuts specific to this language support.
*
* @param textArea The text area to uninstall the actions from.
*/
private void uninstallKeyboardShortcuts(RSyntaxTextArea textArea) {
InputMap im = textArea.getInputMap();
ActionMap am = textArea.getActionMap();
int c = textArea.getToolkit().getMenuShortcutKeyMask();
int shift = InputEvent.SHIFT_MASK;
im.remove(KeyStroke.getKeyStroke(KeyEvent.VK_O, c|shift));
am.remove("GoToType");
}
示例3: installKeyboardShortcuts
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //导入方法依赖的package包/类
/**
* Installs extra keyboard shortcuts supported by this language support.
*
* @param textArea The text area to install the shortcuts into.
*/
private void installKeyboardShortcuts(RSyntaxTextArea textArea) {
InputMap im = textArea.getInputMap();
ActionMap am = textArea.getActionMap();
int c = textArea.getToolkit().getMenuShortcutKeyMask();
int shift = InputEvent.SHIFT_MASK;
im.put(KeyStroke.getKeyStroke(KeyEvent.VK_O, c|shift), "GoToType");
am.put("GoToType", new GoToMemberAction(ZScriptOutlineTree.class));
}
示例4: uninstallKeyboardShortcuts
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //导入方法依赖的package包/类
/**
* Uninstalls any keyboard shortcuts specific to this language support.<p>
*
* Subclasses should call this method in their
* {@link #uninstall(RSyntaxTextArea)} methods.
*
* @param textArea The text area to uninstall the actions from.
* @see #installKeyboardShortcuts(RSyntaxTextArea)
*/
protected void uninstallKeyboardShortcuts(RSyntaxTextArea textArea) {
InputMap im = textArea.getInputMap();
ActionMap am = textArea.getActionMap();
im.remove(KeyStroke.getKeyStroke('>'));
am.remove(INSERT_CLOSING_TAG_ACTION);
}
示例5: installKeyboardShortcuts
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //导入方法依赖的package包/类
/**
* Installs extra keyboard shortcuts supported by this language support.
* The default implementation maps an action to automatically add closing
* tags when '>' is pressed; subclasses can override and add additional
* shortcuts if desired.<p>
*
* Subclasses should call this method in their
* {@link #install(RSyntaxTextArea)} methods.
*
* @param textArea The text area to install the shortcuts into.
* @see #uninstallKeyboardShortcuts(RSyntaxTextArea)
*/
protected void installKeyboardShortcuts(RSyntaxTextArea textArea) {
InputMap im = textArea.getInputMap();
ActionMap am = textArea.getActionMap();
im.put(KeyStroke.getKeyStroke('>'), INSERT_CLOSING_TAG_ACTION);
am.put(INSERT_CLOSING_TAG_ACTION, new InsertClosingTagAction());
}