当前位置: 首页>>代码示例>>Java>>正文


Java RSyntaxTextArea.getInputMap方法代码示例

本文整理汇总了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));

}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:17,代码来源:JavaLanguageSupport.java

示例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");

}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:17,代码来源:JavaLanguageSupport.java

示例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));

}
 
开发者ID:bobbylight,项目名称:ZScriptLanguageSupport,代码行数:17,代码来源:ZScriptLanguageSupport.java

示例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);

}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:19,代码来源:AbstractMarkupLanguageSupport.java

示例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 '&gt;' 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());

}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:22,代码来源:AbstractMarkupLanguageSupport.java


注:本文中的org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.getInputMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。