svn commit: r13589 - trunk/src_new/org/argouml/ui/TabText.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-09-24 18:45:03-0700
New Revision: 13589

Modified:
   trunk/src_new/org/argouml/ui/TabText.java

Log:
Only generate text if tab is visible.

Add TODOs for localization.

Modified: trunk/src_new/org/argouml/ui/TabText.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/TabText.java?view=diff&rev=13589&p1=trunk/src_new/org/argouml/ui/TabText.java&p2=trunk/src_new/org/argouml/ui/TabText.java&r1=13588&r2=13589
==============================================================================
--- trunk/src_new/org/argouml/ui/TabText.java	(original)
+++ trunk/src_new/org/argouml/ui/TabText.java	2007-09-24 18:45:03-0700
@@ -107,6 +107,7 @@
         parseChanges = false;
         if (getTarget() == null) {
             textArea.setEnabled(false);
+            // TODO: Localize
             textArea.setText("Nothing selected");
             enabled = false;
         } else {
@@ -119,6 +120,7 @@
 		    textArea.setCaretPosition(0);
 		} else {
 		    textArea.setEnabled(false);
+		    // TODO: Localize
 		    textArea.setText("N/A");
 		    enabled = false;
 		}
@@ -132,7 +134,9 @@
      */
     public void setTarget(Object t) {
         target = t;
-	doGenerateText();
+        if (isVisible()) {
+            doGenerateText();
+        }
     }
 
     /*
@@ -276,6 +280,7 @@
      * Generates the text whenever this panel becomes visible.
      * {@inheritDoc}
      */
+    @Override
     public void setVisible(boolean visible) {
 	super.setVisible(visible);
 	if (visible) {
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.