summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-07-28 07:20:58 (EDT)
committerCarsten Drossel2008-07-28 07:20:58 (EDT)
commite18d0ca62baa48749dcf3016abd2c51bc41e00bc (patch)
tree3f80a6f4a8ef703250bdb7005479a2b9c3461aba
parent891e261db8e542927ffefb19011ec3a85a61e65b (diff)
downloadorg.eclipse.riena-e18d0ca62baa48749dcf3016abd2c51bc41e00bc.zip
org.eclipse.riena-e18d0ca62baa48749dcf3016abd2c51bc41e00bc.tar.gz
org.eclipse.riena-e18d0ca62baa48749dcf3016abd2c51bc41e00bc.tar.bz2
extended navigation concept - merging results from branch
-rw-r--r--org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java5
-rw-r--r--org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/NavigationNodeViewController.java17
-rw-r--r--org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/SubModuleNodeViewController.java12
3 files changed, 29 insertions, 5 deletions
diff --git a/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java b/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java
index f77d51e..7e364f2 100644
--- a/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java
+++ b/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/application/AbstractApplication.java
@@ -21,6 +21,7 @@ import org.eclipse.riena.navigation.INavigationNode;
import org.eclipse.riena.navigation.ISubApplication;
import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ApplicationModel;
+import org.eclipse.riena.navigation.model.NavigationNodeId;
import org.eclipse.riena.ui.core.resource.IIconManager;
import org.eclipse.riena.ui.core.uiprocess.ProgressProviderBridge;
@@ -49,7 +50,9 @@ public abstract class AbstractApplication implements IApplication {
* model
*/
protected IApplicationModel createModel() {
- return new ApplicationModel();
+ ApplicationModel applicationModel = new ApplicationModel();
+ applicationModel.setPresentationId(new NavigationNodeId("application"));
+ return applicationModel;
}
protected void initializeModel(IApplicationModel model) {
diff --git a/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/NavigationNodeViewController.java b/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/NavigationNodeViewController.java
index f825b5e..c89f153 100644
--- a/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/NavigationNodeViewController.java
+++ b/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/NavigationNodeViewController.java
@@ -44,6 +44,14 @@ public abstract class NavigationNodeViewController<N extends INavigationNode<?>>
private PropertyChangeListener propertyChangeListener;
/**
+ * Create a new Navigation Node view Controller. Set the navigation node
+ * later.
+ */
+ public NavigationNodeViewController() {
+ this(null);
+ }
+
+ /**
* Create a new Navigation Node view Controller on the specified
* navigationNode. Register this controller as the presentation of the
* Navigation node.
@@ -53,12 +61,12 @@ public abstract class NavigationNodeViewController<N extends INavigationNode<?>>
*/
public NavigationNodeViewController(N navigationNode) {
- super();
-
ridgets = new HashMap<String, IRidget>();
propertyChangeListener = new PropertyChangeHandler();
- setNavigationNode(navigationNode);
- navigationNode.setPresentation(this);
+
+ if (navigationNode != null) {
+ setNavigationNode(navigationNode);
+ }
}
/**
@@ -74,6 +82,7 @@ public abstract class NavigationNodeViewController<N extends INavigationNode<?>>
*/
public void setNavigationNode(N navigationNode) {
this.navigationNode = navigationNode;
+ navigationNode.setPresentation(this);
}
/**
diff --git a/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/SubModuleNodeViewController.java b/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/SubModuleNodeViewController.java
index 6821b7b..3a2b393 100644
--- a/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/SubModuleNodeViewController.java
+++ b/org.eclipse.riena.navigation.ui/src/org/eclipse/riena/navigation/ui/controllers/SubModuleNodeViewController.java
@@ -31,6 +31,18 @@ public class SubModuleNodeViewController extends NavigationNodeViewController<IS
public SubModuleNodeViewController(ISubModuleNode navigationNode) {
super(navigationNode);
+ }
+
+ public SubModuleNodeViewController() {
+ this(null);
+ }
+
+ /**
+ * @see org.eclipse.riena.navigation.ui.controllers.NavigationNodeViewController#setNavigationNode(org.eclipse.riena.navigation.INavigationNode)
+ */
+ @Override
+ public void setNavigationNode(ISubModuleNode navigationNode) {
+ super.setNavigationNode(navigationNode);
getNavigationNode().addListener(new SubModuleNodeAdapter() {