Author: sdeboy
Date: Thu Jun 24 06:38:43 2010
New Revision: 957433
URL: http://svn.apache.org/viewvc?rev=957433&view=rev
Log:
Added 'Load Chainsaw configuration' menu item to file menu, reworded file-open
menu items (file-open currently supports only log4j or util.logging
XML-formatted log files).
Fixed graphical glitches noticed when running in Linux with default look and
feel (toolbar & dialog button text, layout tweaks)
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/AbstractPreferencePanel.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawAbout.java
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/LogPanelPreferencePanel.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/SmallToggleButton.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/OkCancelPanel.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/LayoutEditorPane.java
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.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/AbstractPreferencePanel.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/AbstractPreferencePanel.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/AbstractPreferencePanel.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/AbstractPreferencePanel.java
Thu Jun 24 06:38:43 2010
@@ -68,8 +68,8 @@ public abstract class AbstractPreference
private final JLabel titleLabel = new JLabel("Selected Pref Panel");
private final JPanel mainPanel = new JPanel(new BorderLayout(10, 10));
private final JPanel selectedPrefPanel = new JPanel(new BorderLayout(0, 3));
- private final JButton okButton = new JButton("OK");
- private final JButton cancelButton = new JButton("Cancel");
+ private final JButton okButton = new JButton(" OK ");
+ private final JButton cancelButton = new JButton(" Cancel ");
private ActionListener okCancelListener;
private Component currentlyDisplayedPanel = null;
private final JTree prefTree = new JTree();
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
Thu Jun 24 06:38:43 2010
@@ -76,8 +76,9 @@ public class ApplicationPreferenceModelP
private JTextField cyclicBufferSize;
private JComboBox configurationURL;
private final Logger logger;
+ private GeneralAllPrefPanel generalAllPrefPanel;
- ApplicationPreferenceModelPanel(ApplicationPreferenceModel model) {
+ ApplicationPreferenceModelPanel(ApplicationPreferenceModel model) {
this.committedPreferenceModel = model;
logger = LogManager.getLogger(ApplicationPreferenceModelPanel.class);
initComponents();
@@ -155,8 +156,9 @@ public static void main(String[] args) {
new DefaultMutableTreeNode("Preferences");
DefaultTreeModel model = new DefaultTreeModel(rootNode);
- DefaultMutableTreeNode general =
- new DefaultMutableTreeNode(new GeneralAllPrefPanel());
+ generalAllPrefPanel = new GeneralAllPrefPanel();
+ DefaultMutableTreeNode general =
+ new DefaultMutableTreeNode(generalAllPrefPanel);
DefaultMutableTreeNode visuals =
new DefaultMutableTreeNode(new VisualsPrefPanel());
@@ -167,7 +169,11 @@ public static void main(String[] args) {
return model;
}
- public class VisualsPrefPanel extends BasicPrefPanel {
+ public void browseForConfiguration() {
+ generalAllPrefPanel.browseForConfiguration();
+ }
+
+ public class VisualsPrefPanel extends BasicPrefPanel {
private final JRadioButton topPlacement = new JRadioButton("Top");
private final JRadioButton bottomPlacement = new JRadioButton("Bottom");
private final JCheckBox statusBar = new JCheckBox("Show Status bar");
@@ -489,45 +495,12 @@ public static void main(String[] args) {
p6.add(configURLPanel);
- JButton browseButton = new JButton("Browse");
+ JButton browseButton = new JButton(" Browse ");
browseButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
-
- String defaultPath = ".";
- if (configurationURL.getItemCount() > 0) {
- Object selectedItem = configurationURL.getSelectedItem();
- if (selectedItem != null) {
- File currentConfigurationPath = new
File(selectedItem.toString()).getParentFile();
- if (currentConfigurationPath != null) {
- defaultPath = currentConfigurationPath.getPath();
- //JFileChooser constructor will not navigate to this
location unless we remove the prefixing protocol and slash
- //at least on winxp
- if (defaultPath.toLowerCase().startsWith("file:\\"))
{
- defaultPath =
defaultPath.substring("file:\\".length());
- }
- }
- }
- }
-
- JFileChooser chooser = new JFileChooser(defaultPath);
- int result =
chooser.showOpenDialog(ApplicationPreferenceModelPanel.this);
- if (JFileChooser.APPROVE_OPTION == result) {
- File f = chooser.getSelectedFile();
- try
- {
- String newConfigurationFile =
f.toURI().toURL().toExternalForm();
- if
(!committedPreferenceModel.getConfigurationURLs().contains(newConfigurationFile))
{
- configurationURL.addItem(newConfigurationFile);
- }
- configurationURL.setSelectedItem(newConfigurationFile);
- }
- catch (MalformedURLException e1)
- {
- e1.printStackTrace(); //To change body of catch
statement use File | Settings | File Templates.
- }
- }
+ browseForConfiguration();
}
});
Box browsePanel = new Box(BoxLayout.X_AXIS);
@@ -557,7 +530,43 @@ public static void main(String[] args) {
configurationURL.setSelectedItem(configToDisplay);
}
- private void initSliderComponent() {
+ public void browseForConfiguration() {
+ String defaultPath = ".";
+ if (configurationURL.getItemCount() > 0) {
+ Object selectedItem = configurationURL.getSelectedItem();
+ if (selectedItem != null) {
+ File currentConfigurationPath = new
File(selectedItem.toString()).getParentFile();
+ if (currentConfigurationPath != null) {
+ defaultPath = currentConfigurationPath.getPath();
+ //JFileChooser constructor will not navigate to this
location unless we remove the prefixing protocol and slash
+ //at least on winxp
+ if (defaultPath.toLowerCase().startsWith("file:\\")) {
+ defaultPath =
defaultPath.substring("file:\\".length());
+ }
+ }
+ }
+ }
+
+ JFileChooser chooser = new JFileChooser(defaultPath);
+ int result =
chooser.showOpenDialog(ApplicationPreferenceModelPanel.this);
+ if (JFileChooser.APPROVE_OPTION == result) {
+ File f = chooser.getSelectedFile();
+ try
+ {
+ String newConfigurationFile =
f.toURI().toURL().toExternalForm();
+ if
(!committedPreferenceModel.getConfigurationURLs().contains(newConfigurationFile))
{
+ configurationURL.addItem(newConfigurationFile);
+ }
+ configurationURL.setSelectedItem(newConfigurationFile);
+ }
+ catch (MalformedURLException e1)
+ {
+ e1.printStackTrace(); //To change body of catch statement
use File | Settings | File Templates.
+ }
+ }
+ }
+
+ private void initSliderComponent() {
responsiveSlider.setToolTipText(
"Adjust to set the responsiveness of the app. How often the view is
updated.");
responsiveSlider.setSnapToTicks(true);
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawAbout.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawAbout.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawAbout.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawAbout.java
Thu Jun 24 06:38:43 2010
@@ -63,7 +63,7 @@ class ChainsawAbout extends JDialog {
setBackground(Color.white);
getContentPane().setLayout(new BorderLayout());
- JButton closeButton = new JButton("Close");
+ JButton closeButton = new JButton(" Close ");
closeButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setVisible(false);
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=957433&r1=957432&r2=957433&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
Thu Jun 24 06:38:43 2010
@@ -1059,8 +1059,8 @@ class ChainsawToolBarAndMenus implements
new ExpressionRuleContext(new FilterModel(), entryField));
panel.add(entryField, BorderLayout.CENTER);
- JButton ok = new JButton("OK");
- JButton close = new JButton("Close");
+ JButton ok = new JButton(" OK ");
+ JButton close = new JButton(" Close ");
JPanel lowerPanel = new JPanel();
lowerPanel.add(ok);
lowerPanel.add(Box.createHorizontalStrut(7));
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=957433&r1=957432&r2=957433&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
Thu Jun 24 06:38:43 2010
@@ -51,6 +51,7 @@ import org.apache.log4j.xml.XMLDecoder;
* @author Scott Deboy <[email protected]>
*/
class FileMenu extends JMenu {
+ private Action loadConfigAction;
private Action exitAction;
private Action loadLog4JAction;
private Action loadUtilLoggingAction;
@@ -62,9 +63,15 @@ class FileMenu extends JMenu {
super("File");
setMnemonic(KeyEvent.VK_F);
+ loadConfigAction = new AbstractAction("Load Chainsaw configuration"){
+ public void actionPerformed(ActionEvent actionEvent) {
+ logUI.showApplicationPreferencesBrowse();
+ }
+ };
+
loadLog4JAction =
new FileLoadAction(
- logUI, new XMLDecoder(logUI), "Process events from local log4j
XML-formatted file (.xml or .zip)...", false);
+ logUI, new XMLDecoder(logUI), "Open log4j XML-formatted file (.xml or
.zip)...", false);
loadLog4JAction.putValue(
Action.ACCELERATOR_KEY,
@@ -76,19 +83,20 @@ class FileMenu extends JMenu {
loadUtilLoggingAction =
new FileLoadAction(
logUI, new UtilLoggingXMLDecoder(logUI),
- "Process events from local java.util.logging XML-formatted file...",
false);
+ "Open util.logging XML-formatted file (.xml or .zip)...", false);
remoteLog4JAction =
new FileLoadAction(
- logUI, new XMLDecoder(logUI), "Process events from remote log4j
XML-formatted file...",
+ logUI, new XMLDecoder(logUI), "Open remote log4j XML-formatted file
(.xml or .zip)...",
true);
remoteUtilLoggingAction =
new FileLoadAction(
logUI, new UtilLoggingXMLDecoder(logUI),
- "Process events from remote java.util.logging XML-formatted file...",
true);
+ "Open remote util.logging XML-formatted file (.xml or .zip)...", true);
saveAction = new FileSaveAction(logUI);
+ JMenuItem loadChainsawConfig = new JMenuItem(loadConfigAction);
JMenuItem loadLog4JFile = new JMenuItem(loadLog4JAction);
JMenuItem loadUtilLoggingFile = new JMenuItem(loadUtilLoggingAction);
JMenuItem remoteLog4JFile = new JMenuItem(remoteLog4JAction);
@@ -111,6 +119,7 @@ class FileMenu extends JMenu {
JMenuItem menuItemExit = new JMenuItem(exitAction);
+ add(loadChainsawConfig);
add(loadLog4JFile);
add(loadUtilLoggingFile);
addSeparator();
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=957433&r1=957432&r2=957433&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
Thu Jun 24 06:38:43 2010
@@ -89,7 +89,7 @@ class FileSaveAction extends AbstractAct
}
chooser.setAcceptAllFileFilterUsed(true);
- chooser.setDialogTitle("Save displayed events to XML file...");
+ chooser.setDialogTitle("Save displayed events (XML or .zipped XML)...");
chooser.showSaveDialog(parent);
File selectedFile = chooser.getSelectedFile();
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=957433&r1=957432&r2=957433&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
Thu Jun 24 06:38:43 2010
@@ -1073,7 +1073,7 @@ public class LogPanel extends DockablePa
new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
//Adding a button to clear filter expressions which are currently
remembered by Chainsaw...
- final JButton clearButton = new JButton("Clear expression");
+ final JButton clearButton = new JButton(" Clear expression ");
clearButton.setToolTipText("Click here to remove the selected expression
from the list");
clearButton.addActionListener(
new AbstractAction() {
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanelPreferencePanel.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanelPreferencePanel.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanelPreferencePanel.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanelPreferencePanel.java
Thu Jun 24 06:38:43 2010
@@ -236,15 +236,15 @@ public class LogPanelPreferencePanel ext
private JTextField customFormatText = new JTextField("", 10);
private JTextField loggerPrecision = new JTextField(10);
- private JRadioButton rdCustom = new JRadioButton("Custom Format");
+ private JRadioButton rdCustom = new JRadioButton("Custom Format ");
private final JRadioButton rdISO =
new JRadioButton(
- "<html><b>Fast</b> ISO 8601 format (yyyy-MM-dd HH:mm:ss)</html>");
+ "<html><b>Fast</b> ISO 8601 format (yyyy-MM-dd HH:mm:ss) </html>");
private final JTextField timeZone = new JTextField(10);
- private final JRadioButton rdLevelIcons = new JRadioButton("Icons");
- private final JRadioButton rdLevelText = new JRadioButton("Text");
- private final JCheckBox wrapMessage = new JCheckBox("Display entire
message and marker text in the table (multi-line rows)");
- private final JCheckBox highlightSearchMatchText = new
JCheckBox("Highlight search match text");
+ private final JRadioButton rdLevelIcons = new JRadioButton("Icons ");
+ private final JRadioButton rdLevelText = new JRadioButton("Text ");
+ private final JCheckBox wrapMessage = new JCheckBox("Wrap message field
(display multi-line rows) ");
+ private final JCheckBox highlightSearchMatchText = new
JCheckBox("Highlight search match text ");
private JRadioButton rdLast;
//~ Constructors ==========================================================
@@ -337,7 +337,7 @@ public class LogPanelPreferencePanel ext
dateFormatPanel.add(customPanel);
dateFormatPanel.add(Box.createVerticalStrut(5));
- JLabel dateFormatLabel = new JLabel("Time zone of events on tab (leave
blank for local time zone");
+ JLabel dateFormatLabel = new JLabel("Time zone of events (or blank for
local time zone");
dateFormatPanel.add(dateFormatLabel);
timeZone.setMaximumSize(timeZone.getPreferredSize());
@@ -378,7 +378,7 @@ public class LogPanelPreferencePanel ext
loggerFormatPanel.add(Box.createVerticalStrut(3));
final JLabel precisionLabel =
- new JLabel("Number of package levels to hide (leave blank to display
full logger)");
+ new JLabel("Number of package levels to hide (or blank to display full
logger)");
loggerFormatPanel.add(precisionLabel);
loggerFormatPanel.add(Box.createVerticalStrut(5));
@@ -387,7 +387,6 @@ public class LogPanelPreferencePanel ext
loggerFormatPanel.add(loggerPrecision);
add(loggerFormatPanel);
- add(Box.createVerticalGlue());
}
/*
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=957433&r1=957432&r2=957433&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
Thu Jun 24 06:38:43 2010
@@ -54,7 +54,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.BorderFactory;
@@ -66,7 +65,6 @@ import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
-import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
@@ -85,7 +83,6 @@ import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
-
import org.apache.log4j.Appender;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.Level;
@@ -108,7 +105,6 @@ import org.apache.log4j.chainsaw.prefs.S
import org.apache.log4j.chainsaw.prefs.SettingsListener;
import org.apache.log4j.chainsaw.prefs.SettingsManager;
import org.apache.log4j.chainsaw.receivers.ReceiversPanel;
-import org.apache.log4j.helpers.Constants;
import org.apache.log4j.net.SocketNodeEventListener;
import org.apache.log4j.plugins.Plugin;
import org.apache.log4j.plugins.PluginEvent;
@@ -430,8 +426,11 @@ public class LogUI extends JFrame implem
}});
LogManager.getRootLogger().setLevel(Level.TRACE);
-
- logUI.activateViewer();
+ EventQueue.invokeLater(new Runnable() {
+ public void run() {
+ logUI.activateViewer();
+ }
+ });
logger.info("SecurityManager is now: " + System.getSecurityManager());
@@ -1444,12 +1443,9 @@ public class LogUI extends JFrame implem
dialog.setLocation(
(screenSize.width / 2) - (dialog.getWidth() / 2),
(screenSize.height / 2) - (dialog.getHeight() / 2));
- dialog.setVisible(true);
-
- dialog.dispose();
- applicationPreferenceModel.setShowNoReceiverWarning(
- !noReceiversWarningPanel.isDontWarnMeAgain());
+ dialog.setVisible(true);
+
applicationPreferenceModel.setShowNoReceiverWarning(!noReceiversWarningPanel.isDontWarnMeAgain());
if (noReceiversWarningPanel.getModel().isManualMode()) {
applicationPreferenceModel.setReceivers(true);
@@ -1550,6 +1546,12 @@ public class LogUI extends JFrame implem
preferencesFrame.setVisible(true);
}
+ public void showApplicationPreferencesBrowse() {
+ applicationPreferenceModelPanel.updateModel();
+ preferencesFrame.setVisible(true);
+ applicationPreferenceModelPanel.browseForConfiguration();
+ }
+
public void showAboutBox() {
if (aboutBox == null) {
aboutBox = new ChainsawAbout(this);
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
Thu Jun 24 06:38:43 2010
@@ -381,7 +381,7 @@ final class LoggerNameTreePanel extends
ignoreExpressionEntryField.addKeyListener(new
ExpressionRuleContext(filterModel, ignoreExpressionEntryField));
ignoreExpressionDialogPanel.add(new
JScrollPane(ignoreExpressionEntryField), BorderLayout.CENTER);
- JButton ignoreExpressionCloseButton = new JButton(new
AbstractAction("Close") {
+ JButton ignoreExpressionCloseButton = new JButton(new AbstractAction("
Close ") {
public void actionPerformed(ActionEvent e)
{
String ignoreText = ignoreExpressionEntryField.getText();
@@ -396,7 +396,7 @@ final class LoggerNameTreePanel extends
Box ignoreListButtonPanel = Box.createHorizontalBox();
- JButton unhideAll = new JButton(new AbstractAction("Unhide All") {
+ JButton unhideAll = new JButton(new AbstractAction(" Unhide All ") {
public void actionPerformed(final ActionEvent e)
{
@@ -411,7 +411,7 @@ final class LoggerNameTreePanel extends
ignoreListButtonPanel.add(unhideAll);
ignoreListButtonPanel.add(Box.createHorizontalGlue());
- JButton ignoreCloseButton = new JButton(new AbstractAction("Close") {
+ JButton ignoreCloseButton = new JButton(new AbstractAction(" Close ") {
public void actionPerformed(ActionEvent e)
{
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java
Thu Jun 24 06:38:43 2010
@@ -28,10 +28,10 @@ import java.awt.event.FocusListener;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
-
import javax.swing.AbstractAction;
import javax.swing.BorderFactory;
import javax.swing.Box;
+import javax.swing.BoxLayout;
import javax.swing.ButtonGroup;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListCellRenderer;
@@ -44,12 +44,11 @@ import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
-import javax.swing.JTextArea;
+import javax.swing.JTextPane;
import javax.swing.SwingUtilities;
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
import javax.swing.filechooser.FileFilter;
-
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.apache.log4j.chainsaw.prefs.SettingsManager;
@@ -72,7 +71,7 @@ class NoReceiversWarningPanel extends JP
private final JComboBox previousConfigs = new JComboBox();
private final JRadioButton simpleReceiver = new JRadioButton(
- "Define a Socket-based receiver");
+ "Define a ");
private final JRadioButton justLoadingFile = new JRadioButton(
"I'm fine thanks, don't worry");
@@ -82,7 +81,7 @@ class NoReceiversWarningPanel extends JP
"Use most recent configuration defined through the Receiver
configuration panel");
private final JRadioButton manualOption = new JRadioButton(
"Define receivers through the Receiver configuration panel
(configuration saved on exit)");
- private final JButton okButton = new JButton("Ok");
+ private final JButton okButton = new JButton(" OK ");
private final PanelModel model = new PanelModel();
final DefaultComboBoxModel configModel = new DefaultComboBoxModel();
@@ -131,10 +130,9 @@ class NoReceiversWarningPanel extends JP
gc.weightx = 1.0;
gc.weighty = 1.0;
- JTextArea description = new JTextArea("To load events into Chainsaw, a
'receiver' configuration must be provided.\n\n" +
+ JTextPane description = new JTextPane();
+ description.setText("To load events into Chainsaw, a 'receiver'
configuration must be provided.\n\n" +
"NOTE: An example receiver configuration is available from the
Welcome tab ('view example receiver configuration')");
- description.setWrapStyleWord(true);
- description.setLineWrap(true);
description.setEditable(false);
description.setOpaque(false);
description.setFont(getFont());
@@ -239,7 +237,7 @@ class NoReceiversWarningPanel extends JP
});
final JButton searchButton = new JButton(new AbstractAction(
- "Browse...") {
+ " Browse... ") {
public void actionPerformed(ActionEvent e) {
try {
@@ -323,11 +321,11 @@ class NoReceiversWarningPanel extends JP
}
});
- JPanel simpleSocketPanel = new JPanel(new GridBagLayout());
-
- GridBagConstraints simpleSocketGC = new GridBagConstraints();
+ JPanel simpleSocketPanel = new JPanel();
+ simpleSocketPanel.setLayout(new BoxLayout(simpleSocketPanel,
BoxLayout.X_AXIS));
- simpleSocketPanel.add(simpleReceiver, simpleSocketGC);
+ simpleSocketPanel.add(simpleReceiver);
+ simpleSocketPanel.add(Box.createHorizontalStrut(5));
final JComboBox socketCombo = new JComboBox(simplePortModel);
@@ -361,8 +359,10 @@ class NoReceiversWarningPanel extends JP
});
simpleSocketPanel.add(receiverCombo);
+ simpleSocketPanel.add(Box.createHorizontalStrut(5));
simpleSocketPanel.add(new JLabel(" on port "));
- simpleSocketPanel.add(socketCombo, simpleSocketGC);
+ simpleSocketPanel.add(Box.createHorizontalStrut(5));
+ simpleSocketPanel.add(socketCombo);
/**
* This listener activates/deactivates certain controls based on the
current
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/SmallToggleButton.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/SmallToggleButton.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/SmallToggleButton.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/SmallToggleButton.java
Thu Jun 24 06:38:43 2010
@@ -45,7 +45,7 @@ import javax.swing.border.SoftBevelBorde
class SmallToggleButton extends JToggleButton implements ItemListener,
MouseListener {
protected Border m_highlighted = new SoftBevelBorder(BevelBorder.RAISED);
- protected Border m_raised = BorderFactory.createEmptyBorder();
+ protected Border m_raised = BorderFactory.createEmptyBorder(3, 3, 3, 3);
protected Border m_inactive = m_raised;
protected Border m_border = m_inactive;
protected Border m_lowered = new SoftBevelBorder(BevelBorder.LOWERED);
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
Thu Jun 24 06:38:43 2010
@@ -493,7 +493,7 @@ public class ColorPanel extends JPanel
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
panel.add(Box.createHorizontalGlue());
- JButton saveAsDefaultButton = new JButton("Save as default");
+ JButton saveAsDefaultButton = new JButton(" Save as default ");
saveAsDefaultButton.addActionListener(
new AbstractAction() {
@@ -505,7 +505,7 @@ public class ColorPanel extends JPanel
panel.add(saveAsDefaultButton);
- JButton applyButton = new JButton("Apply");
+ JButton applyButton = new JButton(" Apply ");
applyButton.addActionListener(
new AbstractAction() {
@@ -519,7 +519,7 @@ public class ColorPanel extends JPanel
panel.add(Box.createHorizontalStrut(10));
panel.add(applyButton);
- JButton closeButton = new JButton("Close");
+ JButton closeButton = new JButton(" Close ");
closeButton.addActionListener(
new AbstractAction() {
@@ -649,7 +649,7 @@ public class ColorPanel extends JPanel
buttonPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
JPanel newPanel = new JPanel();
- JButton newButton = new JButton("New");
+ JButton newButton = new JButton(" New ");
newButton.addActionListener(
new AbstractAction() {
public void actionPerformed(ActionEvent evt) {
@@ -674,7 +674,7 @@ public class ColorPanel extends JPanel
newPanel.add(newButton);
JPanel deletePanel = new JPanel();
- final JButton deleteButton = new JButton("Delete");
+ final JButton deleteButton = new JButton(" Delete ");
deleteButton.setEnabled(false);
deleteButton.addActionListener(
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/OkCancelPanel.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/OkCancelPanel.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/OkCancelPanel.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/OkCancelPanel.java
Thu Jun 24 06:38:43 2010
@@ -26,8 +26,8 @@ import javax.swing.JPanel;
public class OkCancelPanel extends JPanel {
- private final JButton cancelButton = new JButton("Cancel");
- private final JButton okButton = new JButton("Ok");
+ private final JButton cancelButton = new JButton(" Cancel ");
+ private final JButton okButton = new JButton(" OK ");
public OkCancelPanel() {
setLayout(new GridBagLayout());
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/LayoutEditorPane.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/LayoutEditorPane.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/LayoutEditorPane.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/LayoutEditorPane.java
Thu Jun 24 06:38:43 2010
@@ -63,8 +63,8 @@ public final class LayoutEditorPane exte
private final Action cutAction;
private final JToolBar editorToolbar = new JToolBar();
private final JToolBar okCancelToolbar = new JToolBar();
- private final JButton okButton = new JButton("Ok");
- private final JButton cancelButton = new JButton("Cancel");
+ private final JButton okButton = new JButton(" OK ");
+ private final JButton cancelButton = new JButton(" Cancel ");
// private final JButton applyButton = new JButton();
private final JEditorPane patternEditor = new JEditorPane("text/plain", "");
Modified:
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
URL:
http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java?rev=957433&r1=957432&r2=957433&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
(original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
Thu Jun 24 06:38:43 2010
@@ -532,7 +532,7 @@ public class VFSLogFilePatternReceiver e
gc.anchor=GridBagConstraints.SOUTH;
gc.fill=GridBagConstraints.NONE;
- JButton submitButton = new JButton("Submit");
+ JButton submitButton = new JButton(" Submit ");
panel.add(submitButton, gc);
getContentPane().add(panel);
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=957433&r1=957432&r2=957433&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
Thu Jun 24 06:38:43 2010
@@ -94,7 +94,7 @@
<tr valign="top" >
<td nowrap class="HotKey">CTRL-S</td>
<td width="50" align="center">-</td>
- <td>Save displayed events as XML</td>
+ <td>Save displayed events</td>
<td nowrap class="HotKey">CTRL-O</td>
<td width="50" align="center">-</td>
<td>Load file of XML events</td>
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=957433&r1=957432&r2=957433&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
Thu Jun 24 06:38:43 2010
@@ -1,20 +1,3 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
@@ -27,6 +10,11 @@
<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>24 Jun 2010</h2>
+<ul>
+<li>Added 'Load Chainsaw configuration' menu item to file menu, reworded
file-open menu items (file-open currently supports only log4j or util.logging
XML-formatted log files).</li>
+<li>Fixed graphical glitches noticed when running in Linux with default look
and feel.</li>
+</ul>
<h2>20 Jun 2010</h2>
<ul>
<li>Added new 'ignore loggers below selection' context menu item to logger
tree context menu (makes it easy to quickly display specific loggers without
building expressions - hide all loggers below the selection and then enable
individual sub-loggers).</li>
@@ -54,6 +42,10 @@
<ul>
<li>Loggers can now be ignored from the logger tree even while focus-on is
enabled.</li>
</ul>
+<h2>5 Jun 2010</h2>
+<ul>
+<li>Added new 'ignore all loggers' context menu item to logger tree context
menu (makes it easy to quickly display specific loggers without building
expressions - hide all loggers and then enable individual loggers).</li>
+</ul>
<h2>20 May 2010</h2>
<ul>
<li>For users who would like to specify the Chainsaw configuration file from
the command line, specify the URL to a configuration file as the first argument
to Chainsaw (will bypass the the initial use of the automatic configuration URL
mechanism). Example: java -classpath {classpath here}
org.apache.log4j.chainsaw.LogUI
file:///c:/downloads/tools/log4j/config/log4j.xml</li>