logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psm...@apache.org
Subject cvs commit: jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw LogUI.java
Date Wed, 07 May 2003 07:40:10 GMT
psmith      2003/05/07 00:40:10

  Modified:    src/java/org/apache/log4j/chainsaw LogUI.java
  Log:
  modified the way the LogPanel's quick Filter is layed out, hopefully looks ok.
  
  Revision  Changes    Path
  1.34      +31 -46    jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java
  
  Index: LogUI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- LogUI.java	7 May 2003 02:55:43 -0000	1.33
  +++ LogUI.java	7 May 2003 07:40:10 -0000	1.34
  @@ -52,9 +52,9 @@
   import java.awt.BorderLayout;
   import java.awt.Component;
   import java.awt.Dimension;
  +import java.awt.FlowLayout;
   import java.awt.Font;
  -import java.awt.GridBagConstraints;
  -import java.awt.GridBagLayout;
  +import java.awt.Insets;
   import java.awt.Point;
   import java.awt.event.ActionEvent;
   import java.awt.event.ActionListener;
  @@ -102,10 +102,10 @@
   import javax.swing.JSplitPane;
   import javax.swing.JTable;
   import javax.swing.JTextField;
  +import javax.swing.JToggleButton;
   import javax.swing.JToolBar;
   import javax.swing.ListSelectionModel;
   import javax.swing.SwingUtilities;
  -import javax.swing.border.EtchedBorder;
   import javax.swing.event.DocumentEvent;
   import javax.swing.event.DocumentListener;
   import javax.swing.event.ListSelectionEvent;
  @@ -775,25 +775,18 @@
         detailThread = new DetailThread(detail, tableModel);
         detailThread.start();
   
  -      GridBagLayout gridbag = new GridBagLayout();
  -      GridBagConstraints gbc = new GridBagConstraints();
  +      upperPanel = new JPanel(new BorderLayout());
  +      upperPanel.setBorder(BorderFactory.createEmptyBorder(2, 5, 2, 0));
   
  -      upperPanel = new JPanel(gridbag);
  -      upperPanel.setBorder(BorderFactory.createEmptyBorder(2, 5, 2, 5));
  -
  -      gbc.gridx = 0;
  -      gbc.gridy = 0;
  -      gbc.weightx = 0;
   
         final JLabel filterLabel = new JLabel("Filter: ");
  -      gbc.gridx = 1;
  -      gbc.gridy = 0;
  -      gbc.weightx = 0;
  -      gridbag.setConstraints(filterLabel, gbc);
  -      upperPanel.add(filterLabel);
   
  -      final JComboBox customFilterList = new JComboBox(names.toArray());
  +	  JPanel upperLeftPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 3,0));
  +	  upperLeftPanel.add(filterLabel);
   
  +      final JComboBox customFilterList = new JComboBox(names.toArray());
  +	  customFilterList.setFont(new Font("SansSerif", Font.BOLD, 10));
  +	  
         final JTextField filterText = new JTextField();
   
         filterText.getDocument().addDocumentListener(
  @@ -828,23 +821,14 @@
             }
           });
   
  -      gbc.gridx = 4;
  -      gbc.gridy = 0;
  -      gbc.weightx = 1;
  -      gbc.fill = GridBagConstraints.HORIZONTAL;
  -      gridbag.setConstraints(filterText, gbc);
  -
         String evaluator =
           ExpressionEvaluatorFactory.newInstance().getEvaluatorClassName();
         filterText.setToolTipText(
           "See " + evaluator + " documentation for expression rules");
   
         customFilterList.setMaximumRowCount(15);
  -      gbc.gridx = 2;
  -      gbc.gridy = 0;
  -      gbc.weightx = 0;
  -      gridbag.setConstraints(customFilterList, gbc);
  -      upperPanel.add(customFilterList);
  +	
  +	  upperLeftPanel.add(customFilterList);
   
         customFilterList.addActionListener(
           new ActionListener() {
  @@ -858,24 +842,25 @@
             }
           });
   
  -      final JCheckBox override = new JCheckBox("Override");
  -      gbc.gridx = 3;
  -      gbc.gridy = 0;
  -      gbc.weightx = 0;
  -      gridbag.setConstraints(override, gbc);
  -      upperPanel.add(override);
  -      override.addActionListener(
  -        new ActionListener() {
  -          public void actionPerformed(ActionEvent evt) {
  -            displayFilter.setCustomFilterOverride(override.isSelected());
  -          }
  -        });
  -
  -      upperPanel.add(filterText);
  -
  -      gbc.gridx = 7;
  -      gbc.gridy = 0;
  -      gbc.weightx = 0;
  +      upperPanel.add(filterText, BorderLayout.CENTER);
  +      upperPanel.add(upperLeftPanel, BorderLayout.WEST);
  +	  
  +      
  +      final JCheckBox override = new JCheckBox();
  +		override.addActionListener(
  +			new ActionListener() {
  +				public void actionPerformed(ActionEvent evt) {
  +					displayFilter.setCustomFilterOverride(override.isSelected());
  +				}
  +			});
  +//	  override.setPreferredSize(new Dimension(80,16));
  +//      override.setFont(new Font("Dialog", Font.BOLD, 10));
  +//	  override.setMargin(new Insets(2,2,2,2));
  +      override.setToolTipText("Override");
  +	  JPanel upperRightPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0,0));
  +	  upperRightPanel.add(override);
  +	
  +	  upperPanel.add(upperRightPanel, BorderLayout.EAST);
   
         final JPanel eventsAndStatusPanel = new JPanel();
         eventsAndStatusPanel.setLayout(new BorderLayout());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Mime
View raw message