[jbpm-commits] JBoss JBPM SVN: r4548 - in projects/gwt-console/branches/hbraun: war/src/main/java/org/jboss/bpm/console/client and 1 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Apr 14 09:19:03 EDT 2009
Author: heiko.braun at jboss.com
Date: 2009-04-14 09:19:03 -0400 (Tue, 14 Apr 2009)
New Revision: 4548
Modified:
projects/gwt-console/branches/hbraun/plugin-example/plugin-example.iml
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/Header.java
projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/MainView.java
projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/public/Application.html
projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/public/console.css
Log:
Migrate Header to mosaic
Modified: projects/gwt-console/branches/hbraun/plugin-example/plugin-example.iml
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-example/plugin-example.iml 2009-04-14 09:47:58 UTC (rev 4547)
+++ projects/gwt-console/branches/hbraun/plugin-example/plugin-example.iml 2009-04-14 13:19:03 UTC (rev 4548)
@@ -9,109 +9,73 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="gwt-rpc" />
- <orderEntry type="module" module-name="plugin" />
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
+ <orderEntry type="module" module-name="rpc" />
+ <orderEntry type="module" module-name="plugin-api" />
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:provided">
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.3:provided">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gwt-log/gwt-log/2.5.2/gwt-log-2.5.2.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.3/gwt-user-1.5.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-dnd:jar:0.1.9: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/com/googlecode/gwtmosaic/gwt-mosaic-dnd/0.1.9/gwt-mosaic-dnd-0.1.9.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">
- <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic:jar:0.1.9:compile">
+ <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:provided">
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic/0.1.9/gwt-mosaic-0.1.9.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">
- <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.3:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.3/gwt-user-1.5.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-incubator:jar:0.1.9:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic-incubator/0.1.9/gwt-mosaic-incubator-0.1.9.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: com.googlecode.gwtmosaic:gwt-mosaic-gwtx:jar:0.1.9:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/googlecode/gwtmosaic/gwt-mosaic-gwtx/0.1.9/gwt-mosaic-gwtx-0.1.9.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/Header.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/Header.java 2009-04-14 09:47:58 UTC (rev 4547)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/Header.java 2009-04-14 13:19:03 UTC (rev 4548)
@@ -21,70 +21,57 @@
*/
package org.jboss.bpm.console.client;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.Button;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-import com.gwtext.client.widgets.layout.*;
-import com.gwtext.client.core.EventObject;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.*;
+import org.gwt.mosaic.ui.client.layout.BoxLayout;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
import java.util.List;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
*/
-public class Header extends Panel
+public class Header extends HorizontalPanel
{
- private ApplicationContext view;
+ private ApplicationContext appContext;
public final static String ID = "org.jboss.bpm.headerPanel";
- public Header(ApplicationContext view)
+ public Header(ApplicationContext appContext)
{
super();
- this.view = view;
- this.setId(ID);
+ this.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
+ this.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
+ this.setStyleName("bpm-header");
- this.setFrame(false);
- this.setBorder(false);
- this.setHeader(false);
-
- //HorizontalLayout layout = new HorizontalLayout(20);
- //this.setLayout(layout);
-
- this.setHeight(50);
- this.setBaseCls("bpm-header");
+ this.appContext = appContext;
+
}
public void setUserInfo(String username, List<String> roles)
{
- Panel userInfo = new Panel();
- userInfo.setBorder(false);
- userInfo.setHeader(false);
- userInfo.setFrame(false);
- userInfo.setStyleName("bpm-header-userinfo");
- HorizontalLayout layout = new HorizontalLayout(10);
- userInfo.setLayout(layout);
+ HorizontalPanel p = new HorizontalPanel();
+ p.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
+ p.setStyleName("bpm-header-userinfo");
- userInfo.add(new Image("images/icons/05.png"));
- userInfo.add(new HTML(view.getAuthentication().getUsername()));
- userInfo.add(
- new Button("Logout",
- new ButtonListenerAdapter()
- {
+ Image img = new Image("images/icons/05.png");
+ HTML html = new HTML(appContext.getAuthentication().getUsername());
- public void onClick(Button button, EventObject eventObject)
- {
- view.getAuthentication().doLogout();
- }
- }
- )
+ Button btn = new Button("Logout", new ClickListener()
+ {
+
+ public void onClick(Widget widget)
+ {
+ appContext.getAuthentication().doLogout();
+ }
+ }
);
- //this.clear();
- this.add(userInfo);
- //this.doLayout();
+ p.add(img);
+ p.add(html);
+ p.add(btn);
+ this.add(p);
+
}
}
Modified: projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/MainView.java
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/MainView.java 2009-04-14 09:47:58 UTC (rev 4547)
+++ projects/gwt-console/branches/hbraun/war/src/main/java/org/jboss/bpm/console/client/MainView.java 2009-04-14 13:19:03 UTC (rev 4548)
@@ -21,17 +21,17 @@
*/
package org.jboss.bpm.console.client;
+import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.core.client.GWT;
-import com.gwtext.client.core.Margins;
-import com.gwtext.client.core.RegionPosition;
-import com.gwtext.client.widgets.*;
-import com.gwtext.client.widgets.layout.BorderLayout;
-import com.gwtext.client.widgets.layout.BorderLayoutData;
-import com.gwtext.client.widgets.layout.FitLayout;
+import com.google.gwt.user.client.ui.RootPanel;
+import org.gwt.mosaic.ui.client.MessageBox;
+import org.gwt.mosaic.ui.client.Viewport;
+import org.gwt.mosaic.ui.client.layout.BorderLayout;
+import static org.gwt.mosaic.ui.client.layout.BorderLayout.Region;
+import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.WorkspaceLauncher;
/**
* The main composite that assembles the gwt console application.
@@ -46,7 +46,6 @@
private Workspace workspace;
private URLBuilder urlBuilder;
- private Viewport viewport;
private Authentication auth;
private ConsoleConfig config;
@@ -57,14 +56,40 @@
this.config = config;
this.urlBuilder = urlBuilder;
- Panel mainPanel = createMainPanel();
- assembleMainApplication(mainPanel);
+ Viewport viewport = new Viewport();
- viewport = new Viewport(mainPanel);
+ /*Panel mainPanel = createMainPanel();
+ assembleMainApplication(mainPanel);*/
+
+ LayoutPanel layout = createLayout();
+ viewport.add(layout);
+
+ RootPanel.get().add(viewport);
}
- private Panel createMainPanel()
+ private LayoutPanel createLayout()
{
+ final LayoutPanel layoutPanel = new LayoutPanel(new BorderLayout());
+
+ final Button b2 = new Button("Button 2");
+ final Button b3 = new Button("Button 3");
+ final Button b4 = new Button("Button 4");
+ final Button b5 = new Button("Button 5");
+
+ header = new Header(this);
+ header.setUserInfo(auth.getUsername(), auth.getRolesAssigned());
+ layoutPanel.add(header, new BorderLayoutData(Region.NORTH, 50));
+
+ layoutPanel.add(b2, new BorderLayoutData(Region.SOUTH, 10, 200));
+ layoutPanel.add(b3, new BorderLayoutData(Region.WEST, 10, 200));
+ layoutPanel.add(b4, new BorderLayoutData(Region.EAST, 10, 200));
+ layoutPanel.add(b5, new BorderLayoutData(Region.CENTER, true));
+
+ return layoutPanel;
+ }
+
+ /*private Panel createMainPanel()
+ {
Panel mainPanel = new Panel();
mainPanel.setBorder(false);
mainPanel.setPaddings(5); // outer most padding
@@ -104,11 +129,11 @@
launcher.launch(this, workspace);
borderPanel.add(workspace, new BorderLayoutData(RegionPosition.CENTER));
-
+
// ------------------------------------------
mainPanel.add(borderPanel);
- }
+ } */
public void addEditor(Editor editor)
{
@@ -135,21 +160,10 @@
{
status.setText(message);
- MessageBox.show(new MessageBoxConfig()
- {
- {
- String title = isError ? "Error" : "System Message";
- setTitle(title);
- setMsg(message);
- setButtons(MessageBox.OK);
- setCallback(new MessageBox.PromptCallback()
- {
- public void execute(String btnID, String text)
- {
- }
- });
- }
- });
+ if(isError)
+ MessageBox.error("Error", message);
+ else
+ MessageBox.alert("Alert", message);
}
public Authentication getAuthentication()
@@ -160,13 +174,8 @@
public ConsoleConfig getConfig()
{
return config;
- }
+ }
- public Viewport getViewport()
- {
- return viewport;
- }
-
public Workspace getWorkpace()
{
return workspace;
Modified: projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/public/Application.html
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/public/Application.html 2009-04-14 09:47:58 UTC (rev 4547)
+++ projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/public/Application.html 2009-04-14 13:19:03 UTC (rev 4548)
@@ -33,10 +33,6 @@
<!-- -->
<body>
-<p>
-<h4 style="text-align:center;">BPM console preview. Login as admin/admin</h4>
-</p>
-
<!-- OPTIONAL: include this if you want history support -->
<iframe src="javascript:''" id="__gwt_historyFrame" style="width: 0; height: 0; border: 0"></iframe>
Modified: projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/public/console.css
===================================================================
--- projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/public/console.css 2009-04-14 09:47:58 UTC (rev 4547)
+++ projects/gwt-console/branches/hbraun/war/src/main/resources/org/jboss/bpm/console/public/console.css 2009-04-14 13:19:03 UTC (rev 4548)
@@ -1,44 +1,41 @@
.bpm-layout {
- border: 1px solid green;
- margin: 10px;
+ border: 1px solid green;
+ margin: 10px;
}
.bpm-header {
- height: 50px;
- width: 100%;
- background-color:#ffffff;
- background-image: url( images/Jbpm_logo_small.png);
- background-repeat:no-repeat;
+ background-color:#ffffff;
+ background-image: url( images/Jbpm_logo_small.png);
+ background-repeat:no-repeat;
}
.bpm-header-userinfo {
- float: right;
- position:relative; top: 10px; right:20px;
- font-family: sans-serif;
+ font-family: sans-serif;
+ width:150px;
}
.bpm-menu {
- height: 50px;
- width: 100%;
- border: 1px solid;
+ height: 50px;
+ width: 100%;
+ border: 1px solid;
}
.bpm-workspace {
- width: 100%;
- height:100%;
+ width: 100%;
+ height:100%;
}
.bpm-label {
- font-family: sans-serif;
- font-size: small;
+ font-family: sans-serif;
+ font-size: small;
}
.bpm-ListHeaderRow {
- font-weight: bold;
+ font-weight: bold;
}
.bpm-EvenRow {
- background-color: #f0f4f8;
+ background-color: #f0f4f8;
}
.bpm-FieldValue {
@@ -50,130 +47,130 @@
}
.bpm-ProcessImage {
- border: 0px;
+ border: 0px;
}
.bpm-SplitPanel {
- border: 1px dashed green;
- vertical-align: top;
- position:relative; top:5px; left:5px;
+ border: 1px dashed green;
+ vertical-align: top;
+ position:relative; top:5px; left:5px;
}
.piechart-types {
- font-size: small;
- list-style-type:decimal;
- font-family: sans-serif;
+ font-size: small;
+ list-style-type:decimal;
+ font-family: sans-serif;
}
.bpm-help-panel {
- background-color:#F0F0F0;
- font-family: sans-serif;
- font-size: small;
+ background-color:#F0F0F0;
+ font-family: sans-serif;
+ font-size: small;
}
.bpm-help-icon {
- background-image: url( images/icons/14.png)
+ background-image: url( images/icons/14.png)
}
.bpm-report-icon {
- background-image: url( images/icons/31.png)
+ background-image: url( images/icons/31.png)
}
.bpm-process-icon {
- background-image: url( images/icons/41.png)
+ background-image: url( images/icons/41.png)
}
.bpm-task-icon {
- background-image: url( images/icons/29.png)
+ background-image: url( images/icons/29.png)
}
.bpm-instance-icon {
- background-image: url( images/icons/05_1.png)
+ background-image: url( images/icons/05_1.png)
}
.bpm-settings-icon {
-
+
}
.bpm-tools-icon {
- background-image: url( images/icons/36.png)
+ background-image: url( images/icons/36.png)
}
.bpm-switch-context-icon {
- background-image: url( images/icons/13.png)
+ background-image: url( images/icons/13.png)
}
.bpm-comment-icon {
- background-image: url( images/icons/27.png)
+ background-image: url( images/icons/27.png)
}
.bpm-enalrge-icon {
- background-image: url( images/icons/49.png)
+ background-image: url( images/icons/49.png)
}
.login-panel-content {
- text-align: center;
+ text-align: center;
}
.bpm-examine-icon {
- background-image: url( images/icons/examine.png)
+ background-image: url( images/icons/examine.png)
}
.bpm-add-icon {
- background-image: url( images/icons/add.png)
+ background-image: url( images/icons/add.png)
}
.bpm-lock-icon-small {
- background-image: url( images/icons/lock_small.png)
+ background-image: url( images/icons/lock_small.png)
}
.bpm-remove-icon {
- background-image: url( images/icons/remove.png)
+ background-image: url( images/icons/remove.png)
}
.bpm-play-icon {
- background-image: url( images/icons/play.png)
+ background-image: url( images/icons/play.png)
}
.bpm-stop-icon {
- background-image: url( images/icons/stop.png)
+ background-image: url( images/icons/stop.png)
}
.bpm-pause-icon {
- background-image: url( images/icons/pause.png)
+ background-image: url( images/icons/pause.png)
}
div.activeNode {
- position:absolute;
- border-width:1px;
- border-style:solid;
- border-color:#6699CC;
+ position:absolute;
+ border-width:1px;
+ border-style:solid;
+ border-color:#6699CC;
}
div.activeNode-header {
- position:absolute;
- overflow:hidden;
+ position:absolute;
+ overflow:hidden;
}
div.activeNode-header-link {
- cursor:default;
- font-family:sans-serif;
- font-size:10px;
- white-space:nowrap;
- color:#ffffff;
- padding-left:3px;
- padding-right:3px;
- border-width:1px;
- border-style:solid;
- border-color:#6699CC;
- background-color:#6699CC;
+ cursor:default;
+ font-family:sans-serif;
+ font-size:10px;
+ white-space:nowrap;
+ color:#ffffff;
+ padding-left:3px;
+ padding-right:3px;
+ border-width:1px;
+ border-style:solid;
+ border-color:#6699CC;
+ background-color:#6699CC;
}
div.activeNode-header-link a {
- color:#ffffff;
- text-decoration:none;
+ color:#ffffff;
+ text-decoration:none;
}
div.activeNode-header-link a:hover {
- text-decoration:underline;
+ text-decoration:underline;
}
\ No newline at end of file
More information about the jbpm-commits
mailing list