|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.mucommander.ui.action.ActionKeymap
public class ActionKeymap
This class manages keyboard associations with MuAction classes.
Proper documentation and cleaning of this class is pending.
| Field Summary | |
|---|---|
static java.lang.String |
ACTION_KEYMAP_RESOURCE_PATH
Path to the action keymap resource file within the application JAR file |
| Method Summary | |
|---|---|
static void |
changeActionAccelerators(java.lang.Class muActionClass,
javax.swing.KeyStroke accelerator,
javax.swing.KeyStroke alternateAccelerator)
|
static javax.swing.KeyStroke |
getAccelerator(java.lang.Class muActionClass)
|
static AbstractFile |
getActionKeyMapFile()
Returns the path to the action keymap file. |
static javax.swing.KeyStroke |
getAlternateAccelerator(java.lang.Class muActionClass)
|
static java.lang.Class |
getRegisteredActionClassForKeystroke(javax.swing.KeyStroke ks)
|
static boolean |
isKeyStrokeRegistered(javax.swing.KeyStroke ks)
|
static void |
loadActionKeyMap()
Loads the action keymap files: loads the one contained in the JAR file first, and then the user's one. |
static void |
registerAction(MainFrame mainFrame,
MuAction action)
|
static void |
registerActionAccelerator(MuAction action,
javax.swing.KeyStroke accelerator,
javax.swing.JComponent comp,
int condition)
|
static void |
registerActionAccelerators(MuAction action,
javax.swing.JComponent comp,
int condition)
|
static void |
registerActions(MainFrame mainFrame)
|
static void |
setActionKeyMapFile(AbstractFile file)
Sets the path to the user action keymap file to be loaded when calling loadActionKeyMap(). |
static void |
setActionKeyMapFile(java.io.File file)
Sets the path to the user action keymap file to be loaded when calling loadActionKeyMap(). |
static void |
setActionKeyMapFile(java.lang.String path)
Sets the path to the user action keymap file to be loaded when calling loadActionKeyMap(). |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
static void |
unregisterAction(MainFrame mainFrame,
MuAction action)
|
static void |
unregisterActionAccelerator(MuAction action,
javax.swing.KeyStroke accelerator,
javax.swing.JComponent comp,
int condition)
|
static void |
unregisterActionAccelerators(MuAction action,
javax.swing.JComponent comp,
int condition)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ACTION_KEYMAP_RESOURCE_PATH
| Method Detail |
|---|
public static void setActionKeyMapFile(java.lang.String path)
throws java.io.FileNotFoundException
loadActionKeyMap().
By default, this file is DEFAULT_ACTION_KEYMAP_FILE_NAME within the preferences folder.
This is a convenience method and is strictly equivalent to calling setActionKeyMapFile(FileFactory.getFile(file)).
path - path to the action keymap file
java.io.FileNotFoundException - if file is not accessible.
public static void setActionKeyMapFile(java.io.File file)
throws java.io.FileNotFoundException
loadActionKeyMap().
By default, this file is DEFAULT_ACTION_KEYMAP_FILE_NAME within the preferences folder.
This is a convenience method and is strictly equivalent to calling setActionKeyMapFile(FileFactory.getFile(file.getAbsolutePath())).
file - path to the action keymap file
java.io.FileNotFoundException - if file is not accessible.
public static void setActionKeyMapFile(AbstractFile file)
throws java.io.FileNotFoundException
loadActionKeyMap().
By default, this file is DEFAULT_ACTION_KEYMAP_FILE_NAME within the preferences folder.
file - path to the action keymap file
java.io.FileNotFoundException - if file is not accessible.
public static AbstractFile getActionKeyMapFile()
throws java.io.IOException
java.io.IOException - if an error occured while locating the default action keymap file.
public static void loadActionKeyMap()
throws java.lang.Exception
This method must be called before requesting and registering any action.
java.lang.Exceptionpublic static javax.swing.KeyStroke getAccelerator(java.lang.Class muActionClass)
public static javax.swing.KeyStroke getAlternateAccelerator(java.lang.Class muActionClass)
public static boolean isKeyStrokeRegistered(javax.swing.KeyStroke ks)
public static java.lang.Class getRegisteredActionClassForKeystroke(javax.swing.KeyStroke ks)
public static void registerActions(MainFrame mainFrame)
public static void registerAction(MainFrame mainFrame,
MuAction action)
public static void unregisterAction(MainFrame mainFrame,
MuAction action)
public static void registerActionAccelerator(MuAction action,
javax.swing.KeyStroke accelerator,
javax.swing.JComponent comp,
int condition)
public static void unregisterActionAccelerator(MuAction action,
javax.swing.KeyStroke accelerator,
javax.swing.JComponent comp,
int condition)
public static void registerActionAccelerators(MuAction action,
javax.swing.JComponent comp,
int condition)
public static void unregisterActionAccelerators(MuAction action,
javax.swing.JComponent comp,
int condition)
public static void changeActionAccelerators(java.lang.Class muActionClass,
javax.swing.KeyStroke accelerator,
javax.swing.KeyStroke alternateAccelerator)
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard