krysalis-jplugin/src/java/org/krysalis/jplugin/framework/services/gui JFrameGuiContainer.java,1.4,1.5

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-jplugin/src/java/org/krysalis/jplugin/framework/services/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv1880/src/java/org/krysalis/jplugin/framework/services/gui

Modified Files:
	JFrameGuiContainer.java 
Log Message:
Another round of Logging fixes and other small code tweaks.

Index: JFrameGuiContainer.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-jplugin/src/java/org/krysalis/jplugin/framework/services/gui/JFrameGuiContainer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** JFrameGuiContainer.java	29 Sep 2003 14:51:39 -0000	1.4
--- JFrameGuiContainer.java	29 Sep 2003 15:46:36 -0000	1.5
***************
*** 30,34 ****
  import org.apache.avalon.framework.context.DefaultContext;
  import org.krysalis.jplugin.engine.Lifecycle;
- import org.krysalis.jplugin.framework.concerns.Logging;
  import org.krysalis.jplugin.framework.holders.Holder;
  import org.krysalis.jplugin.framework.holders.ToolHolder;
--- 30,33 ----
***************
*** 48,52 ****
  public class JFrameGuiContainer extends JFrame
           implements GuiContainer, Component, Composable, Initializable, Startable, Configurable, Contextualizable {
!     private final org.apache.log4j.Category c = org.apache.log4j.Category.getInstance(this.getClass().toString());
      private Activator activator;
      private Store rootStore;
--- 47,51 ----
  public class JFrameGuiContainer extends JFrame
           implements GuiContainer, Component, Composable, Initializable, Startable, Configurable, Contextualizable {
! 
      private Activator activator;
      private Store rootStore;
***************
*** 66,70 ****
       */
      public void configure(Configuration conf) throws ConfigurationException {
!         Logging.debug(c,"monarchFrame conf root tag is: " + conf.getName());
          this.conf = conf;
          WindowUtils.setDefaultFrame(this);
--- 65,69 ----
       */
      public void configure(Configuration conf) throws ConfigurationException {
!         //Logging.debug(c,"monarchFrame conf root tag is: " + conf.getName());
          this.conf = conf;
          WindowUtils.setDefaultFrame(this);
***************
*** 79,83 ****
      public void contextualize(Context context) {
          this.context = (DefaultContext) context;
-         Logging.debug(c,"contextualize done");
      }
  
--- 78,81 ----
***************
*** 89,93 ****
       */
      public void initialize() throws Exception {
-         try {
              this.setIconImage(resourceFactory.getImageIcon("smallIcon.gif").getImage());
              Configuration lookandfeelConf = conf.getChild("appearance").getChild("lookandfeel");
--- 87,90 ----
***************
*** 114,122 ****
              //notify frame is setup
              director.fireEvent(new ChangeEvent(this));
- 
-         } catch (Exception e) {
-             c.fatal("Exception upon program initialization in monarchFrame.", e);
-             throw e;
-         }
      }
  
--- 111,114 ----
***************
*** 155,159 ****
       */
      public void compose(ComponentManager cm) throws ComponentException {
-         Logging.debug(c,"compose started");
          activator = (Activator) cm.lookup("Activator");
          rootStore = (Store) cm.lookup("Storage");
--- 147,150 ----
***************
*** 162,166 ****
          iconFactory = (IconFactory) cm.lookup("IconFactory");
          this.componentManager = cm;
-         Logging.debug(c,"compose done");
      }
  
--- 153,156 ----
***************
*** 193,204 ****
       *      attribute
       */
!     public void addComponentRecursive(Configuration parentConf, Component parentComponent) {
          Configuration[] childrenConfs = parentConf.getChildren();
  
          for (int i = 0; i < childrenConfs.length; i++) {
-             try {
  
!                    Component currentComponent = (Component) Lifecycle.getInstance().newInstance(Class.forName(childrenConfs[i].getAttribute("class")),conf,context,componentManager);
!                    if (parentComponent instanceof Holder) {
                     ((Holder) parentComponent).addComponent(currentComponent);
                     } else if (parentComponent instanceof ToolHolder) {
--- 183,202 ----
       *      attribute
       */
!     public void addComponentRecursive(Configuration parentConf, Component parentComponent){
          Configuration[] childrenConfs = parentConf.getChildren();
  
          for (int i = 0; i < childrenConfs.length; i++) {
  
!                    Component currentComponent;
!                   try {
!                     currentComponent = (Component) Lifecycle.getInstance().newInstance(Class.forName(childrenConfs[i].getAttribute("class")),conf,context,componentManager);
!                   }
!                   catch (Exception e) {
!                     // TODO make it show the error
!                     e.printStackTrace();
!                     return;
!                   }
!                   
!                   if (parentComponent instanceof Holder) {
                     ((Holder) parentComponent).addComponent(currentComponent);
                     } else if (parentComponent instanceof ToolHolder) {
***************
*** 206,216 ****
                     }
                     if (currentComponent instanceof ToolHolder) {
!                    context.put("ToolHolder", (ToolHolder) currentComponent);
                     }
                     addComponentRecursive(childrenConfs[i], currentComponent);
- 
-             } catch (Exception e) {
-                 c.error("Error in layout setup.", e);
-             }
  
          }
--- 204,210 ----
                     }
                     if (currentComponent instanceof ToolHolder) {
!                    context.put("ToolHolder", currentComponent);
                     }
                     addComponentRecursive(childrenConfs[i], currentComponent);
  
          }




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.