[jbpm-commits] JBoss JBPM SVN: r4605 - projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Apr 22 09:23:11 EDT 2009
Author: heiko.braun at jboss.com
Date: 2009-04-22 09:23:11 -0400 (Wed, 22 Apr 2009)
New Revision: 4605
Modified:
projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java
projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java
Log:
Fix the plugin-example
Modified: projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java 2009-04-22 13:05:43 UTC (rev 4604)
+++ projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java 2009-04-22 13:23:11 UTC (rev 4605)
@@ -21,13 +21,13 @@
*/
package org.jboss.bpm.console.client.mapsplugin;
+import com.google.gwt.user.client.ui.Frame;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.DOM;
+import org.jboss.bpm.console.client.ApplicationContext;
import org.jboss.bpm.console.client.Editor;
import org.jboss.bpm.console.client.MenuSection;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.View;
-import com.google.gwt.user.client.ui.Frame;
-import com.mvc4g.client.ViewInterface;
-import com.mvc4g.client.Controller;
+import org.gwt.mosaic.ui.client.ScrollLayoutPanel;
/**
* An example editor that embeds google maps into the console
@@ -35,25 +35,30 @@
*/
public class MapsEditor extends Editor
{
- public final static String ID = "org.jboss.bpm.console.plugin.MapsEditor";
+ public final static String ID = MapsEditor.class.getName();
public MapsEditor(ApplicationContext appContext)
{
super(appContext);
-
- // keep it simple, just use an iframe
- Frame frame = new Frame();
- frame.setWidth("660");
- frame.setHeight("448");
- frame.setUrl("http://maps.google.com");
-
- // TODO: reimplement
}
public void initialize()
{
- isInitialized = true;
+ if(!isInitialized)
+ {
+ // keep it simple, just use an iframe
+ Frame frame = new Frame();
+ frame.setWidth("660");
+ frame.setHeight("448");
+ frame.setUrl("http://maps.google.com");
+
+ //DOM.setStyleAttribute(frame.getElement(), "border", "none");
+
+ this.add(frame);
+
+ isInitialized = true;
+ }
}
public String getEditorId()
Modified: projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java
===================================================================
--- projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java 2009-04-22 13:05:43 UTC (rev 4604)
+++ projects/gwt-console/branches/hbraun/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java 2009-04-22 13:23:11 UTC (rev 4605)
@@ -23,7 +23,9 @@
import com.google.gwt.user.client.ui.Tree;
import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.TreeListener;
import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.Workspace;
class MapsNavigationTree extends Tree
{
@@ -42,25 +44,24 @@
TreeItem navEntry = new TreeItem("Open maps");
root.addItem(navEntry);
- /*
-
- new TreeNodeListenerAdapter()
+ addTreeListener(
+ new TreeListener()
{
- public void onClick(Node node, EventObject eventObject)
+ public void onTreeItemSelected(TreeItem treeItem)
{
- if (appContext.getWorkpace().hasEditor(MapsEditor.ID))
+ if("Open maps".equals(treeItem.getText()))
{
- appContext.getWorkpace().showEditor(MapsEditor.ID);
+ Workspace workspace = appContext.getWorkpace();
+ workspace.showEditor(MapsEditor.ID);
}
- else
- {
- appContext.getWorkpace().addEditor(new MapsEditor(appContext), false);
- }
+ }
+ public void onTreeItemStateChanged(TreeItem treeItem)
+ {
+
}
}
- ).
- */
+ );
addItem(root);
}
More information about the jbpm-commits
mailing list