psmith 2003/09/02 15:24:08
Modified: src/java/org/apache/log4j/chainsaw LoggerNameTreePanel.java
ChainsawToolBarAndMenus.java WelcomePanel.html
Log:
Added accelerator to the toggle of the Logger tree (ALT-T), plus updated
the Welcome html to reflect that.
Modified the Expand/Collapse icons to be just +/- characters
rather than the magnify icon, as this is more intuitive.
Will use the Magnify etc icons for a "Focus On.." concept
similar to Eclipse's Hierarchy view, which effectively places a simple
logger filter on the model.
Revision Changes Path
1.5 +7 -6
jakarta-log4j/src/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
Index: LoggerNameTreePanel.java
===================================================================
RCS file:
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LoggerNameTreePanel.java 2 Sep 2003 08:19:59 -0000 1.4
+++ LoggerNameTreePanel.java 2 Sep 2003 22:24:08 -0000 1.5
@@ -58,6 +58,7 @@
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
+import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.MouseAdapter;
@@ -215,8 +216,6 @@
action.putValue(
Action.SHORT_DESCRIPTION,
"Collapses all the children of the currently selected node");
- action.putValue(
- Action.SMALL_ICON, new ImageIcon(ChainsawIcons.ICON_COLLAPSE));
action.setEnabled(false);
return action;
@@ -316,8 +315,6 @@
action.putValue(
Action.SHORT_DESCRIPTION,
"Expands all the child nodes of the currently selected node, recursively");
- action.putValue(
- Action.SMALL_ICON, new ImageIcon(ChainsawIcons.UNDOCKED_ICON));
action.setEnabled(false);
return action;
@@ -434,11 +431,15 @@
private void configureToolbarPanel() {
toolbar.setFloatable(false);
+
expandButton.setAction(expandAction);
- expandButton.setText(null);
+ expandButton.setText("+");
collapseButton.setAction(collapseAction);
- collapseButton.setText(null);
+ collapseButton.setText("-");
+ expandButton.setFont(expandButton.getFont().deriveFont(Font.BOLD));
+ collapseButton.setFont(collapseButton.getFont().deriveFont(Font.BOLD));
+
editLoggerButton.setAction(editLoggerAction);
editLoggerButton.setText(null);
closeButton.setAction(closeAction);
1.4 +11 -2
jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java
Index: ChainsawToolBarAndMenus.java
===================================================================
RCS file:
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ChainsawToolBarAndMenus.java 2 Sep 2003 03:39:16 -0000 1.3
+++ ChainsawToolBarAndMenus.java 2 Sep 2003 22:24:08 -0000 1.4
@@ -245,6 +245,11 @@
action.putValue(Action.NAME, "Logger Tree");
action.putValue(Action.SHORT_DESCRIPTION, "Toggles the Log Tree panel");
+ action.putValue("enabled", Boolean.TRUE);
+ action.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_T));
+ action.putValue(
+ Action.ACCELERATOR_KEY,
+ KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.ALT_MASK));
// TODO find an icon
return action;
@@ -1015,9 +1020,13 @@
toggleDetailPaneAction.getValue(Action.NAME));
logTreePaneButton.setAction(toggleLogTreeAction);
-
// logTreePaneButton.setText(null);
- // TODO add accelerator to this action
+ logTreePaneButton.getActionMap().put(
+ toggleLogTreeAction.getValue(Action.NAME), toggleLogTreeAction);
+ logTreePaneButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
+ KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.ALT_MASK),
+ toggleDetailPaneAction.getValue(Action.NAME));
+
SmallButton prefsButton = new SmallButton(showPreferencesAction);
SmallButton undockButton = new SmallButton(undockAction);
undockButton.setText("");
1.3 +5 -2
jakarta-log4j/src/java/org/apache/log4j/chainsaw/WelcomePanel.html
Index: WelcomePanel.html
===================================================================
RCS file:
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/WelcomePanel.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- WelcomePanel.html 26 Jun 2003 23:01:00 -0000 1.2
+++ WelcomePanel.html 2 Sep 2003 22:24:08 -0000 1.3
@@ -58,12 +58,15 @@
<tr valign="top">
<td nowrap class="HotKey">ALT-P</td>
<td width="50" align="center">-</td>
- <td colspan="4">Pause display</td>
+ <td colspan="4">Purges current panels events</td>
</tr>
<tr valign="top" bgcolor="#EEEEEE">
<td nowrap class="HotKey">ALT-D</td>
<td width="50" align="center">-</td>
- <td colspan="4">Show/Hide the Detail pane</td>
+ <td colspan="1">Show/Hide the Detail pane</td>
+ <td nowrap class="HotKey">ALT-T</td>
+ <td width="50" align="center">-</td>
+ <td colspan="1">Show/Hide the Logger Tree pane</td>
</tr>
<tr valign="top">
<td nowrap class="HotKey">ALT-X</td>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]