[jbpm-commits] JBoss JBPM SVN: r1819 - in jbpm3/trunk/modules/gwt-console/war/src/main: java/org/jboss/bpm/console/client/process and 2 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Aug 4 09:08:48 EDT 2008
Author: heiko.braun at jboss.com
Date: 2008-08-04 09:08:47 -0400 (Mon, 04 Aug 2008)
New Revision: 1819
Added:
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java
Modified:
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java
jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css
Log:
ProcessINstanceView, first cut
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -67,7 +67,7 @@
mainMenu = new MainMenu(this);
BorderLayoutData menuData = new BorderLayoutData(RegionPosition.WEST);
- menuData.setSplit(true);
+ menuData.setSplit(false);
menuData.setMinSize(175);
menuData.setMaxSize(400);
menuData.setMargins(new Margins(0, 5, 0, 0));
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -88,7 +88,7 @@
{
ProcessDefinition proc = (ProcessDefinition)row2ProcessMap.get(row);
ProcessInstanceList list = new ProcessInstanceList(
- proc, "Process Instances: " + proc.getId(), view
+ proc, "Process Instances", view
);
view.addEditorView( new ProcessInstanceEditor( list ));
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -21,6 +21,7 @@
*/
package org.jboss.bpm.console.client.process;
+import org.jboss.bpm.console.client.model.ProcessDefinition;
import org.jboss.bpm.console.client.widgets.EditorView;
/**
@@ -30,12 +31,14 @@
{
public final static String ID = "org.jboss.bpm.process.ProcessInstanceList";
- private String title;
- public ProcessInstanceEditor(ProcessInstanceList instances)
+
+ private ProcessDefinition parent;
+
+ public ProcessInstanceEditor(ProcessInstanceList instanceList)
{
super();
- this.title = instances.getProcessDefinition().getName() + " Instances";
- this.add(instances);
+ parent = instanceList.getProcessDefinition();
+ this.add( instanceList );
}
@@ -46,6 +49,6 @@
public String getTitle()
{
- return title;
+ return parent.getName();
}
}
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -52,6 +52,6 @@
public String getTitle()
{
- return "Process Definitions";
+ return "Processes";
}
}
Added: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -0,0 +1,132 @@
+/*
+ * 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.core.EventObject;
+import com.gwtext.client.widgets.*;
+import com.gwtext.client.widgets.event.ButtonListenerAdapter;
+import com.gwtext.client.widgets.grid.GridPanel;
+import com.gwtext.client.widgets.grid.event.GridCellListener;
+import org.jboss.bpm.console.client.ConsoleView;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public abstract class ListView extends Panel
+{
+ protected ConsoleView view;
+ protected GridPanel grid;
+
+ private Integer selectedRowIndex = null;
+
+ public ListView(String titleName, ConsoleView view)
+ {
+ super();
+ this.setId(getId());
+ this.view = view;
+
+ // ----------------------------------
+
+ this.setPaddings(15);
+ this.setHeader(false);
+ this.setBorder(false);
+
+ // ----------------------------------
+
+ this.grid = new GridPanel();
+
+ grid.addGridCellListener(new GridCellListener()
+ {
+ public void onCellClick(GridPanel grid, int rowIndex, int colindex, EventObject e)
+ {
+ selectedRowIndex = new Integer(rowIndex);
+ }
+
+ public void onCellContextMenu(GridPanel gridPanel, int i, int i1, EventObject eventObject)
+ {
+
+ }
+
+ public void onCellDblClick(GridPanel gridPanel, int i, int i1, EventObject eventObject)
+ {
+
+ }
+ }
+ );
+
+ // ----------------------------------------
+
+ Toolbar bottomToolbar = new Toolbar();
+ bottomToolbar.addFill();
+ bottomToolbar.addButton(
+ new ToolbarButton("Examine", new ButtonListenerAdapter() {
+ public void onClick(Button button, EventObject e)
+ {
+ if(null== selectedRowIndex)
+ MessageBox.alert("Please select a process.");
+ else
+ onExamine(selectedRowIndex);
+ }
+ })
+ );
+
+ bottomToolbar.addButton(
+ new ToolbarButton("Delete", new ButtonListenerAdapter()
+ {
+ public void onClick(Button button, EventObject e)
+ {
+ if(null== selectedRowIndex)
+ {
+ MessageBox.alert("Please select a process.");
+ }
+ else
+ {
+ onDelete(selectedRowIndex);
+ }
+ }
+ })
+ );
+
+ grid.setBottomToolbar(bottomToolbar);
+
+ // ----------------------------------------
+
+ grid.setFrame(true);
+ grid.setStripeRows(true);
+ grid.setTitle(titleName);
+
+ grid.setWidth(350);
+
+ grid.setEnableHdMenu(false);
+ grid.setEnableColumnMove(false);
+
+ // ----------------------------------------
+
+ this.add(grid);
+
+ }
+
+ protected abstract void onExamine(final Integer row);
+
+ protected abstract void onDelete(final Integer row);
+
+}
Property changes on: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css 2008-08-04 13:08:47 UTC (rev 1819)
@@ -30,4 +30,8 @@
.bpm-FieldValue {
+}
+
+.bpm-EditorHeader {
+
}
\ No newline at end of file
More information about the jbpm-commits
mailing list