/[classpath]/classpath/javax/swing/KeyStroke.java
ViewVC logotype

Diff of /classpath/javax/swing/KeyStroke.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9.2.3 by gnu_andrew, Thu Jan 27 09:45:35 2005 UTC revision 1.9.2.4 by gnu_andrew, Wed Feb 16 01:11:42 2005 UTC
# Line 96  public class KeyStroke Line 96  public class KeyStroke
96      return (KeyStroke) getAWTKeyStroke(keyCode, modifiers);      return (KeyStroke) getAWTKeyStroke(keyCode, modifiers);
97    }    }
98    
99      /**
100       * Returns the KeyStroke according to <code>getAWTKeyStroke()</code>.
101       * But it returns null instead of throwing
102       * <code>IllegalArugmentException</code> when
103       * the keystoke sequence cannot be parsed from the given string.
104       */
105    public static KeyStroke getKeyStroke(String str)    public static KeyStroke getKeyStroke(String str)
106    {    {
107      return (KeyStroke) getAWTKeyStroke(str);      try
108          {
109            return (KeyStroke) getAWTKeyStroke(str);
110          }
111        catch (IllegalArgumentException iae)
112          {
113            return null;
114          }
115    }    }
116    
117    public static KeyStroke getKeyStrokeForEvent(KeyEvent event)    public static KeyStroke getKeyStrokeForEvent(KeyEvent event)

Legend:
Removed from v.1.9.2.3  
changed lines
  Added in v.1.9.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26