svn commit: r17493 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-11-19 11:49:23-0800
New Revision: 17493

Modified:
   trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java

Log:
Remove redundant code left over from previous panel in panel mechanism (now all controls are on the main panel)

Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java?view=diff&pathrev=17493&r1=17492&r2=17493
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java	(original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java	2009-11-19 11:49:23-0800
@@ -47,8 +47,6 @@
      */
     private static final Logger LOG = Logger.getLogger(XmlPropertyPanel.class);
     
-    private JPanel currentPanel = null;
-    
     public XmlPropertyPanel(String label, ImageIcon icon) {
         super(label, icon);
         /* Since there are no buttons on this panel (YET), 
@@ -89,25 +87,17 @@
         // See issue 2552: http://argouml.tigris.org/issues/show_bug.cgi?id=2552        
         removeAll();
         if (target == null){
-            if (currentPanel != null){
-                this.getTitleLabel().setText("");
-                this.remove(currentPanel);
-            }
             return;
         }
         
         LOG.info("[XMLPP] t is type:" + target.getClass());
         
-        if (currentPanel != null) {
-            this.remove(currentPanel);
-        }
         try {
             // TODO: This references the concrete factory
             // We need a factories factory
             UIFactory factory = SwingUIFactory.getInstance();
-            currentPanel = factory.createGUI(target, this);
+            factory.createGUI(target, this);
             this.getTitleLabel().setText(getPanelTitle(target));
-            this.add(currentPanel);
         } catch (Exception e) {
             // TODO: Auto-generated catch block
             LOG.error("Exception", e);

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2420204

To unsubscribe from this discussion, e-mail: [[email protected]].
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.