[Schmitzm-commits] r2178 - in trunk/schmitzm-core/src/main/java/de/schmitzm/swing: . event

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Sat Dec 22 00:45:17 CET 2012


Author: mojays
Date: 2012-12-22 00:45:17 +0100 (Sat, 22 Dec 2012)
New Revision: 2178

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/swing/ApplicationFrame.java
   trunk/schmitzm-core/src/main/java/de/schmitzm/swing/event/ValueAdjustingKeyListener.java
Log:
ApplicationFrame: new method getStatusBar()
ValueAdjustingKeyListener: KeyEvent.getExtendedKeyCode() replaced by .getKeyCode() for compatibility with Java 1.6

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/ApplicationFrame.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/ApplicationFrame.java	2012-12-21 22:53:40 UTC (rev 2177)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/ApplicationFrame.java	2012-12-21 23:45:17 UTC (rev 2178)
@@ -150,6 +150,13 @@
   }
 
   /**
+   * Returns the status bar component of the frame.
+   */
+  protected JComponent getStatusBar() {
+    return statusBar;
+  }
+
+  /**
    * Sets a message to the status bar.
    * @param statusMess a message
    */

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/event/ValueAdjustingKeyListener.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/event/ValueAdjustingKeyListener.java	2012-12-21 22:53:40 UTC (rev 2177)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/event/ValueAdjustingKeyListener.java	2012-12-21 23:45:17 UTC (rev 2178)
@@ -66,7 +66,8 @@
    * Checks whether {@link KeyEvent} represents arrow key. 
    */
   public boolean isArrowKeyEvent(KeyEvent e) {
-    int id = e.getExtendedKeyCode();
+//    int id = e.getExtendedKeyCode(); // JDK 1.7
+    int id = e.getKeyCode();
     switch ( id ) {
       case KeyEvent.VK_UP:
       case KeyEvent.VK_DOWN:



More information about the Schmitzm-commits mailing list