logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r992196 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogPanel.java LogUI.java ReceiverConfigurationPanel.java
Date Fri, 03 Sep 2010 04:16:31 GMT
Author: sdeboy
Date: Fri Sep  3 04:16:30 2010
New Revision: 992196

URL: http://svn.apache.org/viewvc?rev=992196&view=rev
Log:
Minor UI fixes
 - Clear the status bar msg that tells you the buffer is full once the buffer is cleared
 - Removed unnecessary status bar msg
 - Changed Receiver config panel regular text log file configuration section to use textfields
instead of comboboxes for log file format or URL (no need to remember recently-added entries)

Modified:
    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/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java

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=992196&r1=992195&r2=992196&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 Fri Sep 
3 04:16:30 2010
@@ -700,6 +700,11 @@ public class LogPanel extends DockablePa
                 + getIdentifier()
                 + "' buffer has been used.  Older events are being discarded.";
               warning100 = true;
+            } else {
+                //clear msg
+                msg = "";
+                warning75 = false;
+                warning100 = false;
             }
 
             if (msg != null) {

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=992196&r1=992195&r2=992196&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 Fri Sep  3 04:16:30
2010
@@ -615,8 +615,6 @@ public class LogUI extends JFrame implem
       "visible",
       new PropertyChangeListener() {
         public void propertyChange(PropertyChangeEvent evt) {
-          MessageCenter.getInstance().getLogger().debug(
-            "Receiver's panel:" + evt.getNewValue());
           getApplicationPreferenceModel().setReceivers(
             ((Boolean) evt.getNewValue()).booleanValue());
         }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java?rev=992196&r1=992195&r2=992196&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java
Fri Sep  3 04:16:30 2010
@@ -45,6 +45,7 @@ import javax.swing.JLabel;
 import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
+import javax.swing.JTextField;
 import javax.swing.JTextPane;
 import javax.swing.SwingUtilities;
 import javax.swing.filechooser.FileFilter;
@@ -79,12 +80,10 @@ class ReceiverConfigurationPanel extends
     private JButton browseLogFileButton;
     private JComboBox logFileFormatTypeComboBox;
 
-    private JComboBox logFileFormatComboBox;
+    private JTextField logFileFormatTextField;
     private JComboBox logFileFormatTimestampFormatComboBox;
-    private JComboBox logFileURLComboBox;
-    private DefaultComboBoxModel logFileFormatComboBoxModel;
+    private JTextField logFileURLTextField;
     private DefaultComboBoxModel logFileFormatTimestampFormatComboBoxModel;
-    private DefaultComboBoxModel logFileURLComboBoxModel;
 
     //use existing configuration widgets
     private JButton browseForAnExistingConfigurationButton;
@@ -360,8 +359,7 @@ class ReceiverConfigurationPanel extends
                     URL url = browseLogFile();
                     if (url != null) {
                         String item = url.toURI().toString();
-                        logFileURLComboBoxModel.addElement(item);
-                        logFileURLComboBox.setSelectedItem(item);
+                        logFileURLTextField.setText(item);
                     }
                 } catch (Exception ex) {
                     logger.error(
@@ -384,10 +382,9 @@ class ReceiverConfigurationPanel extends
         c.anchor = GridBagConstraints.LINE_END;
         c.insets = new Insets(0, 0, 5, 5);
         panel.add(new JLabel(" Log file URL "), c);
-        logFileURLComboBoxModel = new DefaultComboBoxModel();
-        logFileURLComboBox = new JComboBox(logFileURLComboBoxModel);
-        logFileURLComboBox.setEditable(true);
-        logFileURLComboBox.setOpaque(false);
+        logFileURLTextField = new JTextField();
+        logFileURLTextField.setEditable(true);
+        logFileURLTextField.setOpaque(false);
 
         c = new GridBagConstraints();
         c.gridx = 1;
@@ -397,7 +394,7 @@ class ReceiverConfigurationPanel extends
         c.anchor = GridBagConstraints.LINE_START;
         c.fill = GridBagConstraints.HORIZONTAL;
         c.insets = new Insets(0, 0, 5, 0);
-        panel.add(logFileURLComboBox, c);
+        panel.add(logFileURLTextField, c);
 
         c = new GridBagConstraints();
         c.gridx = 0;
@@ -427,10 +424,9 @@ class ReceiverConfigurationPanel extends
         c.insets = new Insets(0, 5, 5, 5);
         panel.add(new JLabel(" Log file format "), c);
 
-        logFileFormatComboBoxModel = new DefaultComboBoxModel();
-        logFileFormatComboBox = new JComboBox(logFileFormatComboBoxModel);
-        logFileFormatComboBox.setEditable(true);
-        logFileFormatComboBox.setOpaque(false);
+        logFileFormatTextField = new JTextField();
+        logFileFormatTextField.setEditable(true);
+        logFileFormatTextField.setOpaque(false);
 
         c = new GridBagConstraints();
         c.gridx = 1;
@@ -439,7 +435,7 @@ class ReceiverConfigurationPanel extends
         c.anchor = GridBagConstraints.LINE_START;
         c.fill = GridBagConstraints.HORIZONTAL;
         c.insets = new Insets(0, 0, 5, 0);
-        panel.add(logFileFormatComboBox, c);
+        panel.add(logFileFormatTextField, c);
 
         c = new GridBagConstraints();
         c.gridx = 0;
@@ -575,9 +571,9 @@ class ReceiverConfigurationPanel extends
         networkReceiverPortComboBox.setEnabled(component == networkReceiverRadioButton);
         networkReceiverClassNameComboBox.setEnabled(component == networkReceiverRadioButton);
         browseLogFileButton.setEnabled(component == logFileReceiverRadioButton);
-        logFileURLComboBox.setEnabled(component == logFileReceiverRadioButton);
+        logFileURLTextField.setEnabled(component == logFileReceiverRadioButton);
         logFileFormatTypeComboBox.setEnabled(component == logFileReceiverRadioButton);
-        logFileFormatComboBox.setEnabled(component == logFileReceiverRadioButton);
+        logFileFormatTextField.setEnabled(component == logFileReceiverRadioButton);
         logFileFormatTimestampFormatComboBox.setEnabled(component == logFileReceiverRadioButton);
     }
 
@@ -749,7 +745,7 @@ class ReceiverConfigurationPanel extends
         URL getLogFileURL() {
             try
             {
-                Object item = logFileURLComboBox.getSelectedItem();
+                Object item = logFileURLTextField.getText();
                 if (item != null) {
                     return new URL(item.toString());
                 }
@@ -762,7 +758,7 @@ class ReceiverConfigurationPanel extends
         }
 
         String getLogFormat() {
-            Object item = logFileFormatComboBox.getSelectedItem();
+            Object item = logFileFormatTextField.getText();
             if (item != null) {
                 return item.toString();
             }



Mime
View raw message