[jboss-svn-commits] JBL Code SVN: r35360 - labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Sep 30 05:22:26 EDT 2010


Author: jervisliu
Date: 2010-09-30 05:22:25 -0400 (Thu, 30 Sep 2010)
New Revision: 35360

Modified:
   labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/FromAccumulateCompositeFactPatternWidget.java
Log:
GUVNOR-640: Replace com.gwtext.client.widgets.TabPanel in FromAccumulateCompositeFactPatternWidget


Modified: labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/FromAccumulateCompositeFactPatternWidget.java
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/FromAccumulateCompositeFactPatternWidget.java	2010-09-30 09:09:39 UTC (rev 35359)
+++ labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/modeldriven/ui/FromAccumulateCompositeFactPatternWidget.java	2010-09-30 09:22:25 UTC (rev 35360)
@@ -36,10 +36,10 @@
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.TabPanel;
 import com.google.gwt.user.client.ui.TextBox;
 import com.google.gwt.user.client.ui.Widget;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.TabPanel;
 
 /**
  *
@@ -144,6 +144,8 @@
 							}));
 		}
 
+        //REVISIT: Nested TabLayoutPanel does not work, its content is truncated. 
+        //TabLayoutPanel tPanel = new TabLayoutPanel(2, Unit.EM);
         TabPanel tPanel = new TabPanel();
 
         DirtyableFlexTable codeTable = new DirtyableFlexTable();
@@ -176,14 +178,12 @@
 
 
         //panel.setWidget(r++, 0, codeTable);
-        Panel codePanel = new Panel();
-        codePanel.setAutoWidth(true);
-        codePanel.setClosable(false);
-        codePanel.setTitle("Custom Code");
-        codePanel.setAutoHeight(true);
+        ScrollPanel codePanel = new ScrollPanel();
         codePanel.add(codeTable);
-        codePanel.setDisabled(this.readOnly);
-        tPanel.add(codePanel);
+        //TODO:
+        //codePanel.setDisabled(this.readOnly);
+        
+        tPanel.add(codePanel,"Custom Code");
 
         DirtyableFlexTable functionTable = new DirtyableFlexTable();
 
@@ -195,14 +195,11 @@
 
 //        panel.setWidget(r++, 0, functionTable);
 
-        Panel functionPanel = new Panel();
-        functionPanel.setAutoWidth(true);
-        functionPanel.setClosable(false);
-        functionPanel.setTitle("Function");
-        functionPanel.setAutoHeight(true);
+        ScrollPanel functionPanel = new ScrollPanel();
         functionPanel.add(functionTable);
-        functionPanel.setDisabled(this.readOnly);
-        tPanel.add(functionPanel);
+        //TODO:
+        //functionPanel.setDisabled(this.readOnly);
+        tPanel.add(functionPanel,"Function");
         ChangeHandler changehandler = new ChangeHandler() {
 			
 			public void onChange(ChangeEvent event) {
@@ -246,14 +243,14 @@
 
         boolean useFunction = getFromAccumulatePattern().useFunctionOrCode().equals(FromAccumulateCompositeFactPattern.USE_FUNCTION);
         
-        tPanel.setActiveTab(useFunction?1:0);
+        tPanel.selectTab(useFunction?1:0);
+        
+        //tPanel.setBorder(false);
+        //tPanel.setBodyBorder(false);
+        //tPanel.setWidth(200);
 
-        tPanel.setBorder(false);
-        tPanel.setBodyBorder(false);
-        tPanel.setWidth(200);
+        //tPanel.setDisabled(this.readOnly);
 
-        tPanel.setDisabled(this.readOnly);
-
 //        functionTable.setVisible(useFunction);
 //        codeTable.setVisible(!useFunction);
 



More information about the jboss-svn-commits mailing list