本文整理匯總了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));
}
示例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());
}