Permalink
Browse files

JBRULES-412 Web app infrustructure and build system

git-svn-id: https://svn.jboss.org/repos/labs/labs/jbossrules/trunk@6120 c60d74c8-e8f6-0310-9e8f-d4a2fc68ab70
  • Loading branch information...
michaelneale committed Sep 8, 2006
1 parent 4c19d7b commit 141aabe8b3c2629eb3762e966ebc7de6a5d90a94
Showing with 3,569 additions and 0 deletions.
  1. +24 −0 drools-jbrms/.classpath
  2. +14 −0 drools-jbrms/.project
  3. +4 −0 drools-jbrms/JBRMS-compile
  4. +21 −0 drools-jbrms/JBRMS.launch
  5. +29 −0 drools-jbrms/README.txt
  6. +53 −0 drools-jbrms/pom.xml
  7. +12 −0 drools-jbrms/src/main/java/org/drools/brms/JBRMS.gwt.xml
  8. +66 −0 drools-jbrms/src/main/java/org/drools/brms/client/Admin.java
  9. +80 −0 drools-jbrms/src/main/java/org/drools/brms/client/Deployment.java
  10. +56 −0 drools-jbrms/src/main/java/org/drools/brms/client/Info.java
  11. +130 −0 drools-jbrms/src/main/java/org/drools/brms/client/JBRMSEntryPoint.java
  12. +70 −0 drools-jbrms/src/main/java/org/drools/brms/client/JBRMSFeature.java
  13. +38 −0 drools-jbrms/src/main/java/org/drools/brms/client/JBRMSFeatureConfigurator.java
  14. +88 −0 drools-jbrms/src/main/java/org/drools/brms/client/JBRMSFeatureList.java
  15. +138 −0 drools-jbrms/src/main/java/org/drools/brms/client/Packages.java
  16. +105 −0 drools-jbrms/src/main/java/org/drools/brms/client/RuleBases.java
  17. +83 −0 drools-jbrms/src/main/java/org/drools/brms/client/Rules.java
  18. +74 −0 drools-jbrms/src/main/java/org/drools/brms/client/Search.java
  19. +30 −0 drools-jbrms/src/main/java/org/drools/brms/client/rpc/RepositoryService.java
  20. +34 −0 drools-jbrms/src/main/java/org/drools/brms/client/rpc/RepositoryServiceAsync.java
  21. +45 −0 drools-jbrms/src/main/java/org/drools/brms/client/rpc/RepositoryServiceFactory.java
  22. +12 −0 drools-jbrms/src/main/java/org/drools/brms/client/rpc/TableConfig.java
  23. +74 −0 drools-jbrms/src/main/java/org/drools/brms/client/rpc/mock/MockRepositoryServiceAsync.java
  24. +3 −0 drools-jbrms/src/main/java/org/drools/brms/client/rpc/package.html
  25. +23 −0 drools-jbrms/src/main/java/org/drools/brms/client/ruleeditor/DefaultRuleContentWidget.java
  26. +24 −0 drools-jbrms/src/main/java/org/drools/brms/client/ruleeditor/RuleDocumentWidget.java
  27. +61 −0 drools-jbrms/src/main/java/org/drools/brms/client/ruleeditor/RuleMetaDataWidget.java
  28. +31 −0 drools-jbrms/src/main/java/org/drools/brms/client/ruleeditor/RuleView.java
  29. +7 −0 drools-jbrms/src/main/java/org/drools/brms/client/rulelist/EditItemEvent.java
  30. +58 −0 drools-jbrms/src/main/java/org/drools/brms/client/rulelist/RemoveMeData.java
  31. +35 −0 drools-jbrms/src/main/java/org/drools/brms/client/rulelist/RuleListItem.java
  32. +300 −0 drools-jbrms/src/main/java/org/drools/brms/client/rulelist/RuleListView.java
  33. +15 −0 drools-jbrms/src/main/java/org/drools/brms/client/rulenav/CategorySelectHandler.java
  34. +135 −0 drools-jbrms/src/main/java/org/drools/brms/client/rulenav/RulesNavigatorTree.java
  35. +266 −0 drools-jbrms/src/main/java/org/drools/brms/public/JBRMS.css
  36. +13 −0 drools-jbrms/src/main/java/org/drools/brms/public/JBRMS.html
  37. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/blanksearching.gif
  38. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/blue_gradient.gif
  39. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/config.png
  40. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/deploy.gif
  41. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/drools.gif
  42. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/drools_logo.png
  43. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/gray_gradient.gif
  44. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/package.gif
  45. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/rules.gif
  46. BIN drools-jbrms/src/main/java/org/drools/brms/public/images/searching.gif
  47. +17 −0 drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/JohannesElison.html
  48. BIN drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/JohannesElison.jpg
  49. +17 −0 drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/LaMarcheNocturne.html
  50. BIN drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/LaMarcheNocturne.jpg
  51. +17 −0 drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/SelfPortrait1628.html
  52. BIN drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/SelfPortrait1628.jpg
  53. +17 −0 drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/SelfPortrait1640.html
  54. BIN drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/SelfPortrait1640.jpg
  55. +17 −0 drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/TheArtistInHisStudio.html
  56. BIN drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/TheArtistInHisStudio.jpg
  57. +17 −0 drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/TheReturnOfTheProdigalSon.html
  58. BIN drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/TheReturnOfTheProdigalSon.jpg
  59. BIN drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/back.gif
  60. BIN drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/forward.gif
  61. +8 −0 drools-jbrms/src/main/java/org/drools/brms/public/rembrandt/rembrandt.css
  62. +53 −0 drools-jbrms/src/main/java/org/drools/brms/server/JBRMSServiceServlet.java
  63. +2 −0 drools-jbrms/src/main/webapp/NOTE.txt
  64. +18 −0 drools-jbrms/src/main/webapp/WEB-INF/web.xml
  65. +5 −0 drools-jbrms/src/main/webapp/index.jsp
  66. +266 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/JBRMS.css
  67. +13 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/JBRMS.html
  68. +578 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/gwt.js
  69. +20 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/history.html
  70. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/blanksearching.gif
  71. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/blue_gradient.gif
  72. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/config.png
  73. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/deploy.gif
  74. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/drools.gif
  75. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/drools_logo.png
  76. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/gray_gradient.gif
  77. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/package.gif
  78. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/rules.gif
  79. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/images/searching.gif
  80. +105 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/org.drools.brms.JBRMS.nocache.html
  81. +17 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/JohannesElison.html
  82. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/JohannesElison.jpg
  83. +17 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/LaMarcheNocturne.html
  84. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/LaMarcheNocturne.jpg
  85. +17 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/SelfPortrait1628.html
  86. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/SelfPortrait1628.jpg
  87. +17 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/SelfPortrait1640.html
  88. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/SelfPortrait1640.jpg
  89. +17 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/TheArtistInHisStudio.html
  90. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/TheArtistInHisStudio.jpg
  91. +17 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/TheReturnOfTheProdigalSon.html
  92. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/TheReturnOfTheProdigalSon.jpg
  93. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/back.gif
  94. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/forward.gif
  95. +8 −0 drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/rembrandt/rembrandt.css
  96. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/tree_closed.gif
  97. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/tree_open.gif
  98. BIN drools-jbrms/src/main/webapp/org.drools.brms.JBRMS/tree_white.gif
  99. +38 −0 drools-jbrms/src/test/java/org/drools/brms/AppTest.java
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/webapp"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry output="target/test-classes" kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.8/log4j-1.2.8.jar"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/drools/drools-repository/3.2/drools-repository-3.2.jar"/>
<classpathentry kind="var" path="M2_REPO/xerces/xmlParserAPIs/2.0.2/xmlParserAPIs-2.0.2.jar"/>
<classpathentry kind="var" path="M2_REPO/lucene/lucene/1.4.3/lucene-1.4.3.jar"/>
<classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/>
<classpathentry kind="var" path="M2_REPO/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar"/>
<classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar"/>
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/derby/derby/10.1.1.0/derby-10.1.1.0.jar"/>
<classpathentry kind="var" path="M2_REPO/google/gwt-servlet/1.1.10/gwt-servlet-1.1.10.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-core/1.0.1/jackrabbit-core-1.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/jsr170/jcr/1.0/jcr-1.0.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
@@ -0,0 +1,14 @@
<projectDescription>
<name>drools-brms</name>
<comment/>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,4 @@
#!/bin/sh
APPDIR=`dirname $0`;
GWT_HOME=/home/michael/apps/gwt/gwt-linux-1.1.10;
java -cp "$APPDIR/src/main/java:$GWT_HOME/gwt-user.jar:$GWT_HOME/gwt-dev-linux.jar" com.google.gwt.dev.GWTCompiler -out "$APPDIR/src/main/webapp" "$@" org.drools.brms.JBRMS;
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.GWTShell"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;drools-brms&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GWT_HOME/gwt-dev-linux.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/drools-jbrms/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/drools-jbrms/target/classes&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GWT_HOME/gwt-user.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.drools.brms.JBRMS/JBRMS.html"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="drools-jbrms"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/drools-jbrms"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
</launchConfiguration>
@@ -0,0 +1,29 @@
This covers the instructions on how to build/develop with this module.
It uses maven 2 as the main build system (pom.xml) which will setup the dependencies.
When building into a war, or running unit tests, use
>mvn package
GWT is used to build the UI. This is what the JBRMS-compile shell script is for.
If you take a look at the script, you may need to change the
path to be releveant for you.
Download GWT if you want to mess with the UI.
In eclipse: this also has a eclipse project file setup for you.
You will need to have the M2_REPO variable setup.
You can run all unit tests from here of course. You can also run GWT in
"hosted" mode (unless you are on the mac). To do this, there is a JBRMS-launch configuration
for eclipse (when you select Run>Run from the menu, it should provide a JBRMS run config).
If you are debugging GWT this way, you will need the GWT_HOME variable
set to where you have installed GWT (and if you are on windows, change the jar
to the one for you).
To make a change in GWT - when you are finished debugging, you will need to run
the JBRMS-compile script to refresh the static web content (all the AJAXY shite).
Any questions, contact michael.neale@gmail.com or find me in IRC.
@@ -0,0 +1,53 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.drools</groupId>
<artifactId>drools-brms</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>Drools :: Business Rule Management System</name>
<url>http://www.jboss.com/products/rules</url>
<repositories>
<repository>
<id>basedir</id>
<url>file://${basedir}/../repository</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- first the deps for the repo API itself (Jackrabbit based) -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-repository</artifactId>
<version>3.2</version>
</dependency>
<!-- now the deps for the repo web app -->
<dependency>
<groupId>servletapi</groupId>
<artifactId>servletapi</artifactId>
<version>2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>google</groupId>
<artifactId>gwt-servlet</artifactId>
<version>1.1.10</version>
</dependency>
</dependencies>
<build>
<finalName>drools-jbrms</finalName>
</build>
</project>
@@ -0,0 +1,12 @@
<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Specify the app entry point class. -->
<!-- <entry-point class='org.drools.brms.client.JBRMS'/> -->
<entry-point class='org.drools.brms.client.JBRMSEntryPoint'/>
<servlet path="/jbrmsService" class="org.drools.brms.server.JBRMSServiceServlet" />
</module>
@@ -0,0 +1,66 @@
/*
* Copyright 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.drools.brms.client;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
/**
* Demonstrates {"@link com.google.gwt.user.client.ui.TabPanel}.
*/
public class Admin extends JBRMSFeature {
public static ComponentInfo init() {
return new ComponentInfo("Admin",
"Administer the repository - security and preferences configuration.") {
public JBRMSFeature createInstance() {
return new Admin();
}
public Image getImage() {
return new Image("images/config.png");
}
};
}
private TabPanel fTabs = new TabPanel();
public Admin() {
fTabs.add(createImage("rembrandt/TheReturnOfTheProdigalSon.jpg"), "Security");
fTabs.add(createImage("rembrandt/TheReturnOfTheProdigalSon.jpg"), "Preferences");
fTabs.selectTab(0);
fTabs.setWidth("100%");
fTabs.setHeight("100%");
setWidget(fTabs);
}
public void onShow() {
}
private Widget createImage(String imageUrl) {
Image image = new Image(imageUrl);
image.setStyleName("ks-images-Image");
VerticalPanel p = new VerticalPanel();
p.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
p.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
p.add(image);
return p;
}
}
@@ -0,0 +1,80 @@
/*
* Copyright 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.drools.brms.client;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
/**
* Demonstrates {@link com.google.gwt.user.client.ui.MenuBar} and
* {@link com.google.gwt.user.client.ui.MenuItem}.
*/
public class Deployment extends JBRMSFeature implements Command {
public static ComponentInfo init() {
return new ComponentInfo("Deployment",
"Deploy rulebases to runtime systems.") {
public JBRMSFeature createInstance() {
return new Deployment();
}
public Image getImage() {
return new Image("images/deploy.gif");
}
};
}
private MenuBar menu = new MenuBar();
public Deployment() {
MenuBar subMenu = new MenuBar(true);
subMenu.addItem("<code>Code</code>", true, this);
subMenu.addItem("<strike>Strikethrough</strike>", true, this);
subMenu.addItem("<u>Underlined</u>", true, this);
MenuBar menu0 = new MenuBar(true);
menu0.addItem("<b>Bold</b>", true, this);
menu0.addItem("<i>Italicized</i>", true, this);
menu0.addItem("More &#187;", true, subMenu);
MenuBar menu1 = new MenuBar(true);
menu1.addItem("<font color='#FF0000'><b>Apple</b></font>", true, this);
menu1.addItem("<font color='#FFFF00'><b>Banana</b></font>", true, this);
menu1.addItem("<font color='#FFFFFF'><b>Coconut</b></font>", true, this);
menu1.addItem("<font color='#8B4513'><b>Donut</b></font>", true, this);
MenuBar menu2 = new MenuBar(true);
menu2.addItem("Bling", this);
menu2.addItem("Ginormous", this);
menu2.addItem("<code>w00t!</code>", true, this);
menu.addItem(new MenuItem("Style", menu0));
menu.addItem(new MenuItem("Fruit", menu1));
menu.addItem(new MenuItem("Term", menu2));
menu.setWidth("100%");
setWidget(menu);
}
public void execute() {
Window.alert("Thank you for selecting a menu item.");
}
public void onShow() {
}
}
@@ -0,0 +1,56 @@
/*
* Copyright 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.drools.brms.client;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
/**
* Introduction page.
*/
public class Info extends JBRMSFeature {
public static ComponentInfo init() {
return new ComponentInfo("Info", "JBoss Rules Managment Console.") {
public JBRMSFeature createInstance() {
return new Info();
}
public Image getImage() {
return new Image("images/drools.gif");
}
};
}
public Info() {
setWidget(new HTML(
"<div class='infoProse'>"
+ "Welcome to the JBoss Rules Management System console."
+ "<p>Currently very much a WIP."
+ "</div>"
+ "<div>"
+ "<img src='images/drools_logo.png'"
+ "</div>"
,
true));
}
public void onShow() {
}
}
Oops, something went wrong.

0 comments on commit 141aabe

Please sign in to comment.