[jbpm-commits] JBoss JBPM SVN: r4550 - in projects/gwt-console/branches/hbraun: plugin-example and 6 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Apr 14 10:21:41 EDT 2009


Author: heiko.braun at jboss.com
Date: 2009-04-14 10:21:41 -0400 (Tue, 14 Apr 2009)
New Revision: 4550

Modified:
   projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Editor.java
   projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Menu.java
   projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/MenuSection.java
   projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Workspace.java
   projects/gwt-console/branches/hbraun/plugin-example/pom.xml
   projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java
   projects/gwt-console/branches/hbraun/war/pom.xml
   projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/MainView.java
   projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
   projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
   projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
Log:
Migrate menu to mosaic

Modified: projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Editor.java
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Editor.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Editor.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -54,19 +54,17 @@
 
   public boolean hasView(String viewId)
   {
-    final String tabId = viewId + ".tab";
-    return appContext.getWorkpace().hasItem(tabId);    
+    return false;
   }
 
   public void showView(String viewId)
   {
-    final String tabId = viewId + ".tab";
-    appContext.getWorkpace().setActiveTab(tabId);
+    appContext.getWorkpace().showEditor(viewId);
   }
 
   public void addView(View view, boolean closable)
   {
-    String tabId = view.getViewId() + ".tab";
+    /*String tabId = view.getViewId() + ".tab";
 
     view.setId(tabId); // tabId != viewId
     view.setClosable(closable);
@@ -74,22 +72,12 @@
     view.setAutoScroll(true);
 
     appContext.getWorkpace().add(view);
-    appContext.getWorkpace().setActiveTab(view.getId());
+    appContext.getWorkpace().setActiveTab(view.getId());*/
 
-    managedTabs.add(tabId);
+    System.out.println("*** addView should be re-implemented ***");
 
-  }
+    managedTabs.add(view.getId());
 
-  public void closeViews()
-  {
-    for(String tabId : managedTabs)
-    {
-      Panel tab = appContext.getWorkpace().getItem(tabId);
-      if(tab!=null)
-      {
-        tab.collapse();
-      }
-    }
   }
 
   class WrapperPanel extends Panel

Modified: projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Menu.java
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Menu.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Menu.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -21,11 +21,11 @@
  */
 package org.jboss.bpm.console.client;
 
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.layout.AccordionLayout;
 
-import java.util.ArrayList;
-import java.util.List;
+import org.gwt.mosaic.ui.client.StackLayoutPanel;
+import org.gwt.mosaic.ui.client.layout.BoxLayout;
+import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
 
 /**
  * The main menu on the left hand.
@@ -33,29 +33,26 @@
  *
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
-public class Menu extends Panel
+public class Menu extends LayoutPanel
 {
-  private final ApplicationContext mainView;
-  private List<Panel> sections = new ArrayList<Panel>();
+  private final ApplicationContext appContext;
+  private StackLayoutPanel stack;  
 
-  public Menu(final ApplicationContext view)
+  public Menu(final ApplicationContext appContext)
   {
-    super();
-    this.mainView = view;
+    super(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+    this.appContext = appContext;
 
-    final AccordionLayout accordion = new AccordionLayout(true);
+    this.setWidgetSpacing(5);
 
-    this.setTitle("");
-    this.setCollapsible(true);
-    this.setWidth(200);
-    this.setLayout(accordion);
-
+    this.stack = new StackLayoutPanel();
+    //stack.showStack(0); // todo: loading event
+    this.add(stack, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH, true));
   }
 
   public void addSection(MenuSection menuSection)
-  {
-    this.sections.add(menuSection);
-    this.add(menuSection);
+  {    
+    this.stack.add(menuSection, menuSection.getMenuTitle());
   }
 
 }

Modified: projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/MenuSection.java
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/MenuSection.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/MenuSection.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -21,27 +21,34 @@
  */
 package org.jboss.bpm.console.client;
 
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.Component;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import com.google.gwt.widgetideas.client.FastTree;
 
+
 /**
  * One section in the lefthand main menu.
  *
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
-public class MenuSection extends Panel
+public class MenuSection extends LayoutPanel
 {
 
-  public MenuSection(String title, String iconClass, Component tree)
+  private String menuTitle;
+  private String iconClass;
+
+  public MenuSection(String title, String iconClass, FastTree tree)
   {
-    super();
+    super();  
 
-    setTitle(title);
-    setBorder(false);
-    setHideBorders(true);
-    setIconCls(iconClass);
+    this.menuTitle = title;
+    this.iconClass = iconClass;
 
     if (tree != null)
       add(tree);
   }
+
+  public String getMenuTitle()
+  {
+    return menuTitle;
+  }
 }

Modified: projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Workspace.java
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Workspace.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/plugin-api/src/main/java/org/jboss/bpm/console/client/Workspace.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -21,16 +21,15 @@
  */
 package org.jboss.bpm.console.client;
 
-import com.gwtext.client.widgets.Component;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.TabPanel;
+import org.gwt.mosaic.ui.client.TabLayoutPanel;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
 
 /**
  * Maintains {@link org.jboss.bpm.console.client.Workspace}'s
  *
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
-public class Workspace extends TabPanel
+public class Workspace extends TabLayoutPanel
 {
   protected ApplicationContext view;
   private Menu menu;
@@ -39,25 +38,14 @@
   {
     super();
     this.menu = menu;
-
-    this.setResizeTabs(true);
-    this.setMinTabWidth(115);
-    this.setTabWidth(135);
-    this.setEnableTabScroll(true);
-    this.setAutoScroll(true);
-    this.setActiveTab(0);
+    this.setPadding(5);
+    
   }
 
-  private Panel createTab(Editor editor, boolean closeable)
+  private LayoutPanel createTab(Editor editor, boolean closeable)
   {
-    Panel tab = new WrapperPanel(editor.getId() + ".tab");
+    LayoutPanel tab = new LayoutPanel();
     tab.setTitle(editor.getTitle());
-    tab.setIconCls(editor.getIconCSS());
-    tab.setClosable(closeable);
-    tab.setAutoScroll(true);
-    tab.setBorder(false);
-    tab.setFrame(false);
-    tab.setHideBorders(true);
     return tab;
   }
 
@@ -67,17 +55,15 @@
     menu.addSection(editor.provideMenuSection());
 
     // Editor pane
-    Panel tab = createTab(editor, closeable);
+    LayoutPanel tab = createTab(editor, closeable);
     tab.add(editor);
-    this.add(tab);
-    this.setActiveTab(tab.getId());
-    this.doLayout();
+    this.add(tab, editor.getTitle());    
   }
 
   public boolean hasEditor(String id)
   {
     boolean b = false;
-    final String tabId = id + ".tab";
+    /*final String tabId = id + ".tab";
 
     Component[] tabs = this.getItems();
     for (int i = 0; i < tabs.length; i++)
@@ -88,23 +74,13 @@
         b = true;
         break;
       }
-    }
+    } */
 
     return b;
   }
 
   public void showEditor(String id)
-  {
-    final String tabId = id + ".tab";
-    this.setActiveTab(tabId);
-  }
-
-  class WrapperPanel extends Panel
-  {
-    public WrapperPanel(String id)
-    {
-      super();
-      setId(id);
-    }
-  }
+  {    
+    this.selectTab(0);
+  } 
 }

Modified: projects/gwt-console/branches/hbraun/plugin-example/pom.xml
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-example/pom.xml	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/plugin-example/pom.xml	2009-04-14 14:21:41 UTC (rev 4550)
@@ -17,7 +17,7 @@
 
   <properties>
     <gwt-console.version>1.0.0-SNAPSHOT</gwt-console.version>
-    <gwt-ext.version>2.0.5</gwt-ext.version>
+    <gwt-mosaic.version>0.1.9</gwt-mosaic.version>
   </properties>
 
   <!--  Dependencies -->
@@ -32,16 +32,30 @@
 
     <dependency>
       <groupId>com.google.gwt</groupId>
-      <artifactId>gwt-user</artifactId>      
+      <artifactId>gwt-user</artifactId>
       <scope>provided</scope>
     </dependency>
 
     <dependency>
-      <groupId>com.gwtext</groupId>
-      <artifactId>gwtext</artifactId>
-      <version>${gwt-ext.version}</version>
-      <scope>provided</scope>
+      <groupId>com.googlecode.gwtmosaic</groupId>
+      <artifactId>gwt-mosaic</artifactId>
+      <version>${gwt-mosaic.version}</version>
     </dependency>
+    <dependency>
+      <groupId>com.googlecode.gwtmosaic</groupId>
+      <artifactId>gwt-mosaic-dnd</artifactId>
+      <version>${gwt-mosaic.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.googlecode.gwtmosaic</groupId>
+      <artifactId>gwt-mosaic-incubator</artifactId>
+      <version>${gwt-mosaic.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.googlecode.gwtmosaic</groupId>
+      <artifactId>gwt-mosaic-gwtx</artifactId>
+      <version>${gwt-mosaic.version}</version>
+    </dependency>
 
     <dependency>
       <groupId>org.jboss.bpm</groupId>

Modified: projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -26,20 +26,31 @@
 import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
 import com.gwtext.client.data.Node;
 import com.gwtext.client.core.EventObject;
+import com.google.gwt.widgetideas.client.FastTree;
+import com.google.gwt.widgetideas.client.FastTreeItem;
 import org.jboss.bpm.console.client.ApplicationContext;
 
-class MapsNavigationTree extends TreePanel
+class MapsNavigationTree extends FastTree
 {
 
+
+  public MapsNavigationTree()
+  {
+    super();
+  }
+
   public MapsNavigationTree(final ApplicationContext appContext)
   {
 
-    TreeNode root = new TreeNode("Google Maps");
+    FastTreeItem root = this.addItem("Maps plugin menu");
 
-    TreeNode navEntry = new TreeNode("Open maps");
-    navEntry.setExpanded(true);
-    navEntry.addListener(
-        new TreeNodeListenerAdapter()
+    FastTreeItem navEntry = root.addItem("Open maps");
+
+    //navEntry.;
+
+    /*
+
+    new TreeNodeListenerAdapter()
         {
           public void onClick(Node node, EventObject eventObject)
           {
@@ -54,12 +65,7 @@
 
           }
         }
-    );
-
-    root.appendChild(navEntry);
-  
-    setRootVisible(true);
-    setRootNode(root);
-    root.setExpanded(true);
+    ).
+     */       
   }
 }

Modified: projects/gwt-console/branches/hbraun/war/pom.xml
===================================================================
--- projects/gwt-console/branches/hbraun/war/pom.xml	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/war/pom.xml	2009-04-14 14:21:41 UTC (rev 4550)
@@ -90,15 +90,13 @@
     </dependency>
     <dependency>
       <groupId>com.googlecode.gwtmosaic</groupId>
-      <artifactId>gwt-mosaic-incubator</artifactId>      
+      <artifactId>gwt-mosaic-incubator</artifactId>
     </dependency>
     <dependency>
       <groupId>com.googlecode.gwtmosaic</groupId>
       <artifactId>gwt-mosaic-gwtx</artifactId>
     </dependency>
 
-
-
     <!-- 3rd party -->
 
     <dependency>

Modified: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/MainView.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/MainView.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/MainView.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -21,6 +21,7 @@
  */
 package org.jboss.bpm.console.client;
 
+import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.HTML;
@@ -76,15 +77,24 @@
     final Button b4 = new Button("Button 4");
     final Button b5 = new Button("Button 5");
 
+    // header
     header = new Header(this);
     header.setUserInfo(auth.getUsername(), auth.getRolesAssigned());
     layoutPanel.add(header, new BorderLayoutData(Region.NORTH, 50));
 
-    layoutPanel.add(b2, new BorderLayoutData(Region.SOUTH, 10, 200));
-    layoutPanel.add(b3, new BorderLayoutData(Region.WEST, 10, 200));
-    layoutPanel.add(b4, new BorderLayoutData(Region.EAST, 10, 200));
-    layoutPanel.add(b5, new BorderLayoutData(Region.CENTER, true));
+    // menu
+    menu = new Menu(this);
+    layoutPanel.add(menu, new BorderLayoutData(Region.WEST, 200));
 
+    // workspace
+    workspace = new Workspace(menu);
+    WorkspaceLauncher launcher = GWT.create(WorkspaceLauncher.class);
+    launcher.launch(this, workspace);
+    layoutPanel.add(workspace, new BorderLayoutData(Region.CENTER, false));
+
+    //layoutPanel.add(b2, new BorderLayoutData(Region.SOUTH, 10, 200));
+    //layoutPanel.add(b3, new BorderLayoutData(Region.EAST, 10, 200));
+
     return layoutPanel;
   }
 
@@ -163,7 +173,7 @@
     if(isError)
       MessageBox.error("Error", message);
     else
-      MessageBox.alert("Alert", message);    
+      MessageBox.alert("Alert", message);
   }
 
   public Authentication getAuthentication()
@@ -174,7 +184,7 @@
   public ConsoleConfig getConfig()
   {
     return config;
-  }  
+  }
 
   public Workspace getWorkpace()
   {

Modified: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -22,21 +22,22 @@
 package org.jboss.bpm.console.client.process;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.widgetideas.client.FastTree;
+import com.google.gwt.widgetideas.client.FastTreeItem;
 import com.gwtext.client.core.Connection;
 import com.gwtext.client.core.EventObject;
 import com.gwtext.client.widgets.Button;
 import com.gwtext.client.widgets.MessageBox;
 import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.tree.TreePanel;
-import com.gwtext.client.widgets.tree.TreeNode;
-import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
 import com.gwtext.client.widgets.event.ButtonListenerAdapter;
 import com.gwtext.client.widgets.form.Form;
 import com.gwtext.client.widgets.form.FormPanel;
 import com.gwtext.client.widgets.form.TextField;
 import com.gwtext.client.widgets.form.event.FormListenerAdapter;
-import com.gwtext.client.data.Node;
-import org.jboss.bpm.console.client.*;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.MenuSection;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.util.ConsoleLog;
 import org.jboss.bpm.console.client.util.ModelListenerRegistry;
 import org.jboss.bpm.console.client.util.ModelModificationCallback;
@@ -179,17 +180,19 @@
     modelListeners.fireResetEvent();
   }
 
-  class ProcessTree extends TreePanel
+  class ProcessTree extends FastTree
   {
 
     public ProcessTree()
     {
 
-      TreeNode root = new TreeNode("Process Definitions");
+      super();
+      super.setTitle("Processes");
 
-      TreeNode definitions = new TreeNode("View definitions");
-      definitions.setExpanded(true);
-      definitions.addListener(
+      FastTreeItem root = addItem("Process Definitions");
+
+      FastTreeItem definitions = root.addItem("View definitions");
+      /*definitions.addListener(
           new TreeNodeListenerAdapter()
           {
             public void onClick(Node node, EventObject eventObject)
@@ -207,15 +210,10 @@
             }
           }
       );
-      //TreeNode upload = new TreeNode("Upload new definitions");
-      //upload.setExpanded(true);
+      */
 
-      root.appendChild(definitions);
-      //root.appendChild(upload);
-
-      setRootVisible(true);
-      setRootNode(root);
-      root.setExpanded(true);
+      //TreeNode upload = new TreeNode("Upload new definitions");
+      //upload.setExpanded(true);      
     }
   }
 

Modified: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -21,12 +21,11 @@
  */
 package org.jboss.bpm.console.client.report;
 
+import com.google.gwt.widgetideas.client.FastTree;
+import com.google.gwt.widgetideas.client.FastTreeItem;
 import com.gwtext.client.core.EventObject;
 import com.gwtext.client.data.*;
 import com.gwtext.client.widgets.*;
-import com.gwtext.client.widgets.tree.TreePanel;
-import com.gwtext.client.widgets.tree.TreeNode;
-import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
 import com.gwtext.client.widgets.event.ButtonListenerAdapter;
 import com.gwtext.client.widgets.event.PanelListenerAdapter;
 import com.gwtext.client.widgets.form.ComboBox;
@@ -34,8 +33,9 @@
 import com.gwtext.client.widgets.layout.HorizontalLayout;
 import com.gwtext.client.widgets.layout.VerticalLayout;
 import com.gwtext.client.widgets.menu.Separator;
-import org.jboss.bpm.console.client.*;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.MenuSection;
 import org.jboss.bpm.console.client.util.ConsoleLog;
 
 /**
@@ -187,17 +187,19 @@
     return new MenuSection("Metrics and Stats", "bpm-metric-icon", new MetricTree());
   }
 
-  class MetricTree extends TreePanel
+  class MetricTree extends FastTree
   {
 
     public MetricTree()
     {
 
-      TreeNode root = new TreeNode("Process Metrics");
+      super();
 
-      TreeNode overview = new TreeNode("Process workload");
-      overview.setExpanded(true);
-      overview.addListener(
+      FastTreeItem root = addItem("Process Metrics");
+
+      FastTreeItem overview = root.addItem("Process workload");
+
+      /*overview.addListener(
           new TreeNodeListenerAdapter()
           {
             public void onClick(Node node, EventObject eventObject)
@@ -214,13 +216,7 @@
 
             }
           }
-      );
-
-      root.appendChild(overview);
-
-      setRootVisible(true);
-      setRootNode(root);
-      root.setExpanded(true);
+      );*/      
     }
   }
 }

Modified: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java	2009-04-14 13:48:31 UTC (rev 4549)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java	2009-04-14 14:21:41 UTC (rev 4550)
@@ -21,8 +21,8 @@
  */
 package org.jboss.bpm.console.client.task;
 
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.data.Node;
+import com.google.gwt.widgetideas.client.FastTree;
+import com.google.gwt.widgetideas.client.FastTreeItem;
 import com.gwtext.client.data.Record;
 import com.gwtext.client.widgets.Component;
 import com.gwtext.client.widgets.PaddedPanel;
@@ -32,10 +32,10 @@
 import com.gwtext.client.widgets.grid.RowSelectionModel;
 import com.gwtext.client.widgets.grid.event.RowSelectionListenerAdapter;
 import com.gwtext.client.widgets.layout.ColumnLayout;
-import com.gwtext.client.widgets.tree.TreeNode;
-import com.gwtext.client.widgets.tree.TreePanel;
-import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
-import org.jboss.bpm.console.client.*;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.MenuSection;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.client.util.ModelChangeListener;
 import org.jboss.bpm.console.client.util.ModelListenerRegistry;
@@ -187,16 +187,17 @@
     resetEditor();
   }
 
-  class TaskTree extends TreePanel
+  class TaskTree extends FastTree
   {
 
     public TaskTree()
     {
-      TreeNode root = new TreeNode("Your tasks");
+      super();
 
-      TreeNode overview = new TreeNode("Overview");
-      overview.setExpanded(true);
-      overview.addListener(
+      FastTreeItem root = addItem("Your tasks");
+
+      FastTreeItem overview = root.addItem("Overview");
+      /*overview.addListener(
           new TreeNodeListenerAdapter()
           {
             public void onClick(Node node, EventObject eventObject)
@@ -213,14 +214,8 @@
 
             }
           }
-      );
-
-      root.appendChild(overview);
-
-      setRootVisible(true);
-      setRootNode(root);
-      root.setExpanded(true);
-
+      );*/
+      
     }
   }
 }




More information about the jbpm-commits mailing list