psmith 2003/06/24 16:18:35
Modified: src/java/org/apache/log4j/chainsaw
ChainsawToolBarAndMenus.java
Log:
added convenience button to toolbar to show/hide Receivers panel. (could do with a
nice icon).
Revision Changes Path
1.47 +10 -2
jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java
Index: ChainsawToolBarAndMenus.java
===================================================================
RCS file:
/home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- ChainsawToolBarAndMenus.java 23 Jun 2003 02:50:11 -0000 1.46
+++ ChainsawToolBarAndMenus.java 24 Jun 2003 23:18:35 -0000 1.47
@@ -113,6 +113,7 @@
class ChainsawToolBarAndMenus implements ChangeListener, SettingsListener {
private static final String SETTING_RESPONSIVENESS = "Responsiveness";
private static final String SETTING_TAB_PLACEMENT = "tab.placement";
+ private final SmallToggleButton showReceiversButton;
final JTextField findTextField;
private final Action clearAction;
private final Action closeAction;
@@ -127,7 +128,6 @@
private final Collection lookAndFeelMenus = new ArrayList();
private final JCheckBoxMenuItem toggleShowReceiversCheck =
new JCheckBoxMenuItem();
-
private final FileMenu fileMenu;
private final JCheckBoxMenuItem toggleStatusBarCheck =
new JCheckBoxMenuItem();
@@ -165,6 +165,8 @@
clearAction = createClearAction();
undockAction = createUndockAction();
showReceiversAction = createShowReceiversAction();
+ showReceiversButton = new SmallToggleButton(showReceiversAction);
+
toggleDetailPaneAction = createToggleDetailPaneAction();
responsiveSlider =
new JSlider(JSlider.VERTICAL, 0, 5000, logui.handler.getQueueInterval());
@@ -689,8 +691,8 @@
}
String ident = logPanel.getIdentifier();
-// System.out.println("trying to pause '" + ident + "'");
+ // System.out.println("trying to pause '" + ident + "'");
if (!logui.pausedList.contains(ident)) {
logui.pausedList.add(ident);
} else {
@@ -801,6 +803,7 @@
action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("F6"));
toggleShowReceiversCheck.setAction(action);
+
return action;
}
@@ -938,6 +941,10 @@
findBox.add(findTextField);
toolbar.add(findBox);
+ toolbar.addSeparator();
+
+ toolbar.add(showReceiversButton);
+
toolbar.add(Box.createHorizontalGlue());
toolbar.setMargin(buttonMargins);
@@ -1009,6 +1016,7 @@
toggleStatusBarCheck.setSelected(logui.isStatusBarVisible());
toggleShowReceiversCheck.setSelected(logui.isReceiverPanelVisible());
+ showReceiversButton.setSelected(logui.isReceiverPanelVisible());
/**
* We get the currently selected LogPanel, and if null, deactivate some
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]