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 Mon, 05 May 2003 03:16:27 GMT
psmith      2003/05/04 20:16:27

  Modified:    src/java/org/apache/log4j/chainsaw LogUI.java
  Log:
  moved TabbedPane to ChainsawTabbedPane to get around the
  state change rubbish.
  
  Revision  Changes    Path
  1.22      +14 -6     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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- LogUI.java	5 May 2003 02:10:59 -0000	1.21
  +++ LogUI.java	5 May 2003 03:16:27 -0000	1.22
  @@ -100,7 +100,6 @@
   import javax.swing.JScrollPane;
   import javax.swing.JSeparator;
   import javax.swing.JSplitPane;
  -import javax.swing.JTabbedPane;
   import javax.swing.JTable;
   import javax.swing.JTextField;
   import javax.swing.JToolBar;
  @@ -130,7 +129,7 @@
    */
   public class LogUI extends JFrame implements ChainsawViewer {
   
  -	JTabbedPane tabbedPane;
  +    ChainsawTabbledPane tabbedPane;
   	JToolBar toolbar;
   
   	private final Map tableModelMap = new HashMap();
  @@ -145,6 +144,7 @@
   	private final Map scrollMap = new HashMap();
   	private final Map eventBorderMap = new HashMap();
   	ChainsawAppenderHandler handler;
  +    ChainsawToolBarAndMenus tbms;
   
   	/**
   	 * Constructor which builds up all the visual elements of the frame
  @@ -177,7 +177,7 @@
   	 *
   	 */
   	private void initGUI() {
  -		ChainsawToolBarAndMenus tbms = new ChainsawToolBarAndMenus(this);
  +		tbms = new ChainsawToolBarAndMenus(this);
   		toolbar = tbms.getToolbar();
   		setJMenuBar(tbms.getMenubar());
   	}
  @@ -229,7 +229,9 @@
   
   		getContentPane().setLayout(new BorderLayout());
   
  -		tabbedPane = new JTabbedPane();
  +		tabbedPane = new ChainsawTabbledPane();
  +        tabbedPane.addChangeListener(tbms);
  +        
   		tabbedPane.add("Welcome", new WelcomePanel());
   		panePanel.add(tabbedPane);
   
  @@ -446,10 +448,16 @@
   			map = new HashMap();
   			table = new JSortTable(tableModel);
   			scrollToBottom = new ScrollToBottom(true);
  -			LogPanel thisPanel =
  +			final LogPanel thisPanel =
   				new LogPanel(ident, tableModel, table, scrollToBottom, map);
   			//      tabbedPane.add(ident, thisPanel);
  -			tabbedPane.insertTab(ident, null, thisPanel, null, 0);
  +			SwingUtilities.invokeLater(new Runnable() {
  +              public void run() {
  +                tabbedPane.addANewTab(ident, thisPanel);
  +                
  +              }
  +			});
  +            
   			System.out.println("Creating tab " + ident);
   		}
   
  
  
  

---------------------------------------------------------------------
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