logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r1031440 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: ApplicationPreferenceModelPanel.java LogPanelPreferencePanel.java ReceiverConfigurationPanel.java
Date Fri, 05 Nov 2010 05:32:56 GMT
Author: sdeboy
Date: Fri Nov  5 05:32:56 2010
New Revision: 1031440

URL: http://svn.apache.org/viewvc?rev=1031440&view=rev
Log:
Minor UI cleanup

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanelPreferencePanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java

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=1031440&r1=1031439&r2=1031440&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
Fri Nov  5 05:32:56 2010
@@ -170,11 +170,11 @@ public static void main(String[] args) {
   }
 
     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");
-    private final JCheckBox toolBar = new JCheckBox("Show Toolbar");
-    private final JCheckBox receivers = new JCheckBox("Show Receivers");
+    private final JRadioButton topPlacement = new JRadioButton(" Top         ");
+    private final JRadioButton bottomPlacement = new JRadioButton(" Bottom         ");
+    private final JCheckBox statusBar = new JCheckBox(" Show Status bar ");
+    private final JCheckBox toolBar = new JCheckBox(" Show Toolbar ");
+    private final JCheckBox receivers = new JCheckBox(" Show Receivers ");
     private UIManager.LookAndFeelInfo[] lookAndFeels = UIManager.getInstalledLookAndFeels();
     private final ButtonGroup lookAndFeelGroup = new ButtonGroup();
 
@@ -306,12 +306,9 @@ public static void main(String[] args) {
       setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
 
       JPanel tabPlacementBox = new JPanel();
-      tabPlacementBox.setLayout(
-        new BoxLayout(tabPlacementBox, BoxLayout.Y_AXIS));
+      tabPlacementBox.setLayout(new BoxLayout(tabPlacementBox, BoxLayout.Y_AXIS));
 
-      tabPlacementBox.setBorder(
-        BorderFactory.createTitledBorder(
-          BorderFactory.createEtchedBorder(), "Tab Placement"));
+      tabPlacementBox.setBorder(BorderFactory.createTitledBorder(" Tab Placement "));
 
       ButtonGroup tabPlacementGroup = new ButtonGroup();
 
@@ -337,13 +334,11 @@ public static void main(String[] args) {
 
       JPanel lfPanel = new JPanel();
       lfPanel.setLayout(new BoxLayout(lfPanel, BoxLayout.Y_AXIS));
-      lfPanel.setBorder(
-        BorderFactory.createTitledBorder(
-          BorderFactory.createEtchedBorder(), "Look & Feel"));
+      lfPanel.setBorder(BorderFactory.createTitledBorder(" Look & Feel "));
 
       for (int i = 0; i < lookAndFeels.length; i++) {
         final UIManager.LookAndFeelInfo lfInfo = lookAndFeels[i];
-        final JRadioButton lfItem = new JRadioButton(lfInfo.getName());
+        final JRadioButton lfItem = new JRadioButton(" " + lfInfo.getName() + " ");
         lfItem.setName(lfInfo.getClassName());
         lfItem.addActionListener(
           new ActionListener() {
@@ -359,7 +354,7 @@ public static void main(String[] args) {
       try {
         final Class gtkLF =
           Class.forName("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
-        final JRadioButton lfIGTK = new JRadioButton("GTK+ 2.0");
+        final JRadioButton lfIGTK = new JRadioButton(" GTK+ 2.0 ");
         lfIGTK.addActionListener(
           new ActionListener() {
             public void actionPerformed(ActionEvent e) {
@@ -418,14 +413,14 @@ public static void main(String[] args) {
    */
   public class GeneralAllPrefPanel extends BasicPrefPanel {
     private final JCheckBox showNoReceiverWarning =
-      new JCheckBox("Prompt me on startup if there are no Receivers defined");
-    private final JCheckBox showSplash = new JCheckBox("Show Splash screen at startup");
+      new JCheckBox(" Prompt me on startup if there are no Receivers defined ");
+    private final JCheckBox showSplash = new JCheckBox(" Show Splash screen at startup ");
     private final JSlider responsiveSlider =
       new JSlider(SwingConstants.HORIZONTAL, 1, 4, 2);
-    private final JCheckBox confirmExit = new JCheckBox("Confirm Exit");
+    private final JCheckBox confirmExit = new JCheckBox(" Confirm Exit ");
     Dictionary sliderLabelMap = new Hashtable();
     
-    private final JCheckBox okToRemoveSecurityManager = new JCheckBox("Ok to remove SecurityManager");
+    private final JCheckBox okToRemoveSecurityManager = new JCheckBox(" Ok to remove SecurityManager
");
 
     public GeneralAllPrefPanel() {
       super("General");
@@ -449,7 +444,7 @@ public static void main(String[] args) {
       p.add(showNoReceiverWarning);
       p.add(Box.createHorizontalGlue());
 
-      confirmExit.setToolTipText("Is set, you will be prompted to confirm the exit Chainsaw");
+      confirmExit.setToolTipText("If set, you prompt to confirm Chainsaw exit");
       okToRemoveSecurityManager.setToolTipText("You will need to tick this to be able to
load Receivers/Plugins that require external dependancies.");
       setupInitialValues();
       setupListeners();
@@ -459,7 +454,7 @@ public static void main(String[] args) {
 
       JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
 
-      p1.add(new JLabel("Tab name/event routing expression"));
+      p1.add(new JLabel(" Tab name/event routing expression "));
       p1.add(Box.createHorizontalStrut(5));
       p1.add(identifierExpression);
       add(p1);
@@ -483,24 +478,24 @@ public static void main(String[] args) {
 
       JPanel p4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
 
-      p4.add(new JLabel("ToolTip Display (millis)"));
+      p4.add(new JLabel(" ToolTip Display (millis) "));
       p4.add(Box.createHorizontalStrut(5));
       p4.add(toolTipDisplayMillis);
       add(p4);
 
       JPanel p5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
 
-      p5.add(new JLabel("Cyclic buffer size"));
+      p5.add(new JLabel(" Cyclic buffer size "));
       p5.add(Box.createHorizontalStrut(5));
       p5.add(cyclicBufferSize);
       p5.add(Box.createHorizontalStrut(5));
-      p5.add(new JLabel("Cyclic buffer size change will take effect on Chainsaw restart"));
+      p5.add(new JLabel(" (effective on restart) "));
       add(p5);
 
       Box p6 = new Box(BoxLayout.Y_AXIS);
 
       Box configURLPanel = new Box(BoxLayout.X_AXIS);
-      JLabel configLabel = new JLabel("Auto Config URL");
+      JLabel configLabel = new JLabel(" Auto Config URL ");
       configURLPanel.add(configLabel);
       configURLPanel.add(Box.createHorizontalStrut(5));
 
@@ -585,9 +580,7 @@ public static void main(String[] args) {
       responsiveSlider.setPaintLabels(true);
       responsiveSlider.setPaintTrack(true);
 
-      responsiveSlider.setBorder(
-        BorderFactory.createTitledBorder(
-          BorderFactory.createEtchedBorder(), "Responsiveness"));
+      responsiveSlider.setBorder(BorderFactory.createTitledBorder(" Responsiveness "));
 
       //            responsiveSlider.setAlignmentY(0);
       //            responsiveSlider.setAlignmentX(0);
@@ -740,10 +733,10 @@ public static void main(String[] args) {
     }
 
     private void setupInitialValues() {
-      sliderLabelMap.put(new Integer(1), new JLabel("Fastest"));
-      sliderLabelMap.put(new Integer(2), new JLabel("Fast"));
-      sliderLabelMap.put(new Integer(3), new JLabel("Medium"));
-      sliderLabelMap.put(new Integer(4), new JLabel("Slow"));
+      sliderLabelMap.put(new Integer(1), new JLabel(" Fastest "));
+      sliderLabelMap.put(new Integer(2), new JLabel(" Fast "));
+      sliderLabelMap.put(new Integer(3), new JLabel(" Medium "));
+      sliderLabelMap.put(new Integer(4), new JLabel(" Slow "));
 
       //          
       showNoReceiverWarning.setSelected(

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=1031440&r1=1031439&r2=1031440&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
Fri Nov  5 05:32:56 2010
@@ -233,6 +233,7 @@ public class LogPanelPreferencePanel ext
       });
       columnList.setCellRenderer(cellRenderer);
       columnBox.add(new JScrollPane(columnList));
+      columnBox.add(Box.createVerticalStrut(5));
       columnBox.add(setAsDefaultsButton);
       add(columnBox);
       add(Box.createVerticalGlue());
@@ -553,7 +554,7 @@ public class LogPanelPreferencePanel ext
     private final JCheckBox scrollToBottom =
       new JCheckBox("Scroll to bottom (view tracks with new events)");
     private final JCheckBox showMillisDeltaAsGap =
-      new JCheckBox("Display timestamp delta between displayed events as space between rows");
+      new JCheckBox("Display timestamp delta between events as row gap");
     private final JCheckBox toolTips =
       new JCheckBox("Show Event Detail Tooltips");
     private final JCheckBox thumbnailBarToolTips =

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=1031440&r1=1031439&r2=1031440&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 Nov  5 05:32:56 2010
@@ -133,7 +133,7 @@ class ReceiverConfigurationPanel extends
         c.gridx = 0;
         c.gridy = yPos++;
         c.fill = GridBagConstraints.HORIZONTAL;
-        logFileReceiverRadioButton = new JRadioButton("Load and tail events from a regular
text log file");
+        logFileReceiverRadioButton = new JRadioButton(" Load and tail events from a regular
text log file ");
         buttonGroup.add(logFileReceiverRadioButton);
         add(logFileReceiverRadioButton, c);
 
@@ -141,7 +141,7 @@ class ReceiverConfigurationPanel extends
         c.gridx = 0;
         c.gridy = yPos++;
         c.fill = GridBagConstraints.HORIZONTAL;
-        networkReceiverRadioButton = new JRadioButton("Receive events from the network");
+        networkReceiverRadioButton = new JRadioButton(" Receive events from the network ");
         buttonGroup.add(networkReceiverRadioButton);
         add(networkReceiverRadioButton, c);
 
@@ -149,7 +149,7 @@ class ReceiverConfigurationPanel extends
         c.gridx = 0;
         c.gridy = yPos++;
         c.fill = GridBagConstraints.HORIZONTAL;
-        useExistingConfigurationRadioButton = new JRadioButton("Use an existing Chainsaw
configuration file...");
+        useExistingConfigurationRadioButton = new JRadioButton(" Use an existing Chainsaw
configuration file ");
         buttonGroup.add(useExistingConfigurationRadioButton);
         add(useExistingConfigurationRadioButton, c);
 
@@ -158,7 +158,7 @@ class ReceiverConfigurationPanel extends
         c.gridy = yPos++;
         c.fill = GridBagConstraints.HORIZONTAL;
         c.insets = new Insets(0, 0, 0, 0);
-        useAutoSavedConfigRadioButton = new JRadioButton("Use auto-saved configuration from
$HOME/.chainsaw/receiver-config.xml");
+        useAutoSavedConfigRadioButton = new JRadioButton(" Use auto-saved configuration from
$HOME/.chainsaw/receiver-config.xml ");
         buttonGroup.add(useAutoSavedConfigRadioButton);
         add(useAutoSavedConfigRadioButton, c);
 
@@ -211,7 +211,7 @@ class ReceiverConfigurationPanel extends
         c.gridy = 0;
         c.weightx = 1.0;
         c.anchor = GridBagConstraints.LINE_START;
-        dontwarnIfNoReceiver = new JCheckBox("Always start Chainsaw with this configuration");
+        dontwarnIfNoReceiver = new JCheckBox(" Always start Chainsaw with this configuration
");
         panel.add(dontwarnIfNoReceiver, c);
 
         saveButton = new JButton(" Save configuration as... ");
@@ -287,7 +287,7 @@ class ReceiverConfigurationPanel extends
         StyleConstants.setAlignment(center, StyleConstants.ALIGN_CENTER);
         doc.setParagraphAttributes(0, doc.getLength(), center, false);
 
-        descriptionTextPane.setText("An example configuration file is available from the
Welcome tab");
+        descriptionTextPane.setText(" An example configuration file is available from the
Welcome tab ");
         descriptionTextPane.setEditable(false);
         descriptionTextPane.setOpaque(false);
         descriptionTextPane.setFont(getFont());
@@ -455,7 +455,7 @@ class ReceiverConfigurationPanel extends
         c.gridx = 0;
         c.gridy = 5;
         c.gridwidth=5;
-        c.insets = new Insets(5, 5, 0, 5);
+        c.insets = new Insets(15, 5, 0, 5);
         panel.add(new JLabel("<html> See PatternLayout or LogFilePatternReceiver JavaDoc
for details </html>"), c);
         return panel;
     }



Mime
View raw message