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/src/java/org/apache/log4j/chainsaw WelcomePanel.java
Date Sat, 20 Dec 2003 04:58:21 GMT
psmith      2003/12/19 20:58:21

  Modified:    src/java/org/apache/log4j/chainsaw WelcomePanel.java
  Log:
  decoupled this class from LogUI.  It is now up to the client of this
  panel to register any actions that are needed to be displayed
  within the WelcomePanel's toolbar.
  
  Revision  Changes    Path
  1.8       +8 -35     jakarta-log4j/src/java/org/apache/log4j/chainsaw/WelcomePanel.java
  
  Index: WelcomePanel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/WelcomePanel.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WelcomePanel.java	19 Dec 2003 06:50:57 -0000	1.7
  +++ WelcomePanel.java	20 Dec 2003 04:58:21 -0000	1.8
  @@ -87,11 +87,9 @@
     private Stack urlStack = new Stack();
     private final JEditorPane textInfo = new JEditorPane();
     private final URLToolbar urlToolbar = new URLToolbar();
  -  private LogUI logui;
   
  -  public WelcomePanel(LogUI logui) {
  +  public WelcomePanel() {
       super(new BorderLayout());
  -    this.logui = logui;
       setBackground(Color.white);
       add(urlToolbar, BorderLayout.NORTH);
   
  @@ -144,13 +142,6 @@
         });
     }
   
  -  /**
  -   * @return
  -   */
  -  public final URL getTutorialURL() {
  -    return ChainsawConstants.TUTORIAL_URL;
  -  }
  -
     private class URLToolbar extends JToolBar {
       private final Action previousAction =
         new AbstractAction(null, new ImageIcon(ChainsawIcons.ICON_BACK)) {
  @@ -187,35 +178,17 @@
         add(previous);
   
         addSeparator();
  -      add(
  -        new SmallButton(
  -          new AbstractAction("Tutorial", new ImageIcon(ChainsawIcons.HELP)) {
  -          public void actionPerformed(ActionEvent e) {
  -            logui.setupTutorial();
  -          }
  -        }));
  -      addSeparator();
  -
  -      final Action exampleConfigAction =
  -        new AbstractAction("View example Receiver configuration") {
  -          public void actionPerformed(ActionEvent e) {
  -            setURL(ChainsawConstants.EXAMLE_CONFIG_URL);
  -          }
  -        };
  -
  -      exampleConfigAction.putValue(
  -        Action.SHORT_DESCRIPTION,
  -        "Displays an example Log4j configuration file with several Receivers defined.");
  -
  -      JButton exampleButton = new SmallButton(exampleConfigAction);
  -      add(exampleButton);
  -
  -      JPanel p = new JPanel();
  -      add(p);
       }
   
       void updateToolbar() {
         previousAction.setEnabled(!urlStack.isEmpty());
       }
  +  }
  +
  +  /**
  +   * @return
  +   */
  +  public JToolBar getToolbar() {
  +    return urlToolbar;
     }
   }
  
  
  

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