airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1352208 - /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/widgets/TabLabelButton.java
Date Wed, 20 Jun 2012 16:51:52 GMT
Author: samindaw
Date: Wed Jun 20 16:51:52 2012
New Revision: 1352208

URL: http://svn.apache.org/viewvc?rev=1352208&view=rev
Log:
cpu 100% issue fixed

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/widgets/TabLabelButton.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/widgets/TabLabelButton.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/widgets/TabLabelButton.java?rev=1352208&r1=1352207&r2=1352208&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/widgets/TabLabelButton.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/widgets/TabLabelButton.java
Wed Jun 20 16:51:52 2012
@@ -56,13 +56,17 @@ public class TabLabelButton extends JPan
         setLayout(layout);
         setOpaque(false);
         JLabel label = new JLabel() {
+        	String previousText=null;
 			private static final long serialVersionUID = 1L;
 
 			public String getText() {
                 int i = pane.indexOfTabComponent(TabLabelButton.this);
                 if (i != -1) {
-                	TabLabelButton.this.updateUI();
-                    return pane.getTitleAt(i);
+                	if (!pane.getTitleAt(i).equals(previousText)){
+                		previousText=pane.getTitleAt(i);
+                    	TabLabelButton.this.updateUI();
+                	}
+                    return previousText;
                 }
                 return null;
             }



Mime
View raw message