summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2010-10-12 03:39:32 (EDT)
committerSteffen Kriese2010-10-12 03:39:32 (EDT)
commitcfb5900edf16ce60ea5796c49d89fb7c3b48a64b (patch)
tree9a99501a0085ae12b9176e0eb0fa0955f560feb7
parent9561bf58f77c4b35b5c6c15573c6cc04d528226a (diff)
downloadorg.eclipse.riena-cfb5900edf16ce60ea5796c49d89fb7c3b48a64b.zip
org.eclipse.riena-cfb5900edf16ce60ea5796c49d89fb7c3b48a64b.tar.gz
org.eclipse.riena-cfb5900edf16ce60ea5796c49d89fb7c3b48a64b.tar.bz2
Applied patch #326645 ROR: ModuleView needs double click
-rw-r--r--org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleNavigationListener.java16
-rw-r--r--org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleView.java2
-rw-r--r--org.eclipse.riena.ui.swt.rcp/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java8
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java9
5 files changed, 28 insertions, 8 deletions
diff --git a/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleNavigationListener.java b/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleNavigationListener.java
index 1cfbfb3..523b633 100644
--- a/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleNavigationListener.java
+++ b/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleNavigationListener.java
@@ -52,7 +52,7 @@ import org.eclipse.riena.navigation.model.SubModuleNode;
* {@link NavigationProcessor}. Moving over such a node is not problem anymore,
* since the activation is only triggered after a delay - not instantly.
*/
-class ModuleNavigationListener extends SelectionAdapter implements KeyListener, FocusListener {
+public class ModuleNavigationListener extends SelectionAdapter implements KeyListener, FocusListener {
/** Keycode for 'arrow down' (16777218) */
private static final int KC_ARROW_DOWN = 16777218;
@@ -66,7 +66,7 @@ class ModuleNavigationListener extends SelectionAdapter implements KeyListener,
private boolean isFirst;
private boolean isLast;
- ModuleNavigationListener(final Tree moduleTree) {
+ public ModuleNavigationListener(final Tree moduleTree) {
moduleTree.addKeyListener(this);
moduleTree.addSelectionListener(this);
moduleTree.addFocusListener(this);
@@ -253,18 +253,22 @@ class ModuleNavigationListener extends SelectionAdapter implements KeyListener,
private void startSwitch(final TreeItem item) {
cancelSwitch();
if (item != null) {
- nodeSwitcher = new NodeSwitcher(item.getDisplay(), (INavigationNode<?>) item.getData());
+ nodeSwitcher = createNodeSwitcher(item);
nodeSwitcher.start();
}
}
+ protected NodeSwitcher createNodeSwitcher(final TreeItem item) {
+ return new NodeSwitcher(item.getDisplay(), (INavigationNode<?>) item.getData());
+ }
+
// helping classes
//////////////////
/**
* Activates a navigation node after a timeout. Can be cancelled.
*/
- private final static class NodeSwitcher extends Thread {
+ protected static class NodeSwitcher extends Thread {
/**
* Wait this long (ms) before activating a node.
@@ -272,11 +276,11 @@ class ModuleNavigationListener extends SelectionAdapter implements KeyListener,
private static final int TIMEOUT_MS = RAPDetector.isRAPavailable() ? 50 : 300;
private final INavigationNode<?> node;
- private final Display display;
+ protected final Display display;
private volatile boolean isCancelled;
- NodeSwitcher(final Display display, final INavigationNode<?> node) {
+ protected NodeSwitcher(final Display display, final INavigationNode<?> node) {
this.display = display;
this.node = node;
}
diff --git a/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleView.java b/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleView.java
index df5629c..00d6d8e 100644
--- a/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleView.java
+++ b/org.eclipse.riena.navigation.ui.swt/src/org/eclipse/riena/navigation/ui/swt/views/ModuleView.java
@@ -462,7 +462,7 @@ public class ModuleView implements INavigationNodeView<ModuleNode> {
};
SWTFacade.getDefault().addPaintItemListener(getTree(), paintItemListener);
- new ModuleNavigationListener(getTree());
+ SWTFacade.getDefault().attachModuleNavigationListener(getTree());
}
private void blockView(final boolean block) {
diff --git a/org.eclipse.riena.ui.swt.rcp/META-INF/MANIFEST.MF b/org.eclipse.riena.ui.swt.rcp/META-INF/MANIFEST.MF
index 3f3ec70..e3cef3a 100644
--- a/org.eclipse.riena.ui.swt.rcp/META-INF/MANIFEST.MF
+++ b/org.eclipse.riena.ui.swt.rcp/META-INF/MANIFEST.MF
@@ -6,6 +6,7 @@ Bundle-Version: 3.0.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.riena.ui.swt,
+ org.eclipse.riena.navigation.ui.swt,
org.pushingpixels.trident
Eclipse-RegisterBuddy: org.eclipse.riena.ui.swt
Export-Package: org.eclipse.riena.ui.swt.facades.internal;x-friends:="org.eclipse.riena.tests"
diff --git a/org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java b/org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java
index 03789b4..2a0c33d 100644
--- a/org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java
+++ b/org.eclipse.riena.ui.swt.rcp/src/org/eclipse/riena/ui/swt/facades/SWTFacadeRCP.java
@@ -29,15 +29,16 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Tree;
+import org.eclipse.riena.navigation.ui.swt.views.ModuleNavigationListener;
import org.eclipse.riena.ui.swt.CompletionCombo;
import org.eclipse.riena.ui.swt.EmbeddedTitleBar;
import org.eclipse.riena.ui.swt.InfoFlyout;
import org.eclipse.riena.ui.swt.facades.internal.CompletionComboRCP;
import org.eclipse.riena.ui.swt.facades.internal.CompletionComboWithImageRCP;
import org.eclipse.riena.ui.swt.facades.internal.DisabledPainter;
+import org.eclipse.riena.ui.swt.facades.internal.EmbeddedTitleBarToolTip;
import org.eclipse.riena.ui.swt.facades.internal.GrabCornerListenerWithTracker;
import org.eclipse.riena.ui.swt.facades.internal.InfoFlyoutRCP;
-import org.eclipse.riena.ui.swt.facades.internal.EmbeddedTitleBarToolTip;
import org.eclipse.riena.ui.swt.facades.internal.SubModuleToolTip;
import org.eclipse.riena.ui.swt.facades.internal.TreeItemEraserAndPainter;
@@ -96,6 +97,11 @@ public final class SWTFacadeRCP extends SWTFacade {
}
@Override
+ public void attachModuleNavigationListener(final Tree tree) {
+ new ModuleNavigationListener(tree);
+ }
+
+ @Override
public CompletionCombo createCompletionCombo(final Composite parent, final int style) {
return new CompletionComboRCP(parent, style);
}
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java
index dd32844..63cf2c9 100644
--- a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/facades/SWTFacade.java
@@ -315,6 +315,15 @@ public abstract class SWTFacade {
public abstract void addPaintListener(Control control, EventListener listener);
/**
+ * Attaches a platform specific {@link ModuleNavigationListener} instance to
+ * the given tree
+ *
+ * @param tree
+ * a {@link Tree} instance; never null
+ */
+ public abstract void attachModuleNavigationListener(Tree tree);
+
+ /**
* Copies the value of the {@code keyLocation} field from the source Event
* to the target Event.
*