[jbpm-commits] JBoss JBPM SVN: r2652 - in projects/gwt-console/trunk/war/src: main/java/org/jboss/bpm/console/client/metric and 4 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Oct 29 06:27:43 EDT 2008


Author: heiko.braun at jboss.com
Date: 2008-10-29 06:27:43 -0400 (Wed, 29 Oct 2008)
New Revision: 2652

Added:
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainCompositeView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenuSection.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskListEditor.java
Removed:
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/MainMenuPanel.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/UIConstants.java
Modified:
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenu.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverviewEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionListEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java
   projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java
Log:
Cleanup package structure, classnames and javadoc

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -7,18 +7,18 @@
  */
 public class Application implements EntryPoint
 {
-   private ConsoleView consoleView;
+   private MainCompositeView mainView;
 
    /**
     * This is the entry point method.
     */
    public void onModuleLoad()
    {
-      consoleView = new ConsoleView();      
+      mainView = new MainCompositeView();
    }
 
-   public ConsoleView getConsoleView()
+   public MainCompositeView getConsoleView()
    {
-      return consoleView;
+      return mainView;
    }
 }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -28,6 +28,8 @@
 import java.util.ArrayList;
 
 /**
+ * Authentication helper
+ * 
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 public class Authentication

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -1,241 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.http.client.Request;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HTML;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.core.Margins;
-import com.gwtext.client.core.RegionPosition;
-import com.gwtext.client.widgets.*;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-import com.gwtext.client.widgets.layout.BorderLayout;
-import com.gwtext.client.widgets.layout.BorderLayoutData;
-import com.gwtext.client.widgets.layout.FitLayout;
-import com.gwtext.client.widgets.layout.VerticalLayout;
-import org.jboss.bpm.console.client.metric.MetricOverviewEditor;
-import org.jboss.bpm.console.client.process.ProcessDefinitionListEditor;
-import org.jboss.bpm.console.client.widgets.EditorView;
-import org.jboss.bpm.console.client.widgets.UIConstants;
-
-/**
- * The main composite that assembles the gwt console application.
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class ConsoleView extends Composite
-{
-   private HTML status = new HTML();
-   private HeaderPanel header;
-   private MainMenu mainMenu;
-   private EditorPanel editorPanel;
-   private URLBuilder urlBuilder;
-
-   private String[] rolesAssigned = new String[] {};
-   public final static String[] KNOWN_ROLES = {"admin", "user"};
-
-   private static final int WIDTH = 1024;
-   private static final int HEIGHT = 768;
-
-   private Viewport viewport;
-
-   public ConsoleView()
-   {
-      if(!GWT.isScript()) // hosted mode used proxy by default
-         urlBuilder = new URLBuilder(GWT.getModuleBaseURL(), "xhp");
-      else
-         urlBuilder = new URLBuilder( "http://localhost:8080", "gwt-console-server"); // TODO: make configureable
-
-      Panel mainPanel = createMainPanel();
-      assembleMainApplication(mainPanel);
-      forceLogin(mainPanel);
-      viewport = new Viewport(mainPanel);
-   }
-
-   private Panel createMainPanel()
-   {
-      Panel mainPanel = new Panel();
-      mainPanel.setBorder(false);
-      mainPanel.setPaddings(5); // outer most padding
-      mainPanel.setLayout(new FitLayout());
-      mainPanel.setWidth(WIDTH);
-      mainPanel.setHeight(HEIGHT);
-      mainPanel.hide();
-
-      initWidget( mainPanel );
-      return mainPanel;
-   }
-
-   private void assembleMainApplication(Panel mainPanel)
-   {
-      Panel borderPanel = new Panel();
-      borderPanel.setLayout(new BorderLayout());
-
-      // ------------------------------------------
-
-      header = new HeaderPanel(this);
-      borderPanel.add(header, new BorderLayoutData(RegionPosition.NORTH));
-
-      // ------------------------------------------
-
-      mainMenu = new MainMenu(this);
-      BorderLayoutData menuData = new BorderLayoutData(RegionPosition.WEST);
-      menuData.setSplit(false);
-      menuData.setMinSize(UIConstants.MAIN_MENU_MIN);
-      menuData.setMaxSize(UIConstants.MAIN_MENU_MAX);
-      menuData.setMargins(new Margins(0, 5, 0, 0));
-      borderPanel.add(mainMenu, menuData);
-
-      // ------------------------------------------
-
-      editorPanel = new EditorPanel();
-      borderPanel.add(editorPanel, new BorderLayoutData(RegionPosition.CENTER));
-
-      // ------------------------------------------
-
-      editorPanel.addEditor( new ProcessDefinitionListEditor(this), false );
-      editorPanel.addEditor( new MetricOverviewEditor(this), false);
-
-      // ------------------------------------------
-
-      mainPanel.add(borderPanel);
-   }
-
-   private void forceLogin(final Panel mainPanel)
-   {
-      Panel panel = new Panel();
-      panel.setPaddings(20);
-      panel.setStyleName("login-panel-content");
-      panel.setLayout(new VerticalLayout(10));
-      panel.add( new HTML("Welcome, please login.") );
-
-      final Window window = new Window();
-      window.setTitle("GWT-Console");
-      window.setClosable(false);
-      window.setResizable(false);
-      window.setWidth(300);
-      window.setHeight(180);
-      window.setLayout(new BorderLayout());
-      window.setCloseAction(Window.CLOSE);
-
-      final Button submitBtn = new Button("Login",
-            new ButtonListenerAdapter()
-            {
-               public void onClick(Button button, EventObject e)
-               {
-                  String url = getUrlBuilder().getUserInRoleURL(KNOWN_ROLES);
-                  final Authentication authentication = new Authentication(url);
-                  authentication.setCallback(
-                        new Authentication.AuthCallback()
-                        {
-
-                           public void onLoginSuccess(Request request, Response response)
-                           {
-                              // parse roles
-                              rolesAssigned = authentication.getRolesAssigned().toArray(new String[] {});
-
-                              // display main console
-                              window.close();
-                              mainPanel.show();
-                              mainPanel.doLayout();
-                           }
-
-                           public void onLoginFailed(Request request, Throwable t)
-                           {
-                              // auth failed
-                              setError("Authentication failed.");
-                              t.printStackTrace(System.out);
-                           }
-                        }
-                  );
-
-                  authentication.doLogin();
-
-               }
-            });
-
-      panel.add(submitBtn);
-
-      BorderLayoutData centerData = new BorderLayoutData(RegionPosition.CENTER);
-      centerData.setMargins(3, 0, 3, 3);
-
-      window.add(panel, centerData);
-      // ------------------------------------------
-
-      window.show();
-   }
-
-
-   public void addEditorView(EditorView editorView)
-   {
-      editorPanel.addEditor(editorView,  true);
-   }
-
-   public boolean hasEditorView(String id)
-   {
-      return editorPanel.hasEditor(id);
-   }
-
-   public URLBuilder getUrlBuilder()
-   {
-      return this.urlBuilder;
-   }
-
-   public void showEditor(String id)
-   {
-      editorPanel.showTab(id);
-   }
-
-   public void setError(final String error)
-   {
-      displayMessage(error, true);
-   }
-
-   public void displayMessage(final String message, final boolean isError)
-   {
-      status.setText(message);
-
-      MessageBox.show(new MessageBoxConfig() {
-         {
-            String title = isError ? "Unknown error" : "System Message";
-            setTitle(title);
-            setMsg(message);
-            setButtons(MessageBox.OK);
-            setCallback(new MessageBox.PromptCallback()
-            {
-               public void execute(String btnID, String text)
-               {
-               }
-            });
-         }
-      });
-   }
-
-   public String[] getRolesAssigned()
-   {
-      return rolesAssigned;
-   }
-
-}

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -24,15 +24,16 @@
 import com.gwtext.client.widgets.Component;
 import com.gwtext.client.widgets.Panel;
 import com.gwtext.client.widgets.TabPanel;
-import com.gwtext.client.widgets.layout.FitLayout;
-import org.jboss.bpm.console.client.widgets.EditorView;
+import org.jboss.bpm.console.client.EditorView;
 
 /**
+ * Maintains {@link org.jboss.bpm.console.client.EditorPanel}'s
+ * 
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 public class EditorPanel extends TabPanel
 {
-   protected ConsoleView view;
+   protected MainCompositeView view;
 
    public EditorPanel()
    {

Copied: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorView.java (from rev 2649, projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java)
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorView.java	                        (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorView.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client;
+
+import com.gwtext.client.widgets.Panel;
+
+/**
+ * An editor can be plugged into a {@link org.jboss.bpm.console.client.EditorPanel}
+ * 
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public abstract class EditorView extends Panel
+{
+
+   protected EditorView()
+   {
+      super();
+   }
+
+   public abstract String getEditorId();
+   public abstract String getTitle();
+   public abstract String getIconCSS();
+}


Property changes on: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/EditorView.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java (from rev 2649, projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java)
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java	                        (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client;
+
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.layout.*;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class Header extends Panel
+{
+   private MainCompositeView view;
+   
+   public final static String ID = "org.jboss.bpm.headerPanel";
+   
+   public Header(MainCompositeView view)
+   {
+      super();
+      this.view = view;
+      
+      this.setId(ID);
+
+      HorizontalLayout layout = new HorizontalLayout(20);
+      this.setLayout(layout);
+
+      this.setHeight(50);
+      this.setBaseCls("bpm-header");
+
+      // --
+      
+     /* FormPanel formPanel = new FormPanel();
+      formPanel.setUrl("");
+      formPanel.setLabelAlign(Position.TOP);
+      formPanel.setWidth(100);
+
+      // ---
+
+      Panel topPanel = new Panel();
+      topPanel.setLayout(new ColumnLayout());
+
+      Panel columnOnePanel = new Panel();
+      columnOnePanel.setLayout(new FormLayout());
+
+      TextField name = new TextField("Username", "username", 230);
+      name.setAllowBlank(false);
+
+      columnOnePanel.add(name, new AnchorLayoutData("95%"));
+
+      // ---
+
+      Panel columnTwoPanel = new Panel();
+      columnTwoPanel.setLayout(new FormLayout());
+
+      TextField pass = new TextField("Password", "password", 230);
+      pass.setAllowBlank(false);
+      pass.setPassword(true);
+
+      columnTwoPanel.add(pass, new AnchorLayoutData("95%"));
+
+      // ---
+
+      topPanel.add(name, new ColumnLayoutData(.5));
+      topPanel.add(pass, new ColumnLayoutData(.5));
+
+      formPanel.add(topPanel);
+
+      // ---
+      
+      final Image image = new Image("images/Jbpm_logo_small.png");
+      this.add(formPanel);  */
+      
+   }
+}


Property changes on: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client;
-
-import com.google.gwt.user.client.ui.Image;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.layout.*;
-import com.gwtext.client.widgets.form.TextField;
-import com.gwtext.client.widgets.form.FormPanel;
-import com.gwtext.client.core.Position;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class HeaderPanel extends Panel
-{
-   private ConsoleView view;
-   
-   public final static String ID = "org.jboss.bpm.headerPanel";
-   
-   public HeaderPanel(ConsoleView view)
-   {
-      super();
-      this.view = view;
-      
-      this.setId(ID);
-
-      HorizontalLayout layout = new HorizontalLayout(20);
-      this.setLayout(layout);
-
-      this.setHeight(50);
-      this.setBaseCls("bpm-header");
-
-      // --
-      
-     /* FormPanel formPanel = new FormPanel();
-      formPanel.setUrl("");
-      formPanel.setLabelAlign(Position.TOP);
-      formPanel.setWidth(100);
-
-      // ---
-
-      Panel topPanel = new Panel();
-      topPanel.setLayout(new ColumnLayout());
-
-      Panel columnOnePanel = new Panel();
-      columnOnePanel.setLayout(new FormLayout());
-
-      TextField name = new TextField("Username", "username", 230);
-      name.setAllowBlank(false);
-
-      columnOnePanel.add(name, new AnchorLayoutData("95%"));
-
-      // ---
-
-      Panel columnTwoPanel = new Panel();
-      columnTwoPanel.setLayout(new FormLayout());
-
-      TextField pass = new TextField("Password", "password", 230);
-      pass.setAllowBlank(false);
-      pass.setPassword(true);
-
-      columnTwoPanel.add(pass, new AnchorLayoutData("95%"));
-
-      // ---
-
-      topPanel.add(name, new ColumnLayoutData(.5));
-      topPanel.add(pass, new ColumnLayoutData(.5));
-
-      formPanel.add(topPanel);
-
-      // ---
-      
-      final Image image = new Image("images/Jbpm_logo_small.png");
-      this.add(formPanel);  */
-      
-   }
-}

Copied: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainCompositeView.java (from rev 2649, projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java)
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainCompositeView.java	                        (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainCompositeView.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -0,0 +1,236 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.http.client.Request;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HTML;
+import com.gwtext.client.core.EventObject;
+import com.gwtext.client.core.Margins;
+import com.gwtext.client.core.RegionPosition;
+import com.gwtext.client.widgets.*;
+import com.gwtext.client.widgets.event.ButtonListenerAdapter;
+import com.gwtext.client.widgets.layout.BorderLayout;
+import com.gwtext.client.widgets.layout.BorderLayoutData;
+import com.gwtext.client.widgets.layout.FitLayout;
+import com.gwtext.client.widgets.layout.VerticalLayout;
+import org.jboss.bpm.console.client.metric.MetricOverviewEditor;
+import org.jboss.bpm.console.client.process.ProcessDefinitionListEditor;
+
+/**
+ * The main composite that assembles the gwt console application.
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MainCompositeView extends Composite
+{
+   private HTML status = new HTML();
+   private Header header;
+   private MainMenu mainMenu;
+   private EditorPanel editorPanel;
+   private URLBuilder urlBuilder;
+
+   private String[] rolesAssigned = new String[] {};
+   public final static String[] KNOWN_ROLES = {"admin", "user"};
+
+   private Viewport viewport;
+
+   public MainCompositeView()
+   {
+      if(!GWT.isScript()) // hosted mode used proxy by default
+         urlBuilder = new URLBuilder(GWT.getModuleBaseURL(), "xhp");
+      else
+         urlBuilder = new URLBuilder( "http://localhost:8080", "gwt-console-server"); // TODO: make configureable
+
+      Panel mainPanel = createMainPanel();
+      assembleMainApplication(mainPanel);
+      forceLogin(mainPanel);
+      viewport = new Viewport(mainPanel);
+   }
+
+   private Panel createMainPanel()
+   {
+      Panel mainPanel = new Panel();
+      mainPanel.setBorder(false);
+      mainPanel.setPaddings(5); // outer most padding
+      mainPanel.setLayout(new FitLayout());
+      mainPanel.setWidth(UIConstants.OVERALL_WIDTH);
+      mainPanel.setHeight(UIConstants.OVERALL_WIDTH);
+      mainPanel.hide();
+
+      initWidget( mainPanel );
+      return mainPanel;
+   }
+
+   private void assembleMainApplication(Panel mainPanel)
+   {
+      Panel borderPanel = new Panel();
+      borderPanel.setLayout(new BorderLayout());
+
+      // ------------------------------------------
+
+      header = new Header(this);
+      borderPanel.add(header, new BorderLayoutData(RegionPosition.NORTH));
+
+      // ------------------------------------------
+
+      mainMenu = new MainMenu(this);
+      BorderLayoutData menuData = new BorderLayoutData(RegionPosition.WEST);
+      menuData.setSplit(false);
+      menuData.setMinSize(UIConstants.MAIN_MENU_MIN);
+      menuData.setMaxSize(UIConstants.MAIN_MENU_MAX);
+      menuData.setMargins(new Margins(0, 5, 0, 0));
+      borderPanel.add(mainMenu, menuData);
+
+      // ------------------------------------------
+
+      editorPanel = new EditorPanel();
+      borderPanel.add(editorPanel, new BorderLayoutData(RegionPosition.CENTER));
+
+      // ------------------------------------------
+
+      editorPanel.addEditor( new ProcessDefinitionListEditor(this), false );
+      editorPanel.addEditor( new MetricOverviewEditor(this), false);
+
+      // ------------------------------------------
+
+      mainPanel.add(borderPanel);
+   }
+
+   private void forceLogin(final Panel mainPanel)
+   {
+      Panel panel = new Panel();
+      panel.setPaddings(20);
+      panel.setStyleName("login-panel-content");
+      panel.setLayout(new VerticalLayout(10));
+      panel.add( new HTML("Welcome, please login.") );
+
+      final Window window = new Window();
+      window.setTitle("GWT-Console");
+      window.setClosable(false);
+      window.setResizable(false);
+      window.setWidth(300);
+      window.setHeight(180);
+      window.setLayout(new BorderLayout());
+      window.setCloseAction(Window.CLOSE);
+
+      final Button submitBtn = new Button("Login",
+            new ButtonListenerAdapter()
+            {
+               public void onClick(Button button, EventObject e)
+               {
+                  String url = getUrlBuilder().getUserInRoleURL(KNOWN_ROLES);
+                  final Authentication authentication = new Authentication(url);
+                  authentication.setCallback(
+                        new Authentication.AuthCallback()
+                        {
+
+                           public void onLoginSuccess(Request request, Response response)
+                           {
+                              // parse roles
+                              rolesAssigned = authentication.getRolesAssigned().toArray(new String[] {});
+
+                              // display main console
+                              window.close();
+                              mainPanel.show();
+                              mainPanel.doLayout();
+                           }
+
+                           public void onLoginFailed(Request request, Throwable t)
+                           {
+                              // auth failed
+                              setError("Authentication failed.");
+                              t.printStackTrace(System.out);
+                           }
+                        }
+                  );
+
+                  authentication.doLogin();
+
+               }
+            });
+
+      panel.add(submitBtn);
+
+      BorderLayoutData centerData = new BorderLayoutData(RegionPosition.CENTER);
+      centerData.setMargins(3, 0, 3, 3);
+
+      window.add(panel, centerData);
+      // ------------------------------------------
+
+      window.show();
+   }
+
+
+   public void addEditorView(EditorView editorView)
+   {
+      editorPanel.addEditor(editorView,  true);
+   }
+
+   public boolean hasEditorView(String id)
+   {
+      return editorPanel.hasEditor(id);
+   }
+
+   public URLBuilder getUrlBuilder()
+   {
+      return this.urlBuilder;
+   }
+
+   public void showEditor(String id)
+   {
+      editorPanel.showTab(id);
+   }
+
+   public void setError(final String error)
+   {
+      displayMessage(error, true);
+   }
+
+   public void displayMessage(final String message, final boolean isError)
+   {
+      status.setText(message);
+
+      MessageBox.show(new MessageBoxConfig() {
+         {
+            String title = isError ? "Unknown error" : "System Message";
+            setTitle(title);
+            setMsg(message);
+            setButtons(MessageBox.OK);
+            setCallback(new MessageBox.PromptCallback()
+            {
+               public void execute(String btnID, String text)
+               {
+               }
+            });
+         }
+      });
+   }
+
+   public String[] getRolesAssigned()
+   {
+      return rolesAssigned;
+   }
+
+}


Property changes on: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainCompositeView.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenu.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenu.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenu.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -30,16 +30,23 @@
 import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
 import org.jboss.bpm.console.client.metric.MetricOverviewEditor;
 import org.jboss.bpm.console.client.process.ProcessDefinitionListEditor;
-import org.jboss.bpm.console.client.widgets.MainMenuPanel;
+import org.jboss.bpm.console.client.MainMenuSection;
 
+import java.util.List;
+import java.util.ArrayList;
+
 /**
+ * The main menu on the left hand.
+ * Keeps a list of {@link org.jboss.bpm.console.client.MainMenuSection}.
+ *
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 public class MainMenu extends Panel
 {
-   private final ConsoleView view;
+   private final MainCompositeView view;
+   private List<Panel> sections = new ArrayList<Panel>();
 
-   public MainMenu(final ConsoleView view)
+   public MainMenu(final MainCompositeView view)
    {
       super();
       this.view = view;
@@ -51,17 +58,23 @@
       this.setWidth(200);
       this.setLayout(accordion);
 
-      Panel navPanel = new MainMenuPanel("Process Management", "bpm-process-icon", new ProcessTree());
-      Panel taskPanel = new MainMenuPanel("Task Management", "bpm-task-icon", null);
-      Panel metricPanel = new MainMenuPanel("Metrics and Stats", "bpm-metric-icon", new MetricTree());
-      Panel settingsPanel = new MainMenuPanel("Settings", "bpm-settings-icon", new SettingsTree());
+      MainMenuSection navPanel = new MainMenuSection("Process Management", "bpm-process-icon", new ProcessTree());
+      MainMenuSection taskPanel = new MainMenuSection("Task Management", "bpm-task-icon", null);
+      MainMenuSection metricPanel = new MainMenuSection("Metrics and Stats", "bpm-metric-icon", new MetricTree());
+      MainMenuSection settingsPanel = new MainMenuSection("Settings", "bpm-settings-icon", new SettingsTree());
 
-      this.add(navPanel);
-      this.add(taskPanel);
-      this.add(metricPanel);
-      this.add(settingsPanel);
+      this.addSection(navPanel);
+      this.addSection(taskPanel);
+      this.addSection(metricPanel);
+      this.addSection(settingsPanel);
    }
 
+   public void addSection(MainMenuSection menuSection)
+   {
+      this.sections.add(menuSection);
+      this.add(menuSection);
+   }
+
    class ProcessTree extends TreePanel
    {
 

Copied: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenuSection.java (from rev 2649, projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/MainMenuPanel.java)
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenuSection.java	                        (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenuSection.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client;
+
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.Component;
+
+/**
+ * One section in the lefthand main menu.
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MainMenuSection extends Panel
+{
+
+   public MainMenuSection(String title, String iconClass, Component tree)
+   {
+      super();
+
+      setTitle(title);
+      setBorder(false);
+      setHideBorders(true);
+      setIconCls(iconClass);
+
+      if(tree!=null)
+         add(tree);
+   }
+}


Property changes on: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainMenuSection.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java (from rev 2649, projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/UIConstants.java)
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java	                        (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class UIConstants
+{
+   public static final int OVERALL_WIDTH = 1024;
+   public static final int OVERALL_HEIGHT = 768;
+   public static final int MAIN_MENU_MIN = 175;
+   public static final int MAIN_MENU_MAX = 400;
+   public static final int EDITOR_WIDTH = 680;
+   public static final int TEASER_PANEL_WIDTH  = 200;
+   public static final int EDITOR_PANEL_WIDTH = 450;
+}


Property changes on: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricEditor.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricEditor.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -21,12 +21,12 @@
  */
 package org.jboss.bpm.console.client.metric;
 
-import org.jboss.bpm.console.client.widgets.EditorView;
-import org.jboss.bpm.console.client.widgets.UIConstants;
+import org.jboss.bpm.console.client.EditorView;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.widgets.TeaserPanel;
 import org.jboss.bpm.console.client.widgets.HelpPanel;
 import org.jboss.bpm.console.client.model.ProcessDefinition;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
 import org.jboss.bpm.console.client.process.ProcessInstanceEditor;
 import org.jboss.bpm.console.client.process.ProcessInstanceListEditor;
 import com.gwtext.client.widgets.layout.ColumnLayout;
@@ -45,10 +45,10 @@
 {
 
    private ProcessDefinition parent;
-   private ConsoleView view;
+   private MainCompositeView view;
    private Panel teaserPanel;
 
-   public DefinitionMetricEditor(final ConsoleView view, final ProcessDefinition proc)
+   public DefinitionMetricEditor(final MainCompositeView view, final ProcessDefinition proc)
    {
       super();
       this.view = view;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricView.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/DefinitionMetricView.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -26,12 +26,12 @@
 import com.gwtext.client.widgets.form.FormPanel;
 import com.gwtext.client.widgets.form.TextField;
 import com.gwtext.client.core.Position;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.model.DAOFactory;
 import org.jboss.bpm.console.client.model.ProcessDefinition;
 import org.jboss.bpm.console.client.model.ProcessInstancePerformance;
 import org.jboss.bpm.console.client.widgets.LineChart;
-import org.jboss.bpm.console.client.widgets.UIConstants;
 
 import java.util.Iterator;
 import java.util.Map;
@@ -43,9 +43,9 @@
 {
    private ProcessDefinition parent;
 
-   private ConsoleView view;
+   private MainCompositeView view;
       
-   public DefinitionMetricView(ConsoleView view, ProcessDefinition parent)
+   public DefinitionMetricView(MainCompositeView view, ProcessDefinition parent)
    {
       super();
       this.view = view;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverview.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -32,12 +32,12 @@
 import com.gwtext.client.widgets.form.ComboBox;
 import com.gwtext.client.widgets.form.FormPanel;
 import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.model.DAOFactory;
 import org.jboss.bpm.console.client.model.ProcessDefinition;
 import org.jboss.bpm.console.client.model.ProcessDefinitionDAO;
 import org.jboss.bpm.console.client.widgets.BarChart;
-import org.jboss.bpm.console.client.widgets.UIConstants;
 
 import java.util.HashMap;
 import java.util.Iterator;
@@ -51,10 +51,10 @@
 {
 
    private Map row2ProcessMap = new HashMap();
-   private final ConsoleView view;
+   private final MainCompositeView view;
    private int currentSelection=-1;
 
-   public MetricOverview(final ConsoleView view)
+   public MetricOverview(final MainCompositeView view)
    {
       super();
       this.setHeader(false);

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverviewEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverviewEditor.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/metric/MetricOverviewEditor.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -21,11 +21,11 @@
  */
 package org.jboss.bpm.console.client.metric;
 
-import org.jboss.bpm.console.client.widgets.EditorView;
-import org.jboss.bpm.console.client.widgets.UIConstants;
+import org.jboss.bpm.console.client.EditorView;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.widgets.HelpPanel;
 import org.jboss.bpm.console.client.widgets.TeaserPanel;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
 import org.jboss.bpm.console.client.model.DAOFactory;
 import org.jboss.bpm.console.client.model.HelpDAO;
 import com.gwtext.client.widgets.layout.ColumnLayout;
@@ -38,12 +38,12 @@
 public class MetricOverviewEditor extends EditorView
 {
 
-   private ConsoleView view;
+   private MainCompositeView view;
    private Panel teaserPanel;
 
    public final static String ID = "org.jboss.bpm.metric.ProcessMetric";
 
-   public MetricOverviewEditor(ConsoleView view)
+   public MetricOverviewEditor(MainCompositeView view)
    {
       super();
       this.view = view;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -27,7 +27,7 @@
 import com.gwtext.client.widgets.MessageBoxConfig;
 import com.gwtext.client.widgets.grid.ColumnConfig;
 import com.gwtext.client.widgets.grid.ColumnModel;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
 import org.jboss.bpm.console.client.model.ProcessDefinition;
 import org.jboss.bpm.console.client.widgets.RemoteListView;
 
@@ -40,12 +40,12 @@
 {
    private Map<Integer, ProcessDefinition> row2ProcessMap = new HashMap<Integer,ProcessDefinition>();
 
-   public ProcessDefinitionList(String titleName, final ConsoleView view)
+   public ProcessDefinitionList(String titleName, final MainCompositeView view)
    {
       super(titleName, view, getResourceUrl(view), false);
    }
 
-   private static String getResourceUrl(ConsoleView view)
+   private static String getResourceUrl(MainCompositeView view)
    {
       return view.getUrlBuilder().getProcessDefinitionURL();
    }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionListEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionListEditor.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionListEditor.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -33,7 +33,9 @@
 import com.gwtext.client.widgets.layout.ColumnLayout;
 import com.gwtext.client.widgets.layout.ColumnLayoutData;
 import com.gwtext.client.widgets.layout.VerticalLayout;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
+import org.jboss.bpm.console.client.EditorView;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.metric.MetricOverviewEditor;
 import org.jboss.bpm.console.client.model.DAOFactory;
 import org.jboss.bpm.console.client.model.HelpDAO;
@@ -51,11 +53,11 @@
 
    private ProcessDefinitionList processDefinitionList;
 
-   private ConsoleView view;
+   private MainCompositeView view;
 
    private Panel teaserPanel;
 
-   public ProcessDefinitionListEditor(final ConsoleView view)
+   public ProcessDefinitionListEditor(final MainCompositeView view)
    {
       super();
       this.setId(ID);

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -27,7 +27,7 @@
 import com.gwtext.client.widgets.Component;
 import com.gwtext.client.widgets.Panel;
 import com.gwtext.client.widgets.event.PanelListenerAdapter;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
 import org.jboss.bpm.console.client.model.ProcessInstance;
 import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
 import org.jboss.bpm.console.client.model.jbpm3.DiagramNodeInfo;
@@ -49,10 +49,10 @@
 public class ProcessImageView extends Panel
 {
    private ProcessInstance instance;
-   private ConsoleView view;
+   private MainCompositeView view;
    private ActiveNodeInfo activeNodeInfo = null;
 
-   public ProcessImageView(final ProcessInstance instance, final ConsoleView view)
+   public ProcessImageView(final ProcessInstance instance, final MainCompositeView view)
    {
       super();
       this.instance = instance;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -26,13 +26,13 @@
 import com.gwtext.client.widgets.layout.ColumnLayout;
 import com.gwtext.client.widgets.layout.ColumnLayoutData;
 import com.gwtext.client.core.EventObject;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
+import org.jboss.bpm.console.client.EditorView;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.model.ProcessDefinition;
 import org.jboss.bpm.console.client.model.ProcessInstance;
-import org.jboss.bpm.console.client.widgets.EditorView;
 import org.jboss.bpm.console.client.widgets.TeaserPanel;
 import org.jboss.bpm.console.client.widgets.HelpPanel;
-import org.jboss.bpm.console.client.widgets.UIConstants;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
@@ -47,11 +47,11 @@
 
    private ProcessInstance processInstance;
 
-   private ConsoleView view;
+   private MainCompositeView view;
 
    private Panel teaserPanel;
 
-   public ProcessInstanceEditor(final ProcessDefinition proc, final ProcessInstance instance, final ConsoleView view)
+   public ProcessInstanceEditor(final ProcessDefinition proc, final ProcessInstance instance, final MainCompositeView view)
    {
       super();
       this.setId(ProcessInstanceEditor.ID+"."+instance.getInstanceId());

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -27,7 +27,7 @@
 import com.gwtext.client.widgets.MessageBoxConfig;
 import com.gwtext.client.widgets.grid.ColumnConfig;
 import com.gwtext.client.widgets.grid.ColumnModel;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
 import org.jboss.bpm.console.client.util.DateRenderer;
 import org.jboss.bpm.console.client.model.ProcessDefinition;
 import org.jboss.bpm.console.client.model.ProcessInstance;
@@ -46,7 +46,7 @@
    private ProcessDefinition parent;
    private static final String DATE_FORMAT = "y-m-j H:i:s";  //08-10-02 13:51:27
 
-   public ProcessInstanceList(ProcessDefinition procDef, String titleName, ConsoleView view)
+   public ProcessInstanceList(ProcessDefinition procDef, String titleName, MainCompositeView view)
    {
       super(titleName, view, getResourceUrl(view, procDef.getProcessId()), true);
       this.parent = procDef;
@@ -224,7 +224,7 @@
       return reader;
    }
 
-   private static String getResourceUrl(ConsoleView view, long parentId)
+   private static String getResourceUrl(MainCompositeView view, long parentId)
    {
       return view.getUrlBuilder().getProcessInstanceURL(parentId);
    }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -38,11 +38,11 @@
 import com.gwtext.client.widgets.form.TextField;
 import com.gwtext.client.widgets.grid.RowSelectionModel;
 import com.gwtext.client.widgets.grid.event.RowSelectionListenerAdapter;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
+import org.jboss.bpm.console.client.EditorView;
+import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.model.ProcessDefinition;
 import org.jboss.bpm.console.client.model.ProcessInstance;
-import org.jboss.bpm.console.client.widgets.EditorView;
-import org.jboss.bpm.console.client.widgets.UIConstants;
 import org.jboss.bpm.console.client.widgets.TeaserPanel;
 import org.jboss.bpm.console.client.widgets.HelpPanel;
 
@@ -56,10 +56,10 @@
 
    private ProcessDefinition parent;
    private ProcessInstance selectedInstance;
-   private ConsoleView view;
+   private MainCompositeView view;
    private ProcessInstanceList instanceList;
 
-   public ProcessInstanceListEditor(ProcessDefinition proc, ConsoleView view)
+   public ProcessInstanceListEditor(ProcessDefinition proc, MainCompositeView view)
    {
       super();
 

Added: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskListEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskListEditor.java	                        (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskListEditor.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.console.client.task;
+
+import org.jboss.bpm.console.client.EditorView;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class TaskListEditor extends EditorView
+{
+
+   public String getEditorId()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getTitle()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public String getIconCSS()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client.widgets;
-
-import com.gwtext.client.widgets.Panel;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public abstract class EditorView extends Panel
-{
-
-   protected EditorView()
-   {
-      super();
-   }
-
-   public abstract String getEditorId();
-   public abstract String getTitle();
-   public abstract String getIconCSS();
-}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/MainMenuPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/MainMenuPanel.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/MainMenuPanel.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client.widgets;
-
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.Component;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class MainMenuPanel extends Panel
-{
-
-   public MainMenuPanel(String title, String iconClass, Component tree)
-   {
-      super();
-
-      setTitle(title);
-      setBorder(false);
-      setHideBorders(true);
-      setIconCls(iconClass);
-
-      if(tree!=null)
-         add(tree);
-   }
-}

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -30,7 +30,8 @@
 import com.gwtext.client.widgets.grid.ColumnModel;
 import com.gwtext.client.widgets.grid.GridPanel;
 import com.gwtext.client.widgets.grid.event.GridCellListener;
-import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.MainCompositeView;
+import org.jboss.bpm.console.client.UIConstants;
 
 /**
  * A {@link com.gwtext.client.widgets.grid.GridPanel} view that will pull data
@@ -45,7 +46,7 @@
 public abstract class RemoteListView extends Panel
 {
    protected int selectedRowIndex = -1;
-   protected ConsoleView view;
+   protected MainCompositeView view;
    protected static final int PAGE_SIZE = 25;
    private GridPanel grid;
    protected String title;
@@ -56,7 +57,7 @@
    private boolean storeInit = false;
    private boolean hasAddButton;
 
-   public RemoteListView(String titleName, ConsoleView view, String resourceUrl, boolean hasAddButton)
+   public RemoteListView(String titleName, MainCompositeView view, String resourceUrl, boolean hasAddButton)
    {
       super();
 

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/UIConstants.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/UIConstants.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/UIConstants.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.console.client.widgets;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class UIConstants
-{   
-   public static final int MAIN_MENU_MIN = 175;
-   public static final int MAIN_MENU_MAX = 400;
-   public static final int EDITOR_WIDTH = 680;
-   public static final int TEASER_PANEL_WIDTH  = 200;
-   public static final int EDITOR_PANEL_WIDTH = 450;
-}

Modified: projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java
===================================================================
--- projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java	2008-10-29 09:30:14 UTC (rev 2651)
+++ projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java	2008-10-29 10:27:43 UTC (rev 2652)
@@ -56,7 +56,7 @@
 
    public void testAuthentication()
    {
-      final ConsoleView view = application.getConsoleView();
+      final MainCompositeView view = application.getConsoleView();
       assertNotNull("View not initialized", view);
 
       Timer timer = new Timer()
@@ -64,7 +64,7 @@
          public void run()
          {
 
-            String inRoleURL = view.getUrlBuilder().getUserInRoleURL(ConsoleView.KNOWN_ROLES);
+            String inRoleURL = view.getUrlBuilder().getUserInRoleURL(MainCompositeView.KNOWN_ROLES);
             final Authentication auth = new Authentication(inRoleURL);
             auth.setCallback(
                   new Authentication.AuthCallback() {
@@ -92,7 +92,7 @@
 
    public void testProcessDefList()
    {
-      final ConsoleView view = application.getConsoleView();
+      final MainCompositeView view = application.getConsoleView();
       assertNotNull("View not initialized", view);
 
 
@@ -134,7 +134,7 @@
          public void run()
          {
             System.out.println("Do authentication");
-            String inRoleURL = view.getUrlBuilder().getUserInRoleURL(ConsoleView.KNOWN_ROLES);
+            String inRoleURL = view.getUrlBuilder().getUserInRoleURL(MainCompositeView.KNOWN_ROLES);
             final Authentication auth = new Authentication(inRoleURL);
             auth.doLogin();
 




More information about the jbpm-commits mailing list