|
From: Crossfire C. r. messages.
<cro...@li...> - 2009-05-23 19:09:16
|
Revision: 11709
http://crossfire.svn.sourceforge.net/crossfire/?rev=11709&view=rev
Author: akirschbaum
Date: 2009-05-23 19:09:07 +0000 (Sat, 23 May 2009)
Log Message:
-----------
Update comments.
Modified Paths:
--------------
jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/gui/keybindings/KeyBindings.java
Modified: jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/gui/keybindings/KeyBindings.java
===================================================================
--- jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/gui/keybindings/KeyBindings.java 2009-05-23 19:02:34 UTC (rev 11708)
+++ jxclient/trunk/src/jxclient/com/realtime/crossfire/jxclient/gui/keybindings/KeyBindings.java 2009-05-23 19:09:07 UTC (rev 11709)
@@ -39,7 +39,6 @@
/**
* Manages a set of key bindings.
- *
* @author Andreas Kirschbaum
*/
public class KeyBindings
@@ -54,6 +53,9 @@
*/
private final GuiManager guiManager;
+ /**
+ * The active key bindings.
+ */
private final Set<KeyBinding> keybindings = new HashSet<KeyBinding>();
/**
@@ -87,9 +89,8 @@
}
/**
- * Return the file for saving the bindings; <code>null</code> to not save.
- *
- * @return The file.
+ * Returns the file for saving the bindings; <code>null</code> to not save.
+ * @return the file
*/
public File getFile()
{
@@ -97,16 +98,12 @@
}
/**
- * Add a key binding for a key code/modifiers pair.
- *
- * @param keyCode The key code for the key binding.
- *
- * @param modifiers The modifiers for the key binding.
- *
- * @param cmdlist The commands to associate to the key binding.
- *
- * @param isDefault Whether the key binding is a "default" binding which
- * should not be saved.
+ * Adds a key binding for a key code/modifiers pair.
+ * @param keyCode the key code for the key binding
+ * @param modifiers the modifiers for the key binding
+ * @param cmdlist the commands to associate to the key binding
+ * @param isDefault whether the key binding is a "default" binding which
+ * should not be saved
*/
public void addKeyBindingAsKeyCode(final int keyCode, final int modifiers, final GUICommandList cmdlist, final boolean isDefault)
{
@@ -114,14 +111,11 @@
}
/**
- * Add a key binding for a key character.
- *
- * @param keyChar The key character for the key binding.
- *
- * @param cmdlist The commands to associate to the key binding.
- *
- * @param isDefault Whether the key binding is a "default" binding which
- * should not be saved.
+ * Adds a key binding for a key character.
+ * @param keyChar the key character for the key binding
+ * @param cmdlist the commands to associate to the key binding
+ * @param isDefault whether the key binding is a "default" binding which
+ * should not be saved
*/
public void addKeyBindingAsKeyChar(final char keyChar, final GUICommandList cmdlist, final boolean isDefault)
{
@@ -129,7 +123,7 @@
}
/**
- * Add (or replace) a key binding.
+ * Adds (or replace) a key binding.
* @param keyBinding the key binding
*/
private void addKeyBinding(final KeyBinding keyBinding)
@@ -139,11 +133,9 @@
}
/**
- * Remove a key binding for a key code/modifiers pair.
- *
- * @param keyCode The key code of the key binding.
- *
- * @param modifiers The modifiers of the key binding.
+ * Removes a key binding for a key code/modifiers pair.
+ * @param keyCode the key code of the key binding
+ * @param modifiers the modifiers of the key binding
*/
public void deleteKeyBindingAsKeyCode(final int keyCode, final int modifiers)
{
@@ -151,9 +143,8 @@
}
/**
- * Remove a key binding for a key character.
- *
- * @param keyChar The key character of the key binding.
+ * Removes a key binding for a key character.
+ * @param keyChar the key character of the key binding
*/
public void deleteKeyBindingAsKeyChar(final char keyChar)
{
@@ -174,8 +165,8 @@
}
/**
- * Load the key bindings from the given file.
- * @throws IOException If the file cannot be read.
+ * Loads the key bindings from the given file.
+ * @throws IOException if the file cannot be read
*/
public void loadKeyBindings() throws IOException
{
@@ -246,9 +237,8 @@
}
/**
- * Save the key bindings to the given file.
- *
- * @throws IOException If the file cannot be written.
+ * Saves the key bindings to the given file.
+ * @throws IOException if the file cannot be written
*/
public void saveKeyBindings() throws IOException
{
@@ -326,14 +316,11 @@
}
/**
- * Find a key binding associated to a key code/modifiers pair.
- *
- * @param keyCode The key code to look up.
- *
- * @param modifiers The modifiers to look up.
- *
- * @return The key binding, or <code>null</code> if no key binding is
- * associated.
+ * Finds a key binding associated to a key code/modifiers pair.
+ * @param keyCode the key code to look up
+ * @param modifiers the modifiers to look up
+ * @return the key binding, or <code>null</code> if no key binding is
+ * associated
*/
private KeyBinding getKeyBindingAsKeyCode(final int keyCode, final int modifiers)
{
@@ -349,12 +336,10 @@
}
/**
- * Find a key binding associated to a key character.
- *
- * @param keyChar The key character to look up.
- *
- * @return The key binding, or <code>null</code> if no key binding is
- * associated.
+ * Finds a key binding associated to a key character.
+ * @param keyChar the key character to look up
+ * @return the key binding, or <code>null</code> if no key binding is
+ * associated
*/
private KeyBinding getKeyBindingAsKeyChar(final char keyChar)
{
@@ -370,14 +355,11 @@
}
/**
- * Parse and add a key binding.
- *
- * @param line The key binding to parse.
- *
- * @param isDefault Whether the key binding is a "default" binding which
- * should not be saved.
- *
- * @throws InvalidKeyBindingException If the key binding is invalid.
+ * Parses and add a key binding.
+ * @param line the key binding to parse
+ * @param isDefault whether the key binding is a "default" binding which
+ * should not be saved
+ * @throws InvalidKeyBindingException if the key binding is invalid
*/
public void parseKeyBinding(final String line, final boolean isDefault) throws InvalidKeyBindingException
{
@@ -445,11 +427,9 @@
}
/**
- * Execute a "key press" event.
- *
- * @param e The event to execute.
- *
- * @return Whether a matching key binding was found.
+ * Executes a "key press" event.
+ * @param e the event to execute
+ * @return whether a matching key binding was found
*/
public boolean handleKeyPress(final KeyEvent e)
{
@@ -457,11 +437,9 @@
}
/**
- * Execute a "key typed" event.
- *
- * @param e The event to execute.
- *
- * @return Whether a matching key binding was found.
+ * Executes a "key typed" event.
+ * @param e the event to execute
+ * @return whether a matching key binding was found
*/
public boolean handleKeyTyped(final KeyEvent e)
{
@@ -469,7 +447,7 @@
}
/**
- * Execute a {@link KeyBinding} instance.
+ * Executes a {@link KeyBinding} instance.
* @param keyBinding the key binding to execute; may be <code>null</code>
* @return whether <code>keyBinding</code> is not <code>null</code>
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|