summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-06 07:50:13 (EDT)
committerCarsten Drossel2008-08-06 07:50:13 (EDT)
commit54396be5c97764260de7cf0c23c1839254eb9c34 (patch)
tree829c5fcb70e607980880fd322f361f1c695ea4e5
parentd817bf71bdee3eebcbe0f5e43e0f8320565c6c1f (diff)
downloadorg.eclipse.riena-54396be5c97764260de7cf0c23c1839254eb9c34.zip
org.eclipse.riena-54396be5c97764260de7cf0c23c1839254eb9c34.tar.gz
org.eclipse.riena-54396be5c97764260de7cf0c23c1839254eb9c34.tar.bz2
using navigationNodePresentation and workAreaPresentation extension points for example application
-rw-r--r--org.eclipse.riena.example.client/plugin.xml57
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java104
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java7
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java12
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java25
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationNodeBuilder.java31
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java85
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java32
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java45
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java16
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java47
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeBuilder.java2
12 files changed, 311 insertions, 152 deletions
diff --git a/org.eclipse.riena.example.client/plugin.xml b/org.eclipse.riena.example.client/plugin.xml
index 91f900a..68f910b 100644
--- a/org.eclipse.riena.example.client/plugin.xml
+++ b/org.eclipse.riena.example.client/plugin.xml
@@ -312,9 +312,9 @@
<extension
point="org.eclipse.riena.navigation.NavigationNodePresentation">
<navigationNodePresentation
- presentationId="org.eclipse.riena.example.playground"
- nodeBuilder="org.eclipse.riena.example.client.navigation.model.PlaygroundNodeBuilder"
- parentPresentationId="playground">
+ presentationId="org.eclipse.riena.example.navigation"
+ nodeBuilder="org.eclipse.riena.example.client.navigation.model.NavigationSubApplicationNodeBuilder"
+ parentPresentationId="application">
</navigationNodePresentation>
</extension>
<extension
@@ -322,6 +322,30 @@
<navigationNodePresentation
presentationId="org.eclipse.riena.example.navigate"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.NavigateNodeBuilder"
+ parentPresentationId="org.eclipse.riena.example.navigation">
+ </navigationNodePresentation>
+ </extension>
+ <extension
+ point="org.eclipse.riena.navigation.NavigationNodePresentation">
+ <navigationNodePresentation
+ presentationId="org.eclipse.riena.example.sharedViews"
+ nodeBuilder="org.eclipse.riena.example.client.navigation.model.SharedViewsNodeBuilder"
+ parentPresentationId="playground">
+ </navigationNodePresentation>
+ </extension>
+ <extension
+ point="org.eclipse.riena.navigation.NavigationNodePresentation">
+ <navigationNodePresentation
+ presentationId="org.eclipse.riena.example.uiProcesses"
+ nodeBuilder="org.eclipse.riena.example.client.navigation.model.UIProcessNodeBuilder"
+ parentPresentationId="playground">
+ </navigationNodePresentation>
+ </extension>
+ <extension
+ point="org.eclipse.riena.navigation.NavigationNodePresentation">
+ <navigationNodePresentation
+ presentationId="org.eclipse.riena.example.playground"
+ nodeBuilder="org.eclipse.riena.example.client.navigation.model.PlaygroundNodeBuilder"
parentPresentationId="playground">
</navigationNodePresentation>
</extension>
@@ -330,7 +354,7 @@
<navigationNodePresentation
presentationId="org.eclipse.riena.example.navigate.comboAndList"
nodeBuilder="org.eclipse.riena.example.client.navigation.model.ComboAndListNodeBuilder"
- parentPresentationId="app1">
+ parentPresentationId="org.eclipse.riena.example.navigation">
</navigationNodePresentation>
</extension>
<extension
@@ -352,6 +376,31 @@
<extension
point="org.eclipse.riena.navigation.WorkAreaPresentation">
<workAreaPresentation
+ presentationId="org.eclipse.riena.example.uiProcess"
+ view="org.eclipse.riena.example.client.views.UiProcessDemoSubModuleView"
+ viewController="org.eclipse.riena.example.client.controllers.UIProcessDemoSubModuleController">
+ </workAreaPresentation>
+ </extension>
+ <extension
+ point="org.eclipse.riena.navigation.WorkAreaPresentation">
+ <workAreaPresentation
+ presentationId="org.eclipse.riena.example.sharedView"
+ view="org.eclipse.riena.example.client.views.SharedViewDemoSubModuleView"
+ viewController="org.eclipse.riena.example.client.controllers.SharedViewDemoSubModuleController">
+ viewShared="true"
+ </workAreaPresentation>
+ </extension>
+ <extension
+ point="org.eclipse.riena.navigation.WorkAreaPresentation">
+ <workAreaPresentation
+ presentationId="org.eclipse.riena.example.sharedView"
+ view="org.eclipse.riena.example.client.views.UiProcessDemoSubModuleView"
+ viewController="org.eclipse.riena.example.client.controllers.UIProcessDemoSubModuleController">
+ </workAreaPresentation>
+ </extension>
+ <extension
+ point="org.eclipse.riena.navigation.WorkAreaPresentation">
+ <workAreaPresentation
presentationId="org.eclipse.riena.example.navigation"
view="org.eclipse.riena.example.client.views.NavigationSubModuleView"
viewController="org.eclipse.riena.example.client.controllers.NavigationSubModuleController">
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java
index 4459885..2f2d0bb 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/application/SwtExampleApplication.java
@@ -11,21 +11,12 @@
package org.eclipse.riena.example.client.application;
import org.eclipse.riena.core.util.StringUtils;
-import org.eclipse.riena.example.client.views.CustomerDetailSubModuleView;
-import org.eclipse.riena.example.client.views.NavigationSubModuleView;
-import org.eclipse.riena.example.client.views.SharedViewDemoSubModuleView;
-import org.eclipse.riena.example.client.views.UiProcessDemoSubModuleView;
import org.eclipse.riena.internal.example.client.Activator;
import org.eclipse.riena.navigation.IApplicationModel;
import org.eclipse.riena.navigation.IModuleGroupNode;
-import org.eclipse.riena.navigation.IModuleNode;
-import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ApplicationModel;
-import org.eclipse.riena.navigation.model.ModuleGroupNode;
-import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
import org.eclipse.riena.navigation.model.SubApplicationNode;
-import org.eclipse.riena.navigation.model.SubModuleNode;
import org.eclipse.riena.navigation.ui.controllers.ApplicationController;
import org.eclipse.riena.navigation.ui.swt.application.SwtApplication;
import org.eclipse.riena.navigation.ui.swt.presentation.SwtPresentationManager;
@@ -79,106 +70,33 @@ public class SwtExampleApplication extends SwtApplication {
SubApplicationNode subApplication = null;
IModuleGroupNode moduleGroup = null;
- IModuleNode module = null;
- SubModuleNode subModule = null;
SwtPresentationManager presentation = SwtPresentationManagerAccessor.getManager();
- final IApplicationModel applicationModel = new ApplicationModel("Riena Navigation Example"); //$NON-NLS-1$
+ final ApplicationModel applicationModel = new ApplicationModel("Riena Navigation Example"); //$NON-NLS-1$
+ applicationModel.setPresentationId(new NavigationNodeId("application"));
applicationModel.setIcon(createIconPath(IExampleIcons.ICON_APPLICATION));
- // sub application 1
- subApplication = new SubApplicationNode("Navigation"); //$NON-NLS-1$
- subApplication.setPresentationId(new NavigationNodeId("app1")); //$NON-NLS-1$
- subApplication.setIcon(createIconPath(IExampleIcons.ICON_APPLICATION));
- presentation.present(subApplication, "subapplication.1"); //$NON-NLS-1$
- applicationModel.addChild(subApplication);
- subApplication.setSelected(true);
-
- moduleGroup = new ModuleGroupNode("Group 1.1"); //$NON-NLS-1$
- subApplication.addChild(moduleGroup);
- module = new ModuleNode("Module 1.1.1"); //$NON-NLS-1$
- module.setIcon(createIconPath(IExampleIcons.ICON_APPLICATION));
- moduleGroup.addChild(module);
- subModule = new SubModuleNode("SubModule 1.1.1.1"); //$NON-NLS-1$
- subModule.setIcon(createIconPath(IExampleIcons.ICON_FILE));
- presentation.present(subModule, CustomerDetailSubModuleView.ID); //$NON-NLS-1$
- module.addChild(subModule);
-
- SubModuleNode subModule2 = new SubModuleNode("SubModule 1.1.1.1"); //$NON-NLS-1$
- presentation.present(subModule2, CustomerDetailSubModuleView.ID); //$NON-NLS-1$
- subModule.addChild(subModule2);
-
- subModule = new SubModuleNode("SubModule 1.1.1.2"); //$NON-NLS-1$
- presentation.present(subModule, CustomerDetailSubModuleView.ID); //$NON-NLS-1$
- module.addChild(subModule);
- module = new ModuleNode("Module 1.1.2 (closeable)"); //$NON-NLS-1$
- module.setIcon(createIconPath(IExampleIcons.ICON_HOMEFOLDER));
- moduleGroup.addChild(module);
- subModule = new SubModuleNode("SubModule 1.1.2.1"); //$NON-NLS-1$
- presentation.present(subModule, CustomerDetailSubModuleView.ID); //$NON-NLS-1$
- module.addChild(subModule);
- /* NEW */
- subModule = new SubModuleNode("Navigation"); //$NON-NLS-1$
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.navigation")); //$NON-NLS-1$
- presentation.registerView(NavigationSubModuleView.ID, false);
- module.addChild(subModule);
-
- moduleGroup = new ModuleGroupNode("Group 1.2"); //$NON-NLS-1$
- moduleGroup.setPresentWithSingleModule(false);
- subApplication.addChild(moduleGroup);
- module = new ModuleNode("Module 1.2.1 (not closeable)"); //$NON-NLS-1$
- module.setCloseable(false);
- module.setIcon(createIconPath(IExampleIcons.ICON_RED_LED));
- moduleGroup.addChild(module);
- subModule = new SubModuleNode("SubModule 1.2.1.1"); //$NON-NLS-1$
- presentation.present(subModule, CustomerDetailSubModuleView.ID); //$NON-NLS-1$
- module.addChild(subModule);
- subModule = new SubModuleNode("SubModule 1.2.1.2"); //$NON-NLS-1$
- presentation.present(subModule, CustomerDetailSubModuleView.ID); //$NON-NLS-1$
- module.addChild(subModule);
-
- // Playground
+
+ // Navigation SubApplication
+ applicationModel.create(new NavigationNodeId("org.eclipse.riena.example.navigation"));
+
+ applicationModel.create(new NavigationNodeId("org.eclipse.riena.example.navigate"));
+
+ // Playground SubApplication
subApplication = new SubApplicationNode("Playground"); //$NON-NLS-1$
subApplication.setPresentationId(new NavigationNodeId("playground")); //$NON-NLS-1$
subApplication.setIcon(createIconPath(IExampleIcons.ICON_SAMPLE));
presentation.present(subApplication, "subapplication.2"); //$NON-NLS-1$
applicationModel.addChild(subApplication);
- moduleGroup = new ModuleGroupNode("Group 2.2"); //$NON-NLS-1$
- subApplication.addChild(moduleGroup);
-
// shared view demo
- presentation.registerView(SharedViewDemoSubModuleView.ID, true);
- IModuleNode sharedViewModule = new ModuleNode("Shared View Demo"); //$NON-NLS-1$
- module.setIcon(createIconPath(IExampleIcons.ICON_SAMPLE));
- moduleGroup.addChild(sharedViewModule);
-
- ISubModuleNode sharedViewSm1 = new SubModuleNode("Node 1"); //$NON-NLS-1$
- presentation.present(sharedViewSm1, SharedViewDemoSubModuleView.ID);
- sharedViewModule.addChild(sharedViewSm1);
-
- ISubModuleNode sharedViewSm2 = new SubModuleNode("Node 2"); //$NON-NLS-1$
- presentation.present(sharedViewSm2, SharedViewDemoSubModuleView.ID);
- sharedViewModule.addChild(sharedViewSm2);
+ applicationModel.create(new NavigationNodeId("org.eclipse.riena.example.sharedViews"));
// uiProcess demo
- IModuleNode uiProcessModule = new ModuleNode("UIProcess"); //$NON-NLS-1$
- moduleGroup.addChild(uiProcessModule);
-
- ISubModuleNode uiPSubModule = new SubModuleNode("Demo1"); //$NON-NLS-1$
- presentation.registerView(UiProcessDemoSubModuleView.ID, false);
- presentation.present(uiPSubModule, UiProcessDemoSubModuleView.ID);
- uiProcessModule.addChild(uiPSubModule);
-
- uiPSubModule = new SubModuleNode("Demo2"); //$NON-NLS-1$
- presentation.registerView(UiProcessDemoSubModuleView.ID, false);
- presentation.present(uiPSubModule, UiProcessDemoSubModuleView.ID);
- uiProcessModule.addChild(uiPSubModule);
+ applicationModel.create(new NavigationNodeId("org.eclipse.riena.example.uiProcesses"));
applicationModel.create(new NavigationNodeId("org.eclipse.riena.example.playground"));
- applicationModel.create(new NavigationNodeId("org.eclipse.riena.example.navigate"));
-
return applicationModel;
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java
index 3608aee..fe929ab 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/NavigationSubModuleController.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.riena.example.client.controllers;
-import org.eclipse.riena.example.client.views.NavigationSubModuleView;
import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
@@ -18,10 +17,10 @@ import org.eclipse.riena.navigation.ISubApplicationNode;
import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
+import org.eclipse.riena.navigation.model.NavigationNodeId;
import org.eclipse.riena.navigation.model.SubModuleNode;
import org.eclipse.riena.navigation.ui.controllers.SubApplicationController;
import org.eclipse.riena.navigation.ui.controllers.SubModuleController;
-import org.eclipse.riena.navigation.ui.swt.presentation.SwtPresentationManagerAccessor;
import org.eclipse.riena.ui.ridgets.IActionListener;
import org.eclipse.riena.ui.ridgets.IActionRidget;
@@ -210,8 +209,8 @@ public class NavigationSubModuleController extends SubModuleController {
*/
private ISubModuleNode createSubModuleNode(String label) {
- ISubModuleNode newSubModuleNode = new SubModuleNode(label);
- SwtPresentationManagerAccessor.getManager().present(newSubModuleNode, NavigationSubModuleView.ID);
+ SubModuleNode newSubModuleNode = new SubModuleNode(label);
+ newSubModuleNode.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.navigation"));
return newSubModuleNode;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java
index 08de496..1c5f210 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/ComboAndListNodeBuilder.java
@@ -25,15 +25,15 @@ public class ComboAndListNodeBuilder implements INavigationNodeBuilder {
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode()
*/
public IModuleGroupNode buildNode(INavigationNodeId presentationId) {
- ModuleGroupNode node = new ModuleGroupNode("Combo&List");
+ ModuleGroupNode node = new ModuleGroupNode("Combo&List"); //$NON-NLS-1$
node.setPresentationId(presentationId);
- IModuleNode module = new ModuleNode("Combo&List");
+ IModuleNode module = new ModuleNode("Combo&List"); //$NON-NLS-1$
node.addChild(module);
- SubModuleNode subModule = new SubModuleNode("Combo");
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.combo"));
+ SubModuleNode subModule = new SubModuleNode("Combo"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.combo")); //$NON-NLS-1$
module.addChild(subModule);
- subModule = new SubModuleNode("List");
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.list"));
+ subModule = new SubModuleNode("List"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.list")); //$NON-NLS-1$
module.addChild(subModule);
return node;
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java
index fbba766..f8463c9 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigateNodeBuilder.java
@@ -11,46 +11,31 @@
package org.eclipse.riena.example.client.navigation.model;
import org.eclipse.riena.example.client.application.IExampleIcons;
-import org.eclipse.riena.internal.example.client.Activator;
import org.eclipse.riena.navigation.INavigationNode;
-import org.eclipse.riena.navigation.INavigationNodeBuilder;
import org.eclipse.riena.navigation.INavigationNodeId;
import org.eclipse.riena.navigation.model.ModuleGroupNode;
import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
import org.eclipse.riena.navigation.model.SubModuleNode;
-import org.osgi.framework.Bundle;
/**
*
*/
-public class NavigateNodeBuilder implements INavigationNodeBuilder {
+public class NavigateNodeBuilder extends NavigationNodeBuilder {
/**
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode(org.eclipse.riena.navigation.INavigationNodeId)
*/
public INavigationNode<?> buildNode(INavigationNodeId INavigationNodeId) {
- ModuleGroupNode moduleGroup = new ModuleGroupNode("Navigate");
+ ModuleGroupNode moduleGroup = new ModuleGroupNode("Navigate"); //$NON-NLS-1$
moduleGroup.setPresentWithSingleModule(false);
- ModuleNode module = new ModuleNode("Navigate");
+ ModuleNode module = new ModuleNode("Navigate"); //$NON-NLS-1$
module.setIcon(createIconPath(IExampleIcons.ICON_GREEN_LED));
moduleGroup.addChild(module);
- SubModuleNode subModule = new SubModuleNode("Navigate");
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.navigate.form"));
+ SubModuleNode subModule = new SubModuleNode("Navigate"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.navigate.form")); //$NON-NLS-1$
module.addChild(subModule);
return moduleGroup;
}
- protected String createIconPath(String subPath) {
- Bundle bundle = Activator.getDefault().getBundle();
-
- if (bundle == null) {
- return null;
- }
- StringBuilder builder = new StringBuilder(bundle.getSymbolicName());
- builder.append(":"); //$NON-NLS-1$
- builder.append(subPath);
- return builder.toString();
- }
-
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationNodeBuilder.java
new file mode 100644
index 0000000..5c71f8d
--- /dev/null
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationNodeBuilder.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.example.client.navigation.model;
+
+import org.eclipse.riena.internal.example.client.Activator;
+import org.eclipse.riena.navigation.INavigationNodeBuilder;
+import org.osgi.framework.Bundle;
+
+public abstract class NavigationNodeBuilder implements INavigationNodeBuilder {
+
+ protected String createIconPath(String subPath) {
+ Bundle bundle = Activator.getDefault().getBundle();
+
+ if (bundle == null) {
+ return null;
+ }
+ StringBuilder builder = new StringBuilder(bundle.getSymbolicName());
+ builder.append(":"); //$NON-NLS-1$
+ builder.append(subPath);
+ return builder.toString();
+ }
+
+}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java
new file mode 100644
index 0000000..0bdb59e
--- /dev/null
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/NavigationSubApplicationNodeBuilder.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.example.client.navigation.model;
+
+import org.eclipse.riena.example.client.application.IExampleIcons;
+import org.eclipse.riena.navigation.IModuleGroupNode;
+import org.eclipse.riena.navigation.IModuleNode;
+import org.eclipse.riena.navigation.INavigationNode;
+import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.model.ModuleGroupNode;
+import org.eclipse.riena.navigation.model.ModuleNode;
+import org.eclipse.riena.navigation.model.NavigationNodeId;
+import org.eclipse.riena.navigation.model.SubApplicationNode;
+import org.eclipse.riena.navigation.model.SubModuleNode;
+import org.eclipse.riena.navigation.ui.swt.presentation.SwtPresentationManager;
+import org.eclipse.riena.navigation.ui.swt.presentation.SwtPresentationManagerAccessor;
+
+public class NavigationSubApplicationNodeBuilder extends NavigationNodeBuilder {
+
+ /**
+ * @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode(org.eclipse.riena.navigation.INavigationNodeId)
+ */
+ public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
+ SwtPresentationManager presentation = SwtPresentationManagerAccessor.getManager();
+
+ SubApplicationNode subApplication = new SubApplicationNode("Navigation"); //$NON-NLS-1$
+ subApplication.setPresentationId(navigationNodeId);
+ subApplication.setIcon(createIconPath(IExampleIcons.ICON_APPLICATION));
+ presentation.present(subApplication, "subapplication.1"); //$NON-NLS-1$
+ subApplication.setSelected(true);
+
+ IModuleGroupNode moduleGroup = new ModuleGroupNode("Group 1.1"); //$NON-NLS-1$
+ subApplication.addChild(moduleGroup);
+ IModuleNode module = new ModuleNode("Module 1.1.1"); //$NON-NLS-1$
+ module.setIcon(createIconPath(IExampleIcons.ICON_APPLICATION));
+ moduleGroup.addChild(module);
+ SubModuleNode subModule = new SubModuleNode("SubModule 1.1.1.1"); //$NON-NLS-1$
+ subModule.setIcon(createIconPath(IExampleIcons.ICON_FILE));
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ module.addChild(subModule);
+
+ SubModuleNode subModule2 = new SubModuleNode("SubModule 1.1.1.1"); //$NON-NLS-1$
+ subModule2.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ subModule.addChild(subModule2);
+
+ subModule = new SubModuleNode("SubModule 1.1.1.2"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ module.addChild(subModule);
+ module = new ModuleNode("Module 1.1.2 (closeable)"); //$NON-NLS-1$
+ module.setIcon(createIconPath(IExampleIcons.ICON_HOMEFOLDER));
+ moduleGroup.addChild(module);
+ subModule = new SubModuleNode("SubModule 1.1.2.1"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ module.addChild(subModule);
+ /* NEW */
+ subModule = new SubModuleNode("Navigation"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.navigation")); //$NON-NLS-1$
+ module.addChild(subModule);
+
+ moduleGroup = new ModuleGroupNode("Group 1.2"); //$NON-NLS-1$
+ moduleGroup.setPresentWithSingleModule(false);
+ subApplication.addChild(moduleGroup);
+ module = new ModuleNode("Module 1.2.1 (not closeable)"); //$NON-NLS-1$
+ module.setCloseable(false);
+ module.setIcon(createIconPath(IExampleIcons.ICON_RED_LED));
+ moduleGroup.addChild(module);
+ subModule = new SubModuleNode("SubModule 1.2.1.1"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ module.addChild(subModule);
+ subModule = new SubModuleNode("SubModule 1.2.1.2"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.customerDetail")); //$NON-NLS-1$
+ module.addChild(subModule);
+
+ return subApplication;
+ }
+
+}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java
index 4f120de..507c8a9 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/PlaygroundNodeBuilder.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.riena.example.client.navigation.model;
-import org.eclipse.riena.navigation.IModuleGroupNode;
import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.INavigationNodeBuilder;
@@ -28,59 +27,60 @@ public class PlaygroundNodeBuilder implements INavigationNodeBuilder {
/**
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode(org.eclipse.riena.navigation.INavigationNodeId)
*/
- public INavigationNode<?> buildNode(INavigationNodeId INavigationNodeId) {
+ public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
- IModuleGroupNode moduleGroup = new ModuleGroupNode("Playground"); //$NON-NLS-1$
+ ModuleGroupNode moduleGroup = new ModuleGroupNode("Playground"); //$NON-NLS-1$
+ moduleGroup.setPresentationId(navigationNodeId);
IModuleNode playgroundModule = new ModuleNode("Playground"); //$NON-NLS-1$
moduleGroup.addChild(playgroundModule);
SubModuleNode buttonsSubModule = new SubModuleNode("Buttons"); //$NON-NLS-1$
- buttonsSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.buttons"));
+ buttonsSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.buttons")); //$NON-NLS-1$
playgroundModule.addChild(buttonsSubModule);
SubModuleNode comboSubModule = new SubModuleNode("Combo"); //$NON-NLS-1$
- comboSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.combo"));
+ comboSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.combo")); //$NON-NLS-1$
playgroundModule.addChild(comboSubModule);
SubModuleNode listSubModule = new SubModuleNode("List"); //$NON-NLS-1$
- listSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.list"));
+ listSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.list")); //$NON-NLS-1$
playgroundModule.addChild(listSubModule);
SubModuleNode textSubModule = new SubModuleNode("Text"); //$NON-NLS-1$
- textSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.text"));
+ textSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.text")); //$NON-NLS-1$
playgroundModule.addChild(textSubModule);
SubModuleNode markerSubModule = new SubModuleNode("Marker"); //$NON-NLS-1$
- markerSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.marker"));
+ markerSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.marker")); //$NON-NLS-1$
playgroundModule.addChild(markerSubModule);
SubModuleNode focusableSubModule = new SubModuleNode("Focusable"); //$NON-NLS-1$
- focusableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.focusable"));
+ focusableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.focusable")); //$NON-NLS-1$
playgroundModule.addChild(focusableSubModule);
SubModuleNode validationSubModule = new SubModuleNode("Validation"); //$NON-NLS-1$
- validationSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.validation"));
+ validationSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.validation")); //$NON-NLS-1$
playgroundModule.addChild(validationSubModule);
SubModuleNode treeSubModule = new SubModuleNode("Tree"); //$NON-NLS-1$
- treeSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.tree"));
+ treeSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.tree")); //$NON-NLS-1$
playgroundModule.addChild(treeSubModule);
SubModuleNode treeTableSubModule = new SubModuleNode("Tree Table"); //$NON-NLS-1$
- treeTableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.treeTable"));
+ treeTableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.treeTable")); //$NON-NLS-1$
playgroundModule.addChild(treeTableSubModule);
- SubModuleNode tableSubModule = new SubModuleNode("Table");
- tableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.table"));
+ SubModuleNode tableSubModule = new SubModuleNode("Table"); //$NON-NLS-1$
+ tableSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.table")); //$NON-NLS-1$
playgroundModule.addChild(tableSubModule);
SubModuleNode systemPropertiesSubModule = new SubModuleNode("System Properties"); //$NON-NLS-1$
- systemPropertiesSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.systemProperties"));
+ systemPropertiesSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.systemProperties")); //$NON-NLS-1$
playgroundModule.addChild(systemPropertiesSubModule);
SubModuleNode statusLineSubModule = new SubModuleNode("Statusline"); //$NON-NLS-1$
- statusLineSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.statusLine"));
+ statusLineSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.statusLine")); //$NON-NLS-1$
playgroundModule.addChild(statusLineSubModule);
return moduleGroup;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java
new file mode 100644
index 0000000..9e71abf
--- /dev/null
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/SharedViewsNodeBuilder.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.example.client.navigation.model;
+
+import org.eclipse.riena.example.client.application.IExampleIcons;
+import org.eclipse.riena.navigation.IModuleNode;
+import org.eclipse.riena.navigation.INavigationNode;
+import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.model.ModuleGroupNode;
+import org.eclipse.riena.navigation.model.ModuleNode;
+import org.eclipse.riena.navigation.model.NavigationNodeId;
+import org.eclipse.riena.navigation.model.SubModuleNode;
+
+public class SharedViewsNodeBuilder extends NavigationNodeBuilder {
+
+ /**
+ * @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode(org.eclipse.riena.navigation.INavigationNodeId)
+ */
+ public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
+ ModuleGroupNode moduleGroup = new ModuleGroupNode("Shared View Demo"); //$NON-NLS-1$
+ moduleGroup.setPresentationId(navigationNodeId);
+
+ IModuleNode sharedViewModule = new ModuleNode("Shared View Demo"); //$NON-NLS-1$
+ sharedViewModule.setIcon(createIconPath(IExampleIcons.ICON_SAMPLE));
+ moduleGroup.addChild(sharedViewModule);
+
+ SubModuleNode sharedViewSm1 = new SubModuleNode("Node 1"); //$NON-NLS-1$
+ sharedViewSm1.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.sharedView")); //$NON-NLS-1$
+ sharedViewModule.addChild(sharedViewSm1);
+
+ SubModuleNode sharedViewSm2 = new SubModuleNode("Node 2"); //$NON-NLS-1$
+ sharedViewSm2.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.sharedView")); //$NON-NLS-1$
+ sharedViewModule.addChild(sharedViewSm2);
+ return moduleGroup;
+ }
+
+}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java
index 372a458..a306b8c 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/TableTextAndTreeNodeBuilder.java
@@ -25,18 +25,18 @@ public class TableTextAndTreeNodeBuilder implements INavigationNodeBuilder {
* @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode()
*/
public IModuleGroupNode buildNode(INavigationNodeId presentationId) {
- ModuleGroupNode node = new ModuleGroupNode("Table,Text&Tree");
+ ModuleGroupNode node = new ModuleGroupNode("Table,Text&Tree"); //$NON-NLS-1$
node.setPresentationId(presentationId);
- IModuleNode module = new ModuleNode("Table,Text&Tree");
+ IModuleNode module = new ModuleNode("Table,Text&Tree"); //$NON-NLS-1$
node.addChild(module);
- SubModuleNode subModule = new SubModuleNode("Table");
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.table"));
+ SubModuleNode subModule = new SubModuleNode("Table"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.table")); //$NON-NLS-1$
module.addChild(subModule);
- subModule = new SubModuleNode("Text");
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.text"));
+ subModule = new SubModuleNode("Text"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.text")); //$NON-NLS-1$
module.addChild(subModule);
- subModule = new SubModuleNode("Tree");
- subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.tree"));
+ subModule = new SubModuleNode("Tree"); //$NON-NLS-1$
+ subModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.tree")); //$NON-NLS-1$
module.addChild(subModule);
return node;
}
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java
new file mode 100644
index 0000000..c4b1551
--- /dev/null
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/navigation/model/UIProcessNodeBuilder.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.example.client.navigation.model;
+
+import org.eclipse.riena.navigation.IModuleNode;
+import org.eclipse.riena.navigation.INavigationNode;
+import org.eclipse.riena.navigation.INavigationNodeBuilder;
+import org.eclipse.riena.navigation.INavigationNodeId;
+import org.eclipse.riena.navigation.model.ModuleGroupNode;
+import org.eclipse.riena.navigation.model.ModuleNode;
+import org.eclipse.riena.navigation.model.NavigationNodeId;
+import org.eclipse.riena.navigation.model.SubModuleNode;
+
+/**
+ *
+ */
+public class UIProcessNodeBuilder implements INavigationNodeBuilder {
+
+ /**
+ * @see org.eclipse.riena.navigation.INavigationNodeBuilder#buildNode(org.eclipse.riena.navigation.INavigationNodeId)
+ */
+ public INavigationNode<?> buildNode(INavigationNodeId navigationNodeId) {
+ ModuleGroupNode moduleGroup = new ModuleGroupNode("UIProcess"); //$NON-NLS-1$
+ moduleGroup.setPresentationId(navigationNodeId);
+
+ IModuleNode uiProcessModule = new ModuleNode("UIProcess"); //$NON-NLS-1$
+ moduleGroup.addChild(uiProcessModule);
+
+ SubModuleNode uiPSubModule = new SubModuleNode("Demo1"); //$NON-NLS-1$
+ uiPSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.uiProcess")); //$NON-NLS-1$
+ uiProcessModule.addChild(uiPSubModule);
+
+ uiPSubModule = new SubModuleNode("Demo2"); //$NON-NLS-1$
+ uiPSubModule.setPresentationId(new NavigationNodeId("org.eclipse.riena.example.uiProcess")); //$NON-NLS-1$
+ uiProcessModule.addChild(uiPSubModule);
+ return moduleGroup;
+ }
+
+}
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeBuilder.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeBuilder.java
index 8661f0f..c72304e 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeBuilder.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/INavigationNodeBuilder.java
@@ -18,6 +18,6 @@ package org.eclipse.riena.navigation;
*/
public interface INavigationNodeBuilder {
- INavigationNode<?> buildNode(INavigationNodeId INavigationNodeId);
+ INavigationNode<?> buildNode(INavigationNodeId navigationNodeId);
}