svn commit: r1026566 - in /logging/chainsaw/trunk/src/main: java/org/apache/log4j/chainsaw/ resources/org/apache/log4j/chainsaw/ resources/org/apache/log4j/chainsaw/help/

[email protected]
Newsgroups gmane.comp.apache.logging
Message-ID <[email protected]>
Author: sdeboy
Date: Sat Oct 23 06:27:25 2010
New Revision: 1026566

URL: http://svn.apache.org/viewvc?rev=1026566&view=rev
Log:
replaced alt and ctrl keyboard masks where appropriate with Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) calls

Added cmd-F and cmd-R to set focus in find and refine focus comboboxes, respectively, and cmd-shift-F and cmd-shift-R to clear those fields

Added keyboard shortcuts to release notes.


Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileMenu.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
    logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/WelcomePanel.html
    logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java?rev=1026566&r1=1026565&r2=1026566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java Sat Oct 23 06:27:25 2010
@@ -20,6 +20,7 @@ package org.apache.log4j.chainsaw;
 import java.awt.BorderLayout;
 import java.awt.Dimension;
 import java.awt.Insets;
+import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.InputEvent;
@@ -213,7 +214,7 @@ class ChainsawToolBarAndMenus implements
     action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_T));
     action.putValue(
       Action.ACCELERATOR_KEY,
-      KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.ALT_MASK));
+      KeyStroke.getKeyStroke(KeyEvent.VK_T, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
     action.putValue(
       Action.SMALL_ICON, new ImageIcon(ChainsawIcons.WINDOW_ICON));
 
@@ -238,7 +239,7 @@ class ChainsawToolBarAndMenus implements
      action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_B));
      action.putValue(
        Action.ACCELERATOR_KEY,
-       KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_MASK));
+       KeyStroke.getKeyStroke(KeyEvent.VK_B, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
      action.putValue(
        Action.SMALL_ICON, new ImageIcon(ChainsawIcons.SCROLL_TO_BOTTOM));
 
@@ -258,7 +259,7 @@ class ChainsawToolBarAndMenus implements
       action.putValue(Action.SHORT_DESCRIPTION, "Scroll to top");
       action.putValue("enabled", Boolean.TRUE);
       action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_T));
-      action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_A,  InputEvent.CTRL_MASK));
+      action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_A,  Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
 
       return action;
     }
@@ -312,7 +313,7 @@ class ChainsawToolBarAndMenus implements
       action.putValue(Action.SHORT_DESCRIPTION, "Toggle marker for selected row");
       action.putValue("enabled", Boolean.TRUE);
       action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_T));
-      action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F2,  InputEvent.CTRL_MASK));
+      action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F2,  Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
 
       return action;
     }
@@ -330,7 +331,7 @@ class ChainsawToolBarAndMenus implements
       action.putValue(Action.SHORT_DESCRIPTION, "Removes all markers");
       action.putValue("enabled", Boolean.TRUE);
       action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_R));
-      action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F2,  InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK));
+      action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F2,  Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() | InputEvent.SHIFT_MASK));
 
       return action;
     }
@@ -376,7 +377,7 @@ class ChainsawToolBarAndMenus implements
     action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_C));
     action.putValue(
       Action.ACCELERATOR_KEY,
-      KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, InputEvent.CTRL_MASK));
+      KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
     action.putValue(
       Action.SHORT_DESCRIPTION, "Removes all the events from the current view");
     action.putValue(Action.SMALL_ICON, new ImageIcon(ChainsawIcons.DELETE));
@@ -696,7 +697,7 @@ class ChainsawToolBarAndMenus implements
     action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_D));
     action.putValue(
       Action.ACCELERATOR_KEY,
-      KeyStroke.getKeyStroke(KeyEvent.VK_D, InputEvent.ALT_MASK));
+      KeyStroke.getKeyStroke(KeyEvent.VK_D, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
     action.putValue(Action.SHORT_DESCRIPTION, "Hides/Shows the Detail Pane");
     action.putValue(Action.SMALL_ICON, new ImageIcon(ChainsawIcons.INFO));
 
@@ -753,14 +754,14 @@ class ChainsawToolBarAndMenus implements
     detailPaneButton.getActionMap().put(
       toggleDetailPaneAction.getValue(Action.NAME), toggleDetailPaneAction);
     detailPaneButton.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
-      KeyStroke.getKeyStroke(KeyEvent.VK_D, InputEvent.ALT_MASK),
+      KeyStroke.getKeyStroke(KeyEvent.VK_D, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()),
       toggleDetailPaneAction.getValue(Action.NAME));
 
     logTreePaneButton.setAction(toggleLogTreeAction);
     logTreePaneButton.getActionMap().put(
       toggleLogTreeAction.getValue(Action.NAME), toggleLogTreeAction);
     logTreePaneButton.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
-      KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.ALT_MASK),
+      KeyStroke.getKeyStroke(KeyEvent.VK_T, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()),
       toggleLogTreeAction.getValue(Action.NAME));
     logTreePaneButton.setText(null);
 
@@ -768,7 +769,7 @@ class ChainsawToolBarAndMenus implements
     scrollToBottomButton.getActionMap().put(
       toggleScrollToBottomAction.getValue(Action.NAME), toggleScrollToBottomAction);
     scrollToBottomButton.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
-      KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_MASK),
+      KeyStroke.getKeyStroke(KeyEvent.VK_B, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()),
       toggleScrollToBottomAction.getValue(Action.NAME));
     scrollToBottomButton.setText(null);
 
@@ -894,7 +895,7 @@ class ChainsawToolBarAndMenus implements
         action.putValue(Action.SHORT_DESCRIPTION, "Searches for the next colorized event from the current location");
         action.putValue("enabled", Boolean.TRUE);
         action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_N));
-        action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));
+        action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
 
       return action;
     }
@@ -913,7 +914,7 @@ class ChainsawToolBarAndMenus implements
         action.putValue(Action.SHORT_DESCRIPTION, "Searches for the next colorized event from the current location");
         action.putValue("enabled", Boolean.TRUE);
         action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_P));
-        action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_P, InputEvent.CTRL_DOWN_MASK));
+        action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_P, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
 
       return action;
     }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileMenu.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileMenu.java?rev=1026566&r1=1026565&r2=1026566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileMenu.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileMenu.java Sat Oct 23 06:27:25 2010
@@ -21,8 +21,8 @@
 */
 package org.apache.log4j.chainsaw;
 
+import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.net.URL;
 import java.util.Iterator;
@@ -75,7 +75,7 @@ class FileMenu extends JMenu {
 
       loadLog4JAction.putValue(
         Action.ACCELERATOR_KEY,
-        KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK));
+        KeyStroke.getKeyStroke(KeyEvent.VK_O, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
       loadLog4JAction.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_L));
       loadLog4JAction.putValue(Action.SHORT_DESCRIPTION, "Loads events from a local XMLLayout-formatted file ");
       loadLog4JAction.putValue(Action.SMALL_ICON, new ImageIcon(ChainsawIcons.FILE_OPEN));
@@ -112,7 +112,7 @@ class FileMenu extends JMenu {
 
     exitAction.putValue(
       Action.ACCELERATOR_KEY,
-      KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK));
+      KeyStroke.getKeyStroke(KeyEvent.VK_X, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
     exitAction.putValue(Action.SHORT_DESCRIPTION, "Exits the Application");
     exitAction.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_X));
     exitAction.putValue(Action.NAME, "Exit");

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java?rev=1026566&r1=1026565&r2=1026566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java Sat Oct 23 06:27:25 2010
@@ -17,8 +17,8 @@
 
 package org.apache.log4j.chainsaw;
 
+import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.io.BufferedOutputStream;
 import java.io.BufferedWriter;
@@ -66,7 +66,7 @@ class FileSaveAction extends AbstractAct
 
     putValue(
       Action.ACCELERATOR_KEY,
-      KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.CTRL_MASK));
+      KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
     putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_S));
     putValue(
       Action.SHORT_DESCRIPTION, "Saves displayed events for the current tab");

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java?rev=1026566&r1=1026565&r2=1026566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java Sat Oct 23 06:27:25 2010
@@ -706,19 +706,19 @@ public class LogPanel extends DockablePa
     //we've mapped f2, shift f2 and ctrl-f2 to marker-related actions, unmap them from the table
     table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F2"), "none");
     table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, InputEvent.SHIFT_MASK), "none");
-    table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, InputEvent.CTRL_MASK), "none");
-    table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK), "none");
+    table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), "none");
+    table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() | InputEvent.SHIFT_MASK), "none");
 
     //we're also mapping ctrl-a to scroll-to-top, unmap from the table
-    table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_A, InputEvent.CTRL_MASK), "none");
+    table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_A, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), "none");
         
     searchTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F2"), "none");
     searchTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, InputEvent.SHIFT_MASK), "none");
-    searchTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, InputEvent.CTRL_MASK), "none");
-    searchTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK), "none");
+    searchTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), "none");
+    searchTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() | InputEvent.SHIFT_MASK), "none");
 
     //we're also mapping ctrl-a to scroll-to-top, unmap from the table
-    searchTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_A, InputEvent.CTRL_MASK), "none");
+    searchTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_A, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), "none");
 
     //add a listener to update the 'refine focus'
     tableModel.addNewKeyListener(new NewKeyListener() {
@@ -1099,8 +1099,6 @@ public class LogPanel extends DockablePa
 
     final JLabel filterLabel = new JLabel("Refine focus on: ");
     filterLabel.setFont(filterLabel.getFont().deriveFont(Font.BOLD));
-    filterLabel.setDisplayedMnemonic('k');
-    filterLabel.setLabelFor(filterCombo);
 
     upperPanel.add(filterLabel);
     upperPanel.add(Box.createHorizontalStrut(3));
@@ -1129,10 +1127,8 @@ public class LogPanel extends DockablePa
     //add some space between refine focus and search sections of the panel
     upperPanel.add(Box.createHorizontalStrut(25));
 
-    final JLabel findLabel = new JLabel("Search: ");
+    final JLabel findLabel = new JLabel("Find: ");
     findLabel.setFont(filterLabel.getFont().deriveFont(Font.BOLD));
-    findLabel.setDisplayedMnemonic('j');
-    findLabel.setLabelFor(findCombo);
 
     upperPanel.add(findLabel);
     upperPanel.add(Box.createHorizontalStrut(3));
@@ -1184,6 +1180,53 @@ public class LogPanel extends DockablePa
     );
     upperPanel.add(removeFindButton);
 
+    //define search and refine focus selection and clear actions
+    Action findFocusAction = new AbstractAction() {
+      public void actionPerformed(ActionEvent actionEvent) {
+        findCombo.requestFocus();
+      }
+    };
+
+    Action filterFocusAction = new AbstractAction() {
+      public void actionPerformed(ActionEvent actionEvent) {
+        filterCombo.requestFocus();
+      }
+    };
+
+    Action findClearAction = new AbstractAction() {
+      public void actionPerformed(ActionEvent actionEvent) {
+        findCombo.setSelectedIndex(-1);
+        findNext();
+      }
+    };
+
+    Action filterClearAction = new AbstractAction() {
+      public void actionPerformed(ActionEvent actionEvent) {
+        setRefineFocusText("");
+        filterCombo.refilter();
+      }
+    };
+
+    //now add them to the action and input maps for the logpanel
+        KeyStroke ksFindFocus =
+      KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
+    KeyStroke ksFilterFocus =
+      KeyStroke.getKeyStroke(KeyEvent.VK_R, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
+        KeyStroke ksFindClear =
+      KeyStroke.getKeyStroke(KeyEvent.VK_F, InputEvent.SHIFT_MASK |Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
+    KeyStroke ksFilterClear =
+      KeyStroke.getKeyStroke(KeyEvent.VK_R,  InputEvent.SHIFT_MASK | Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
+
+    getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ksFindFocus, "FindFocus");
+    getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ksFilterFocus, "FilterFocus");
+    getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ksFindClear, "FindClear");
+    getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ksFilterClear, "FilterClear");
+
+    getActionMap().put("FindFocus", findFocusAction);
+    getActionMap().put("FilterFocus", filterFocusAction);
+    getActionMap().put("FindClear", findClearAction);
+    getActionMap().put("FilterClear", filterClearAction);
+
     /*
      * Detail pane definition
      */
@@ -2767,7 +2810,7 @@ public class LogPanel extends DockablePa
       dockToggleLogTreeAction.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_T));
       dockToggleLogTreeAction.putValue(
         Action.ACCELERATOR_KEY,
-        KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.ALT_MASK));
+        KeyStroke.getKeyStroke(KeyEvent.VK_T, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
       dockToggleLogTreeAction.putValue(
         Action.SMALL_ICON, new ImageIcon(ChainsawIcons.WINDOW_ICON));
 
@@ -2797,7 +2840,7 @@ public class LogPanel extends DockablePa
 
     final SmallButton dockClearButton = new SmallButton(undockedClearAction);
     dockClearButton.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
-      KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, InputEvent.CTRL_MASK),
+      KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()),
       undockedClearAction.getValue(Action.NAME));
     dockClearButton.getActionMap().put(
       undockedClearAction.getValue(Action.NAME), undockedClearAction);
@@ -2827,7 +2870,7 @@ public class LogPanel extends DockablePa
       });
 
       toggleScrollToBottomButton.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
-  	      KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_MASK),
+  	      KeyStroke.getKeyStroke(KeyEvent.VK_B, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()),
   	      dockToggleScrollToBottomAction.getValue(Action.NAME));
   	    toggleScrollToBottomButton.getActionMap().put(
   	      dockToggleScrollToBottomAction.getValue(Action.NAME), dockToggleScrollToBottomAction);

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java?rev=1026566&r1=1026565&r2=1026566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java Sat Oct 23 06:27:25 2010
@@ -798,11 +798,11 @@ public class LogUI extends JFrame implem
     });
 
     KeyStroke ksRight =
-      KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Event.CTRL_MASK);
+      KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
     KeyStroke ksLeft =
-      KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Event.CTRL_MASK);
+      KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
     KeyStroke ksGotoLine =
-      KeyStroke.getKeyStroke(KeyEvent.VK_G,  Event.CTRL_MASK);
+      KeyStroke.getKeyStroke(KeyEvent.VK_G,  Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
 
     getTabbedPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
       ksRight, "MoveRight");

Modified: logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/WelcomePanel.html
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/WelcomePanel.html?rev=1026566&r1=1026565&r2=1026566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/WelcomePanel.html (original)
+++ logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/WelcomePanel.html Sat Oct 23 06:27:25 2010
@@ -22,7 +22,7 @@
 </HEAD>
 
 <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">
-<p><a name="TheTop"></a><table border="0" cellpadding="0" cellspacing="0" width="100%">
+<a name="TheTop"></a><table border="0" cellpadding="0" cellspacing="0" width="100%">
 	<tr valign="top">
 		<td><b><font size="+2">Chainsaw v2</font></b> - brought to you by the Log4j Dev team</td>
 		<!--<td rowspan="2" align="right"><img align="top" src="logo.jpg" border="0" alt="Log4j Logo"></td>-->
@@ -31,7 +31,7 @@
     <tr>
         <td><b>Release notes and tutorial are available from the Help menu</b></td>
     </tr>
-</table></p>
+</table>
 <!-- Removing this until we can work out why the Anchor tags don't work in Swing... -->
 <!--
 <table border="1" cellspacing="2" cellpadding="2">
@@ -44,7 +44,7 @@
 <p><table border="0" cellspacing="2" cellpadding="2" >
 <tr><td colspan="6" class="TableTitle" bgcolor="#000089"><font color="white">Hot Keys</font></td></tr>
 <tr valign="top">
-	<td nowrap class="HotKey">CTRL-LEFT</td>
+	<td nowrap class="HotKey">CMD-LEFT</td>
 	<td width="50" align="center">-</td>
 	<td>Activate a tab to the left</td>
     <td nowrap class="HotKey">CTRL-RIGHT</td>
@@ -60,18 +60,18 @@
     <td>Find previous</td>
 </tr>
 <tr valign="top">
-    <td nowrap class="HotKey">CTRL-A</td>
+    <td nowrap class="HotKey">CMD-A</td>
     <td width="50" align="center">-</td>
     <td>Scroll to top</td>
-    <td nowrap class="HotKey">CTRL-B</td>
+    <td nowrap class="HotKey">CMD-B</td>
     <td width="50" align="center">-</td>
     <td>Scroll to bottom</td>
 </tr>
 <tr valign="top" bgcolor="#EEEEEE">
-    <td nowrap class="HotKey">CTRL-F2 or double-click on a row</td>
+    <td nowrap class="HotKey">CMD-F2 or double-click on a row</td>
     <td width="50" align="center">-</td>
     <td>Define a 'marker' (add a note to a row)</td>
-    <td nowrap class="HotKey">CTRL-SHIFT-F2</td>
+    <td nowrap class="HotKey">CMD-SHIFT-F2</td>
     <td width="50" align="center">-</td>
     <td>Clear all markers</td>
 </tr>
@@ -84,34 +84,42 @@
     <td>Find previous marker</td>
 </tr>
 <tr valign="top" bgcolor="#EEEEEE">
-    <td nowrap class="HotKey">ALT-J</td>
+    <td nowrap class="HotKey">CMD-F</td>
     <td width="50" align="center">-</td>
-    <td>Set focus in 'search' field</td>
-    <td nowrap class="HotKey">ALT-K</td>
+    <td>Set focus in 'find' field</td>
+    <td nowrap class="HotKey">CMD-R</td>
     <td width="50" align="center">-</td>
     <td>Set focus in 'refine focus' field</td>
 </tr>
+<tr valign="top" bgcolor="#EEEEEE">
+    <td nowrap class="HotKey">CMD--SHIFT-F</td>
+    <td width="50" align="center">-</td>
+    <td>Clear 'find' field</td>
+    <td nowrap class="HotKey">CMD-SHIFT-R</td>
+    <td width="50" align="center">-</td>
+    <td>Clear 'refine focus' field</td>
+</tr>
 <tr valign="top" >
-	<td nowrap class="HotKey">CTRL-S</td>
+	<td nowrap class="HotKey">CMD-S</td>
 	<td width="50" align="center">-</td>
 	<td>Save displayed events</td>
-    <td nowrap class="HotKey">CTRL-O</td>
+    <td nowrap class="HotKey">CMD-O</td>
     <td width="50" align="center">-</td>
     <td>Load file of XML events</td>
 </tr>
 <tr valign="top" bgcolor="#EEEEEE">
-    <td nowrap class="HotKey">ALT-C or CTRL-BACKSPACE</td>
+    <td nowrap class="HotKey">CMD-BACKSPACE</td>
     <td width="50" align="center">-</td>
     <td>Purges current panels events</td>
-	<td nowrap class="HotKey">ALT-P or F12</td>
+	<td nowrap class="HotKey">F12</td>
 	<td width="50" align="center">-</td>
 	<td>Pause display</td>
 </tr>
 <tr valign="top">
-	<td nowrap class="HotKey">ALT-D</td>
+	<td nowrap class="HotKey">CMD-D</td>
 	<td width="50" align="center">-</td>
 	<td>Show/Hide the Detail pane</td>
-	<td nowrap class="HotKey">ALT-T</td>
+	<td nowrap class="HotKey">CMD-T</td>
 	<td width="50" align="center">-</td>
 	<td>Show/Hide the Logger Tree pane</td>
 </tr>
@@ -124,20 +132,20 @@
     <td>Show Receivers Dialog</td>
 </tr>
 <tr valign="top">
-    <td nowrap class="HotKey">CTRL-N</td>
+    <td nowrap class="HotKey">CMD-N</td>
     <td width="50" align="center">-</td>
     <td>Go to next colored row</td>
-    <td nowrap class="HotKey">CTRL-P</td>
+    <td nowrap class="HotKey">CMD-P</td>
     <td width="50" align="center">-</td>
     <td>Go to previous colored row</td>
 </tr>
 <tr valign="top" bgcolor="#EEEEEE">
-    <td nowrap class="HotKey">CTRL-G</td>
+    <td nowrap class="HotKey">CMD-G</td>
     <td width="50" align="center">-</td>
     <td>Go to line</td>
-	<td nowrap class="HotKey">ALT-X</td>
-	<td width="50" align="center">-</td>
-	<td>Exits the Application</td>
+	<td></td>
+	<td></td>
+	<td></td>
 </tr>
 </table></P>
 <!--<p><a href="#TheTop">Back to top</a></p>-->

Modified: logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html?rev=1026566&r1=1026565&r2=1026566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html (original)
+++ logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html Sat Oct 23 06:27:25 2010
@@ -10,14 +10,19 @@
 <b>NOTE:</b> The mechanism and format used to persist settings in Chainsaw is subject to change.  If you are experiencing problems displaying events in Chainsaw, please delete everything in the $user.dir/.chainsaw directory and restart Chainsaw.
 <br>
 <h1>2.1</h1>
-<h2>20 Sep 2010</h2>
+<h2>22 Oct 2010</h2>
 <ul>
-<li>Changed 'Wrap message field' preference default to true</li>
+<li>Updated keyboard shortcuts to use system-specific option (Apple command key, Windows control key)</li>
+<li>Adding new find and refine-focus key accelerators (Option-F focuses on Find field, option-R focuses on refine focus field</li>
 </ul>
 <h2>13 Oct 2010</h2>
 <ul>
 <li>Added log panel preference to display search results in the detail panel.  When the preference is enabled and a search is performed, the matching rows are displayed in a table in the details panel.  Clicking on a row in that table selects the row in the main event table.</li>
 </ul>
+<h2>22 Sep 2010</h2>
+<ul>
+<li>Changed 'Wrap message field' preference default to true</li>
+</ul>
 <h2>15 Sep 2010</h2>
 <ul>
 <li>New feature: Clickable thumbnail bar on the left shows time delta to prior displayed event if the time delta is > 1 second (behaves similarly to the thumbnail bar on the right which shows colors and search matches, but represents the time delta between events).  A bigger delta is represented as a wider line.</li>
@@ -72,7 +77,7 @@
 </ul>
 <h2>13 Jun 2010</h2>
 <ul>
-<li>When mouse is moved into the thumbnail bar, event details for the closest event w/a color rule or search match is displayed as a tooltip (enabled by default, configurable via Tab Preferences dialog, Visuals section).</li>
+<li>When mouse is moved into the thumbnail bar, event details for the closest event w/a color rule or find match is displayed as a tooltip (enabled by default, configurable via Tab Preferences dialog, Visuals section).</li>
 <li>If the 'You have no Receivers defined' dialog is displayed, a configuration URL is provided and the 'don't show me this again' checkbox is selected, the provided configuration URL is set as the Auto Config URL in application-wide preferences and used from then on when Chainsaw starts.</li>
 <li>Added ability to ignore a (possibly compound) expression, similar to ignoring loggers (available in the logger tree below hidden loggers).  Ignored expression is persisted on a per-tab basis.</li>
 </ul>
@@ -103,11 +108,11 @@
 </ul>
 <h2>11 May 2010</h2>
 <ul>
-<li>Added search and alternating row color global preferences (updated from color settings window)</li>
+<li>Added find and alternating row color global preferences (updated from color settings window)</li>
 </ul>
 <h2>9 May 2010</h2>
 <ul>
-<li>Added preference to display matching search text in the table as bold (on by default)</li>
+<li>Added preference to display matching find text in the table as bold (on by default)</li>
 </ul>
 <h2>2 May 2010</h2>
 <ul>
@@ -119,13 +124,13 @@
 </ul>
 <h2>7 Apr 2010</h2>
 <ul>
-<li>Forward and backward search, as well as forward and backward next-color search now wrap.</li>
-<li>Added display of matching search count in status bar.</li>
+<li>Forward and backward find, as well as forward and backward next-color find now wrap.</li>
+<li>Added display of matching find count in status bar.</li>
 </ul>
 <h2>6 Apr 2010</h2>
 <ul>
 <li>Added default color rule support (ability to assign a tab's color rules as the default color rules for new tabs).  Default color rules can be applied to pre-existing tabs via the 'apply a tabs colors' drop down box in the color rule dialog.</li>
-<li>Pressing enter in the search box now initiates a search.</li>
+<li>Pressing enter in the find box now initiates a find.</li>
 <li>Updated thumbnail rendering logic to display warnings, errors, fatal events and events with markers more prominently than other events.</li>
 </ul>
 <h2>3 Apr 2010</h2>
@@ -146,7 +151,7 @@ just creates a text file containing the 
 <h2>1 Apr 2010</h2>
 <ul>
 <li>Updated thumbnail bar to display all events with a defined color (will include the default color rules for marker, warning, error & fatal events).</li>
-<li>Added search matches to thumbnail bar (will display black in the left half of the row if the row matches the search expression).</li>
+<li>Added find matches to thumbnail bar (will display black in the left half of the row if the row matches the find expression).</li>
 <li>Added ctrl-n to go to next colorized event, ctrl-p to go to previous colorized event.</li>
 </ul>
 <h2>27 Mar 2010</h2>
@@ -172,8 +177,6 @@ Changed 'default' detail pane layout to 
 <li>
 New color rule: any row with a value in the 'log4j.marker' field will display as light green
 </li>
-<li>
-Added keyboard mnemonics to search field (alt-j) and refine focus field (alt-k), added shortcuts to Welcome page</li>
 </ul>
 <h2>16 Mar 2010</h2>
 <ul>
@@ -209,7 +212,7 @@ LogPanel context menu now provides 'Show
 <h2>22 Feb 2010</h2>
 <ul>
 <li>Implemented marker support (ability to add notes to rows).  Double click a row to toggle on or off a default note, or click in a row to define a custom note.  Navigate between markers with F2/Shift F2.
-    If you want to use these markers to colorize or build custom search expressions, use the column key PROP.log4j.marker.
+    If you want to use these markers to colorize or build custom find expressions, use the column key PROP.log4j.marker.
     Markers are saved and reloaded through the file-save as and file-load log4j file menus.
 </li>
 <li>Auto-configuration URL field now remembers the 10 most recent configuration files and provides a 'browse' button to load a configuration file without typing the URL.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.