aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2013-07-25 10:59:09 (EDT)
committerDirk Fauth2013-07-25 10:59:09 (EDT)
commit1ffec0314e1737879c63738abaf94bf7c468869b (patch)
tree5d38379fe1bf6431c3b331400e76132cd8533058
parent085887e6241ed580e4d67ea103e6200113ca783f (diff)
downloadorg.eclipse.nebula-1ffec0314e1737879c63738abaf94bf7c468869b.zip
org.eclipse.nebula-1ffec0314e1737879c63738abaf94bf7c468869b.tar.gz
org.eclipse.nebula-1ffec0314e1737879c63738abaf94bf7c468869b.tar.bz2
Bug 413744 - Add the possibility to configure that all selected events
should be dragged without holding the SHIFT key pressed.
-rw-r--r--widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractSettings.java4
-rw-r--r--widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java3
-rw-r--r--widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/ISettings.java11
3 files changed, 17 insertions, 1 deletions
diff --git a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractSettings.java b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractSettings.java
index 97a37ea..084bf53 100644
--- a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractSettings.java
+++ b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/AbstractSettings.java
@@ -530,4 +530,8 @@ public abstract class AbstractSettings implements ISettings {
public boolean drawEventString() {
return true;
}
+
+ public boolean alwaysDragAllEvents() {
+ return false;
+ }
}
diff --git a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
index ba2db54..45648a6 100644
--- a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
+++ b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/GanttComposite.java
@@ -7469,7 +7469,8 @@ public final class GanttComposite extends Canvas implements MouseListener, Mouse
List toMove = new ArrayList();
// multi move
- if ((stateMask & _settings.getDragAllModifierKey()) != 0 && _settings.moveLinkedEventsWhenEventsAreMoved()) {
+ if (((stateMask & _settings.getDragAllModifierKey()) != 0 && _settings.moveLinkedEventsWhenEventsAreMoved())
+ || _settings.alwaysDragAllEvents()) {
List conns = getEventsDependingOn(ge);
List translated = new ArrayList();
diff --git a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/ISettings.java b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/ISettings.java
index 041a5ba..62c21d4 100644
--- a/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/ISettings.java
+++ b/widgets/ganttchart/org.eclipse.nebula.widgets.ganttchart/src/org/eclipse/nebula/widgets/ganttchart/ISettings.java
@@ -1108,4 +1108,15 @@ public interface ISettings {
public boolean shiftHorizontalCenteredEventString();
public boolean drawEventString();
+
+ /**
+ * The default behaviour in GanttChart on moving an event is that only the current dragged
+ * event is moved unless you press the SHIFT key. If there are more events selected, still
+ * only the dragged one is moved if the SHIFT key is not pressed.
+ * With this configuration it is possible to specify if the old default behavior should be
+ * used or if all currently selected events should be moved even if the SHIFT key is not pressed.
+ * @return <code>true</code> if all selected events should be moved by dragging on of them
+ * <code>false</code> if only the current dragged event should be moved.
+ */
+ public boolean alwaysDragAllEvents();
}