You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ps...@apache.org on 2004/05/14 04:41:26 UTC

cvs commit: logging-log4j/src/java/org/apache/log4j/chainsaw CommonActions.java

psmith      2004/05/13 19:41:26

  Added:       src/java/org/apache/log4j/chainsaw CommonActions.java
  Log:
  Added a CommonActions class to hold some Common actions.  Haven't moved any here yet, but hope to
  to make some of the source a bit easier to read.
  
  Revision  Changes    Path
  1.1                  logging-log4j/src/java/org/apache/log4j/chainsaw/CommonActions.java
  
  Index: CommonActions.java
  ===================================================================
  package org.apache.log4j.chainsaw;
  
  import java.awt.event.ActionEvent;
  
  import javax.swing.AbstractAction;
  import javax.swing.Action;
  
  import org.apache.log4j.chainsaw.help.HelpManager;
  
  
  /**
   * @author psmith
   *
   */
  class CommonActions
  {
      private static CommonActions instance = null;
      private static Action SHOW_RELEASE_NOTE; 
      
      
      private void initActions() {
          SHOW_RELEASE_NOTE = new AbstractAction("Release Notes") {
  
              public void actionPerformed(ActionEvent e)
              {
                  HelpManager.getInstance().setHelpURL(ChainsawConstants.RELEASE_NOTES_URL);
                  
              }};
      }
      
      static synchronized CommonActions getInstance() {
          if(instance==null) {
              instance = new CommonActions();
          }
          return instance;
      }
      
      /**
       * 
       */
      private CommonActions()
      {
          initActions();
      }
  
      /**
       * @return
       */
      public Action getShowReleaseNotes()
      {
          return SHOW_RELEASE_NOTE;
      }
  
  }
  
  
  

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