-
Notifications
You must be signed in to change notification settings - Fork 96
/
CompoundViewPortHandler.java
107 lines (88 loc) · 2.4 KB
/
CompoundViewPortHandler.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*******************************************************************************
* Copyright (c) 2013 Dirk Fauth and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Dirk Fauth <dirk.fauth@gmail.com> - initial API and implementation
* ziogiannigmail.com - Bug 464509 - Minute View Implementation
*******************************************************************************/
package org.eclipse.nebula.widgets.ganttchart;
import java.util.ArrayList;
import java.util.List;
public class CompoundViewPortHandler implements IViewPortHandler2 {
private List<IViewPortHandler> handler = new ArrayList<IViewPortHandler>();
public void addHandler(IViewPortHandler handler) {
this.handler.add(handler);
}
public void removeHandler(IViewPortHandler handler) {
this.handler.remove(handler);
}
public void scrollingLeft(int diffCount) {
for (IViewPortHandler vph : this.handler) {
vph.scrollingLeft(diffCount);
}
}
public void scrollingRight(int diffCount) {
for (IViewPortHandler vph : this.handler) {
vph.scrollingRight(diffCount);
}
}
public void nextMonth() {
for (IViewPortHandler vph : this.handler) {
vph.nextMonth();
}
}
public void prevMonth() {
for (IViewPortHandler vph : this.handler) {
vph.prevMonth();
}
}
public void nextWeek() {
for (IViewPortHandler vph : this.handler) {
vph.nextWeek();
}
}
public void prevWeek() {
for (IViewPortHandler vph : this.handler) {
vph.prevWeek();
}
}
public void nextHour() {
for (IViewPortHandler vph : this.handler) {
vph.nextHour();
}
}
public void prevHour() {
for (IViewPortHandler vph : this.handler) {
vph.prevHour();
}
}
public void nextMinute() {
for (IViewPortHandler vph : this.handler) {
if(vph instanceof IViewPortHandler2)
((IViewPortHandler2) vph).nextMinute();
}
}
public void prevMinute() {
for (IViewPortHandler vph : this.handler) {
if(vph instanceof IViewPortHandler2)
((IViewPortHandler2) vph).prevMinute();
}
}
public void nextDay() {
for (IViewPortHandler vph : this.handler) {
vph.nextDay();
}
}
public void prevDay() {
for (IViewPortHandler vph : this.handler) {
vph.prevDay();
}
}
}