當前位置: 首頁>>代碼示例>>Java>>正文


Java RSyntaxTextArea.getActionMap方法代碼示例

本文整理匯總了Java中org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.getActionMap方法的典型用法代碼示例。如果您正苦於以下問題:Java RSyntaxTextArea.getActionMap方法的具體用法?Java RSyntaxTextArea.getActionMap怎麽用?Java RSyntaxTextArea.getActionMap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.fife.ui.rsyntaxtextarea.RSyntaxTextArea的用法示例。


在下文中一共展示了RSyntaxTextArea.getActionMap方法的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.getActionMap方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。