[jbpm-commits] JBoss JBPM SVN: r3267 - in projects/gwt-console/trunk: war and 3 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Dec 8 07:01:52 EST 2008
Author: heiko.braun at jboss.com
Date: 2008-12-08 07:01:52 -0500 (Mon, 08 Dec 2008)
New Revision: 3267
Removed:
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/BarChart.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/LineChart.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/PieChart.java
Modified:
projects/gwt-console/trunk/gwt-parent.iml
projects/gwt-console/trunk/pom.xml
projects/gwt-console/trunk/war/pom.xml
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Menu.java
projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
Log:
Finish refactoring. Remove dependency on gchart
Modified: projects/gwt-console/trunk/gwt-parent.iml
===================================================================
--- projects/gwt-console/trunk/gwt-parent.iml 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/gwt-parent.iml 2008-12-08 12:01:52 UTC (rev 3267)
@@ -14,9 +14,8 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jbpm3-identity" exported="" />
<orderEntry type="module" module-name="jbpm3-enterprise" exported="" />
- <orderEntry type="module" module-name="Balalaika" exported="" />
+ <orderEntry type="module" module-name="jbpm3-identity" exported="" />
<orderEntry type="module" module-name="jbpm3-core" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
@@ -91,15 +90,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.google.gwt:gchart:jar:2.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gchart/2.2/gchart-2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss:jboss-common-core:jar:2.2.7.GA:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.7.GA/jboss-common-core-2.2.7.GA.jar!/" />
@@ -352,15 +342,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.google.gwt:gwt-dev:jar:mac:1.5.2:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-dev/1.5.2/gwt-dev-1.5.2-mac.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: bsh:bsh:jar:1.3.0:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/bsh/bsh/1.3.0/bsh-1.3.0.jar!/" />
@@ -424,15 +405,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/code/gwt-log/gwt-log/2.5.2/gwt-log-2.5.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
@@ -541,15 +513,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: mysql:mysql-connector-java:jar:5.1.6:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar!/" />
@@ -568,33 +531,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.birt:coreapi:jar:2.2.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/coreapi/2.2.2/coreapi-2.2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.birt:dataadapterapi:jar:2.2.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/dataadapterapi/2.2.2/dataadapterapi-2.2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.birt:chartengineapi:jar:2.2.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/chartengineapi/2.2.2/chartengineapi-2.2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss:jboss-reflect:jar:2.0.0.CR1:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/jboss-reflect/2.0.0.CR1/jboss-reflect-2.0.0.CR1.jar!/" />
@@ -604,15 +540,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.birt:dteapi:jar:2.2.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/dteapi/2.2.2/dteapi-2.2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: apache-xerces:xml-apis:jar:2.9.1:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar!/" />
@@ -631,15 +558,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.birt:scriptapi:jar:2.2.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/scriptapi/2.2.2/scriptapi-2.2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss:jbossxb:jar:2.0.0.CR13:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/jbossxb/2.0.0.CR13/jbossxb-2.0.0.CR13.jar!/" />
@@ -676,15 +594,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.birt:engineapi:jar:2.2.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/engineapi/2.2.2/engineapi-2.2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.microcontainer:jboss-kernel:jar:2.0.0.CR1:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/microcontainer/jboss-kernel/2.0.0.CR1/jboss-kernel-2.0.0.CR1.jar!/" />
@@ -712,113 +621,50 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.birt:modelapi:jar:2.2.2:compile">
+ <library name="M2 Dep: com.google.gwt:gchart:jar:2.2:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/birt/modelapi/2.2.2/modelapi-2.2.2.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gchart/2.2/gchart-2.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.ibm.icu:icu4j:jar:3.6.1:compile">
+ <library name="M2 Dep: com.google.gwt:gwt-dev:jar:mac:1.5.2:provided">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/ibm/icu/icu4j/3.6.1/icu4j-3.6.1.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/gwt/gwt-dev/1.5.2/gwt-dev-1.5.2-mac.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: commons-codec:commons-codec:jar:1.3:compile">
+ <library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/google/code/gwt-log/gwt-log/2.5.2/gwt-log-2.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: rhino:js:jar:1.6R2:compile">
+ <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/rhino/js/1.6R2/js-1.6R2.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.emf:ecore-xmi:jar:2.2.2.v200702131851:compile">
+ <library name="M2 Dep: commons-codec:commons-codec:jar:1.2:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/emf/ecore-xmi/2.2.2.v200702131851/ecore-xmi-2.2.2.v200702131851.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.w3c:flute:jar:1.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/w3c/flute/1.2/flute-1.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: commons-discovery:commons-discovery:jar:0.2:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.emf:common:jar:2.2.1.v200702131851:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/emf/common/2.2.1.v200702131851/common-2.2.1.v200702131851.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: commons-cli:commons-cli:jar:1.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.w3c:sac:jar:1.3:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/w3c/sac/1.3/sac-1.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.eclipse.emf:ecore:jar:2.2.2.v200702131851:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/emf/ecore/2.2.2.v200702131851/ecore-2.2.2.v200702131851.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.lowagie:itext:jar:1.3:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/lowagie/itext/1.3/itext-1.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: projects/gwt-console/trunk/pom.xml
===================================================================
--- projects/gwt-console/trunk/pom.xml 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/pom.xml 2008-12-08 12:01:52 UTC (rev 3267)
@@ -17,7 +17,6 @@
<properties>
<commons.logging.version>1.1.1</commons.logging.version>
<gwt.version>1.5.2</gwt.version>
- <gchart.version>2.2</gchart.version>
<gwtext.version>2.0.5</gwtext.version>
<gwt-log.version>2.5.2</gwt-log.version>
<stax-api.version>1.0-2</stax-api.version>
Modified: projects/gwt-console/trunk/war/pom.xml
===================================================================
--- projects/gwt-console/trunk/war/pom.xml 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/war/pom.xml 2008-12-08 12:01:52 UTC (rev 3267)
@@ -55,10 +55,6 @@
<artifactId>gwtext</artifactId>
</dependency>
<dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gchart</artifactId>
- </dependency>
- <dependency>
<groupId>com.google.code.gwt-log</groupId>
<artifactId>gwt-log</artifactId>
</dependency>
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java 2008-12-08 12:01:52 UTC (rev 3267)
@@ -37,10 +37,10 @@
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.ReportOverviewEditor;
import org.jboss.bpm.console.client.process.ProcessDefinitionListEditor;
import org.jboss.bpm.console.client.task.TaskListEditor;
import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.report.ReportOverviewEditor;
import java.util.List;
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Menu.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Menu.java 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Menu.java 2008-12-08 12:01:52 UTC (rev 3267)
@@ -28,7 +28,7 @@
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.metric.ReportOverviewEditor;
+import org.jboss.bpm.console.client.report.ReportOverviewEditor;
import org.jboss.bpm.console.client.process.ProcessDefinitionListEditor;
import org.jboss.bpm.console.client.task.TaskListEditor;
Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/BarChart.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/BarChart.java 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/BarChart.java 2008-12-08 12:01:52 UTC (rev 3267)
@@ -1,95 +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.googlecode.gchart.client.GChart;
-
-import java.util.Map;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class BarChart extends GChart
-{
- String[] groupLabels;
-
- final static String BAR_COLOR = "#66CC66";
-
- final int MAX_REVENUE = 1000;
-
- public BarChart(int width, int height, String title, String groupName, Map barValues)
- {
-
- // limit to a single group
- this.groupLabels = new String[] { groupName };
-
- setChartSize(width, height);
- setChartTitle(title);
- setFontFamily("sans-serif");
-
- String[] labels = (String[])barValues.keySet().toArray( new String[]{} );
-
- for (int iCurve=0; iCurve < labels.length; iCurve++)
- {
- addCurve(); // one curve per quarter
- getCurve().getSymbol().setSymbolType(GChart.SymbolType.VBAR_SOUTHWEST);
- getCurve().getSymbol().setBackgroundColor(BAR_COLOR);
- getCurve().setLegendLabel(labels[iCurve]);
-
- getCurve().getSymbol().setHovertextTemplate(
- labels[iCurve] + " value=${y}"
- );
-
- getCurve().getSymbol().setModelWidth(0.8);
- getCurve().getSymbol().setBorderColor("black");
- getCurve().getSymbol().setBorderWidth(1);
- for (int jGroup=0; jGroup < groupLabels.length; jGroup++)
- {
- // the '+1' creates a bar-sized gap between groups
- getCurve().addPoint(1+iCurve+jGroup*(labels.length+1), Math.random()*MAX_REVENUE);
- getCurve().getPoint().setAnnotationText(labels[iCurve]);
- getCurve().getPoint().setAnnotationLocation( GChart.AnnotationLocation.NORTH);
- }
- }
-
- for (int i = 0; i < groupLabels.length; i++)
- {
- // formula centers tick-label horizontally on each group
- getXAxis().addTick(
- labels.length/2. + i*(labels.length+1),
- groupLabels[i]
- );
- getXAxis().setTickLabelFontSize(20);
- }
-
- getXAxis().setTickLength(6); // small tick-like gap...
- getXAxis().setTickThickness(0); // but with invisible ticks
- getXAxis().setAxisMin(0); // keeps first bar on chart
-
- getYAxis().setAxisMin(0); // Based on sim revenue range
- getYAxis().setAxisMax(MAX_REVENUE); // of 0 to MAX_REVENUE.
- getYAxis().setTickCount(11);
- getYAxis().setHasGridlines(true);
- getYAxis().setTickLabelFormat("###");
- }
-
-}
Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/LineChart.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/LineChart.java 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/LineChart.java 2008-12-08 12:01:52 UTC (rev 3267)
@@ -1,80 +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.googlecode.gchart.client.GChart;
-
-import java.util.Map;
-import java.util.Set;
-import java.util.Iterator;
-
-import org.jboss.bpm.console.client.model.internal.MockMetricsDAO;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class LineChart extends GChart
-{
- /**
- *
- * @param metrics Long->Double
- */
- public LineChart(String title, int width, int height, Map metrics, String xLabel, String yLabel)
- {
- setChartTitle(title);
- setChartSize(width, height);
- setFontFamily("sans-serif");
- addCurve();
-
- // 2 pixel square connecting dots, spaced 5 pixels apart:
- getCurve().getSymbol().setFillThickness(2);
- getCurve().getSymbol().setFillSpacing(5);
- getCurve().getSymbol().setBackgroundColor("#66CC66");
- getCurve().getSymbol().setBorderColor("#66CC66");
-
- Iterator keys = metrics.keySet().iterator();
- int i=0;
- while(keys.hasNext())
- {
- Long k = (Long)keys.next();
- Double v = (Double)metrics.get(k);
- getCurve().addPoint(i, v.doubleValue() );
-
- getCurve().getPoint().setAnnotationVisible(true);
- getCurve().getPoint().setAnnotationText("ID " + k);
- getCurve().getPoint().setAnnotationLocation( GChart.AnnotationLocation.NORTH);
- i++;
- }
-
-
- getXAxis().setTickCount(metrics.size());
- getXAxis().setTickLength(6); // small tick-like gap...
- getXAxis().setTickThickness(0); // but with invisible ticks
- getXAxis().setAxisMin(0); // keeps first bar on chart
-
- getXAxis().setAxisLabel(xLabel);
- getYAxis().setAxisLabel(yLabel);
- getYAxis().setAxisMin(0); // Based on sim revenue range
- getYAxis().setAxisMax(MockMetricsDAO.MAX_EXEC_TIME); // TODO: Fixme
- getYAxis().setTickCount(11);
- }
-}
Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/PieChart.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/PieChart.java 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/PieChart.java 2008-12-08 12:01:52 UTC (rev 3267)
@@ -1,83 +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.googlecode.gchart.client.GChart;
-
-import java.util.Map;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class PieChart extends GChart
-{
- public PieChart(int width, int height, String title, Map typeValues)
- {
- String[] pieColors = {"green", "red", "maroon", "yellow"};
-
- this.setChartSize(width, height);
- setChartTitle(title);
- this.setLegendVisible(false);
-
- getXAxis().setAxisVisible(false);
- getYAxis().setAxisVisible(false);
- getXAxis().setAxisMin(0);
- getXAxis().setAxisMax(10);
- getXAxis().setTickCount(0);
- getYAxis().setAxisMin(0);
- getYAxis().setAxisMax(10);
- getYAxis().setTickCount(0);
-
- // --------------------
- // this line orients the center of the first slice (apple) due east
- String[] pieTypes = (String[])typeValues.keySet().toArray(new String[] {});
-
- double[] pieValues = new double[pieTypes.length];
- for(int i=0; i<pieTypes.length; i++)
- {
- pieValues[i] = ((Double)typeValues.get(pieTypes[i])).doubleValue();
- }
-
- // --------------------
-
- setInitialPieSliceOrientation(0.75 - pieValues[0]/2);
- for (int i=0; i < pieValues.length; i++)
- {
- addCurve();
- getCurve().addPoint(5,5);
- getCurve().getSymbol().setSymbolType( SymbolType.PIE_SLICE_OPTIMAL_SHADING );
- getCurve().getSymbol().setBorderColor("white");
- getCurve().getSymbol().setBackgroundColor(pieColors[i]);
-
- // next two lines define pie diameter as 6 x-axis model units
- getCurve().getSymbol().setModelWidth(6);
- getCurve().getSymbol().setHeight(0);
- getCurve().getSymbol().setFillSpacing(3);
- getCurve().getSymbol().setFillThickness(3);
- getCurve().getSymbol().setHovertextTemplate(pieTypes[i] + ", " + Math.round(100*pieValues[i])+"%");
-
- getCurve().getSymbol().setPieSliceSize(pieValues[i]);
- getCurve().getPoint().setAnnotationText( pieTypes[i] );
- getCurve().getPoint().setAnnotationLocation( AnnotationLocation.OUTSIDE_PIE_ARC);
- }
- }
-}
Modified: projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
===================================================================
--- projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml 2008-12-08 11:57:31 UTC (rev 3266)
+++ projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml 2008-12-08 12:01:52 UTC (rev 3267)
@@ -5,7 +5,6 @@
<inherits name='com.google.gwt.json.JSON'/>
<inherits name="com.google.gwt.i18n.I18N"/>
<inherits name='com.gwtext.GwtExt' />
- <inherits name='com.googlecode.gchart.GChart'/>
<!-- Add gwt-log support, default level `DEBUG` -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" />
More information about the jbpm-commits
mailing list