psmith      2003/09/22 21:09:13

  Modified:    src/java/org/apache/log4j/chainsaw LogUI.java
  Log:
  Added convenience hyperlink handler to halt all the tutorial
  Receivers.
  
  Revision  Changes    Path
  1.34      +16 -1     jakarta-log4j/src/java/org/apache/log4j/chainsaw/LogUI.java
  
  Index: LogUI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/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        22 Sep 2003 07:02:59 -0000      1.33
  +++ LogUI.java        23 Sep 2003 04:09:13 -0000      1.34
  @@ -647,6 +647,20 @@
             if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
               if (e.getDescription().equals("StartTutorial")) {
                 new Thread(new Tutorial()).start();
  +            } else if (e.getDescription().equals("StopTutorial")) {
  +              new Thread(
  +                new Runnable() {
  +                  public void run() {
  +                    List list =
  +                      PluginRegistry.getPlugins(
  +                        LogManager.getLoggerRepository(), Generator.class);
  +
  +                    for (Iterator iter = list.iterator(); iter.hasNext();) {
  +                      Plugin plugin = (Plugin) iter.next();
  +                      PluginRegistry.stopPlugin(plugin);
  +                    }
  +                  }
  +                }).start();
               } else {
                 try {
                   tutorialArea.setPage(e.getURL());
  @@ -1283,7 +1297,8 @@
             new Runnable() {
               public void run() {
                 getTabbedPane().addANewTab(
  -                ident, thisPanel, new ImageIcon(ChainsawIcons.ANIM_RADIO_TOWER));
  +                ident, thisPanel, new ImageIcon(
  +                  ChainsawIcons.ANIM_RADIO_TOWER));
               }
             });
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to