logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r1034281 - in /logging/chainsaw/trunk/src/main: java/org/apache/log4j/chainsaw/ java/org/apache/log4j/chainsaw/color/ resources/org/apache/log4j/chainsaw/help/
Date Fri, 12 Nov 2010 07:09:36 GMT
Author: sdeboy
Date: Fri Nov 12 07:09:35 2010
New Revision: 1034281

URL: http://svn.apache.org/viewvc?rev=1034281&view=rev
Log:
Added per-tab preference to not use a search match color in the primary table
Added ability to use single or double quotes to surround multi-word strings in expressions

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
    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/ApplicationPreferenceModel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java?rev=1034281&r1=1034280&r2=1034281&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
Fri Nov 12 07:09:35 2010
@@ -75,6 +75,7 @@ public class ApplicationPreferenceModel 
     private static final int CONFIGURATION_URL_ENTRY_COUNT = 10;
     private List defaultColumnNames = new ArrayList();
     private boolean defaultColumnsSet;
+    private boolean bypassSearchColors = false;
 
   /**
      * @param listener
@@ -234,6 +235,7 @@ public class ApplicationPreferenceModel 
       if (model.isDefaultColumnsSet()) {
         setDefaultColumnNames(model.getDefaultColumnNames());
       }
+      setBypassSearchColors(model.isBypassSearchColors());
     }
 
     //use a lighter version of search color as the delta color
@@ -518,4 +520,12 @@ public class ApplicationPreferenceModel 
   public List getDefaultColumnNames() {
     return defaultColumnNames;
   }
+
+  public void setBypassSearchColors(boolean bypassSearchColors) {
+    this.bypassSearchColors = bypassSearchColors;
+  }
+
+  public boolean isBypassSearchColors() {
+    return bypassSearchColors;
+  }
 }

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=1034281&r1=1034280&r2=1034281&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 Nov 12
07:09:35 2010
@@ -1772,7 +1772,7 @@ public class LogPanel extends DockablePa
           if (currentPoint != null) {
             ((TableColorizingRenderer)currentTable.getDefaultRenderer(Object.class)).setUseNormalTimes();
             ((ChainsawCyclicBufferTableModel)currentTable.getModel()).reFilter();
-            setEnabled(false);
+            setEnabled(true);
           }
         }
     });
@@ -4280,6 +4280,7 @@ public class LogPanel extends DockablePa
         private String lastTextToMatch;
 
         public AutoFilterComboBox() {
+            textField.setPreferredSize(getPreferredSize());
             setModel(model);
             setEditor(new AutoFilterEditor());
             ((JTextField)getEditor().getEditorComponent()).getDocument().addDocumentListener(new
AutoFilterDocumentListener());

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java?rev=1034281&r1=1034280&r2=1034281&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
Fri Nov 12 07:09:35 2010
@@ -431,7 +431,7 @@ public class TableColorizingRenderer ext
         background = applicationPreferenceModel.getSearchBackgroundColor();
         foreground = applicationPreferenceModel.getSearchForegroundColor();
     } else {
-        if (colorizeSearch) {
+        if (colorizeSearch && !applicationPreferenceModel.isBypassSearchColors())
{
           background = loggingEventWrapper.isSearchMatch()?applicationPreferenceModel.getSearchBackgroundColor():loggingEventWrapper.getBackground();
           foreground = loggingEventWrapper.isSearchMatch()?applicationPreferenceModel.getSearchForegroundColor():loggingEventWrapper.getForeground();
         } else {

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=1034281&r1=1034280&r2=1034281&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 Fri
Nov 12 07:09:35 2010
@@ -46,6 +46,7 @@ import javax.swing.DefaultCellEditor;
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.Icon;
 import javax.swing.JButton;
+import javax.swing.JCheckBox;
 import javax.swing.JColorChooser;
 import javax.swing.JComboBox;
 import javax.swing.JDialog;
@@ -113,8 +114,9 @@ public class ColorPanel extends JPanel
   private Vector alternatingColorDataVector;
   private Vector alternatingColorDataVectorEntry;
   private ApplicationPreferenceModel applicationPreferenceModel;
+  private JCheckBox bypassSearchColorsCheckBox;
 
-    public ColorPanel(final RuleColorizer currentLogPanelColorizer, final FilterModel filterModel,
+  public ColorPanel(final RuleColorizer currentLogPanelColorizer, final FilterModel filterModel,
                       final Map allLogPanelColorizers, final ApplicationPreferenceModel applicationPreferenceModel)
{
     super(new BorderLayout());
 
@@ -229,6 +231,9 @@ public class ColorPanel extends JPanel
     southPanel.add(Box.createVerticalStrut(5));
     southPanel.add(Box.createVerticalStrut(5));
     JPanel searchAndAlternatingColorPanel = buildSearchAndAlternatingColorPanel();
+    JPanel bypassSearchColorsPanel = buildBypassSearchColorsPanel();
+    bypassSearchColorsCheckBox.setSelected(applicationPreferenceModel.isBypassSearchColors());
+
     JPanel globalLabelPanel = new JPanel();
     globalLabelPanel.setLayout(new BoxLayout(globalLabelPanel, BoxLayout.X_AXIS));
     JLabel globalLabel = new JLabel("Global colors:");
@@ -236,6 +241,7 @@ public class ColorPanel extends JPanel
     globalLabelPanel.add(Box.createHorizontalGlue());
     southPanel.add(globalLabelPanel);
     southPanel.add(searchAndAlternatingColorPanel);
+    southPanel.add(bypassSearchColorsPanel);
     southPanel.add(Box.createVerticalStrut(5));
     JPanel closePanel = buildClosePanel();
     southPanel.add(closePanel);
@@ -316,6 +322,15 @@ public class ColorPanel extends JPanel
       alternatingColorDataVectorEntry.set(1, applicationPreferenceModel.getAlternatingColorForegroundColor());
   }
 
+  public JPanel buildBypassSearchColorsPanel() {
+    JPanel panel = new JPanel();
+    panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+    bypassSearchColorsCheckBox = new JCheckBox("Don't use a search color for matching rows");
+    panel.add(bypassSearchColorsCheckBox);
+    return panel;
+  }
+
   public JPanel buildSearchAndAlternatingColorPanel() {
       JPanel panel = new JPanel();
       panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
@@ -533,6 +548,7 @@ public class ColorPanel extends JPanel
           applyRules(currentRuleSet, colorizer);
           saveSearchColors();
           saveAlternatingColors();
+          saveBypassFlag();
         }
       });
 
@@ -566,6 +582,10 @@ public class ColorPanel extends JPanel
       applicationPreferenceModel.setAlternatingForegroundColor(alternatingColorForegroundColor);
   }
 
+  private void saveBypassFlag() {
+    applicationPreferenceModel.setBypassSearchColors(bypassSearchColorsCheckBox.isSelected());
+  }
+
   JPanel buildUpDownPanel() {
     JPanel panel = new JPanel(new BorderLayout());
     JPanel innerPanel = new JPanel();

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=1034281&r1=1034280&r2=1034281&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
Fri Nov 12 07:09:35 2010
@@ -10,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>11 Nov 2010</h2>
+<ul>
+<li>Added per-tab preference to not use a search match color in the primary table</li>
+<li>Added ability to use single or double quotes to surround multi-word strings in
expressions</li>
+</ul>
 <h2>6 Nov 2010</h2>
 <ul>
 <li>Updated the expression handling logic to no longer require spaces around operators
& operands in expressions</li>



Mime
View raw message