Révision 2421

tmp/org.txm.backtomedia.rcp/src/uk/co/caprica/vlcj/factory/swt/SwtMediaPlayerFactory.java (revision 2421)
1
/*
2
 * This file is part of VLCJ.
3
 *
4
 * VLCJ is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation, either version 3 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * VLCJ is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with VLCJ.  If not, see <http://www.gnu.org/licenses/>.
16
 *
17
 * Copyright 2009-2019 Caprica Software Limited.
18
 */
19

  
20
package uk.co.caprica.vlcj.factory.swt;
21

  
22
import uk.co.caprica.vlcj.factory.discovery.NativeDiscovery;
23
import uk.co.caprica.vlcj.factory.MediaPlayerFactory;
24

  
25
import java.util.Collection;
26

  
27
// FIXME should we build an SwtEmbeddedMediaPlayerComponent that extends Composite, similar to how we extend JPanel for SWT?
28

  
29
/**
30
 * Extension to the default {@link MediaPlayerFactory} that provides SWT components.
31
 */
32
public class SwtMediaPlayerFactory extends MediaPlayerFactory {
33
	
34
	private final SwtApi swtApi;
35
	
36
	public SwtMediaPlayerFactory(NativeDiscovery discovery, String... libvlcArgs) {
37
		super(discovery, libvlcArgs);
38
		
39
		this.swtApi = new SwtApi(this);
40
	}
41
	
42
	public SwtMediaPlayerFactory(String... libvlcArgs) {
43
		this(null, libvlcArgs);
44
	}
45
	
46
	public SwtMediaPlayerFactory(NativeDiscovery discovery, Collection<String> libvlcArgs) {
47
		this(discovery, libvlcArgs.toArray(new String[libvlcArgs.size()]));
48
	}
49
	
50
	public SwtMediaPlayerFactory(Collection<String> libvlcArgs) {
51
		this(null, libvlcArgs.toArray(new String[libvlcArgs.size()]));
52
	}
53
	
54
	/**
55
	 *
56
	 *
57
	 * @return
58
	 */
59
	public final SwtApi swt() {
60
		return swtApi;
61
	}
62
	
63
	@Override
64
	public void onBeforeRelease() {
65
		swtApi.release();
66
	}
67
	
68
}
0 69

  
tmp/org.txm.backtomedia.rcp/src/uk/co/caprica/vlcj/factory/swt/BaseApi.java (revision 2421)
1
/*
2
 * This file is part of VLCJ.
3
 *
4
 * VLCJ is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation, either version 3 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * VLCJ is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with VLCJ.  If not, see <http://www.gnu.org/licenses/>.
16
 *
17
 * Copyright 2009-2019 Caprica Software Limited.
18
 */
19

  
20
package uk.co.caprica.vlcj.factory.swt;
21

  
22
abstract class BaseApi {
23
	
24
	protected final SwtMediaPlayerFactory factory;
25
	
26
	BaseApi(SwtMediaPlayerFactory factory) {
27
		this.factory = factory;
28
	}
29
	
30
	protected void release() {}
31
	
32
}
0 33

  
tmp/org.txm.backtomedia.rcp/src/uk/co/caprica/vlcj/factory/swt/SwtApi.java (revision 2421)
1
/*
2
 * This file is part of VLCJ.
3
 *
4
 * VLCJ is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation, either version 3 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * VLCJ is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with VLCJ.  If not, see <http://www.gnu.org/licenses/>.
16
 *
17
 * Copyright 2009-2019 Caprica Software Limited.
18
 */
19

  
20
package uk.co.caprica.vlcj.factory.swt;
21

  
22
import org.eclipse.swt.widgets.Composite;
23
import uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurfaceAdapters;
24
import uk.co.caprica.vlcj.player.embedded.videosurface.swt.CompositeVideoSurface;
25

  
26
/**
27
 *
28
 */
29
public final class SwtApi extends BaseApi {
30
	
31
	/**
32
	 *
33
	 *
34
	 * @param mediaPlayerFactory
35
	 */
36
	public SwtApi(SwtMediaPlayerFactory mediaPlayerFactory) {
37
		super(mediaPlayerFactory);
38
	}
39
	
40
	/**
41
	 *
42
	 *
43
	 * @param composite
44
	 * @return
45
	 */
46
	public CompositeVideoSurface newCompositeVideoSurface(Composite composite) {
47
		return new CompositeVideoSurface(composite, VideoSurfaceAdapters.getVideoSurfaceAdapter());
48
	}
49
	
50
}
0 51

  
tmp/org.txm.backtomedia.rcp/src/uk/co/caprica/vlcj/player/embedded/videosurface/swt/CompositeVideoSurface.java (revision 2421)
1
/*
2
 * This file is part of VLCJ.
3
 *
4
 * VLCJ is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation, either version 3 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * VLCJ is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with VLCJ.  If not, see <http://www.gnu.org/licenses/>.
16
 *
17
 * Copyright 2009-2019 Caprica Software Limited.
18
 */
19

  
20
package uk.co.caprica.vlcj.player.embedded.videosurface.swt;
21

  
22
import org.eclipse.swt.widgets.Composite;
23
import uk.co.caprica.vlcj.player.base.MediaPlayer;
24
import uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurface;
25
import uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurfaceAdapter;
26

  
27
/**
28
 * Implementation of a video surface component that uses an SWT Composite.
29
 */
30
public class CompositeVideoSurface extends VideoSurface {
31
	
32
	/**
33
	 *
34
	 */
35
	private final Composite composite;
36
	
37
	/**
38
	 *
39
	 *
40
	 * @param composite
41
	 * @param videoSurfaceAdapter
42
	 */
43
	public CompositeVideoSurface(Composite composite, VideoSurfaceAdapter videoSurfaceAdapter) {
44
		super(videoSurfaceAdapter);
45
		this.composite = composite;
46
	}
47
	
48
	@Override
49
	public void attach(MediaPlayer mediaPlayer) {
50
		videoSurfaceAdapter.attach(mediaPlayer, composite.embeddedHandle);
51
	}
52
}
0 53

  
tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/Application.java (revision 2421)
12 12
public class Application implements IApplication {
13 13
	
14 14
	public static String PLUGIN_ID = "org.txm.backtomedia"; //$NON-NLS-1$
15

  
16
	/* (non-Javadoc)
15
	
16
	/*
17
	 * (non-Javadoc)
17 18
	 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
18 19
	 */
19 20
	public Object start(IApplicationContext context) throws Exception {
......
24 25
				return IApplication.EXIT_RESTART;
25 26
			else
26 27
				return IApplication.EXIT_OK;
27
		} finally {
28
		}
29
		finally {
28 30
			display.dispose();
29 31
		}
30 32
	}
31

  
32
	/* (non-Javadoc)
33
	
34
	/*
35
	 * (non-Javadoc)
33 36
	 * @see org.eclipse.equinox.app.IApplication#stop()
34 37
	 */
35 38
	public void stop() {
......
38 41
		final IWorkbench workbench = PlatformUI.getWorkbench();
39 42
		final Display display = workbench.getDisplay();
40 43
		display.syncExec(new Runnable() {
44
			
41 45
			public void run() {
42 46
				if (!display.isDisposed())
43 47
					workbench.close();
tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/MessagesMP.java (revision 2421)
8 8
	private static final String BUNDLE_NAME = "vlcplayerrcp.messages"; //$NON-NLS-1$
9 9
	
10 10
	public static String BackToMedia_0;
11
	
11 12
	public static String BackToMedia_1;
13
	
12 14
	public static String BackToMedia_11;
15
	
13 16
	public static String BackToMedia_12;
17
	
14 18
	public static String BackToMedia_14;
19
	
15 20
	public static String BackToMedia_16;
21
	
16 22
	public static String BackToMedia_17;
23
	
17 24
	public static String BackToMedia_19;
25
	
18 26
	public static String BackToMedia_25;
27
	
19 28
	public static String BackToMedia_26;
29
	
20 30
	public static String BackToMedia_27;
31
	
21 32
	public static String BackToMedia_29;
33
	
22 34
	public static String BackToMedia_30;
35
	
23 36
	public static String BackToMedia_7;
37
	
24 38
	public static String BackToMediaPreferencePage_1;
39
	
25 40
	public static String BackToMediaPreferencePage_2;
41
	
26 42
	public static String BackToMediaPreferencePage_3;
43
	
27 44
	public static String BackToMediaPreferencePage_4;
45
	
28 46
	public static String BackToMediaPreferencePage_5;
47
	
29 48
	public static String BackToMediaPreferencePage_6;
49
	
30 50
	public static String BackToMediaPreferencePage_7;
51
	
31 52
	public static String cancel;
53
	
32 54
	public static String error_native_libs;
55
	
33 56
	public static String error_open_media;
57
	
34 58
	public static String opening;
59
	
35 60
	public static String opening_media;
61
	
36 62
	public static String pause;
63
	
37 64
	public static String play;
65
	
38 66
	public static String playing;
67
	
39 68
	public static String rate;
69
	
40 70
	public static String repeat;
71
	
41 72
	public static String resume;
73
	
42 74
	public static String select_file;
75
	
43 76
	public static String select_file_title;
77
	
44 78
	public static String select_object;
79
	
45 80
	public static String stop;
81
	
46 82
	public static String time_range;
83
	
47 84
	public static String volume;
48 85
	
49 86
	
50 87
	static {
51 88
		Utf8NLS.initializeMessages(BUNDLE_NAME, MessagesMP.class);
52 89
	}
53

  
90
	
54 91
}
tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/ApplicationWorkbenchWindowAdvisor.java (revision 2421)
7 7
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
8 8

  
9 9
public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
10

  
11
    public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
12
        super(configurer);
13
    }
14

  
15
    public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
16
        return new ApplicationActionBarAdvisor(configurer);
17
    }
18
    
19
    public void preWindowOpen() {
20
        IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
21
        configurer.setInitialSize(new Point(400, 300));
22
        configurer.setShowCoolBar(false);
23
        configurer.setShowStatusLine(false);
24
        configurer.setTitle("Hello RCP"); //$NON-NLS-1$
25
    }
10
	
11
	public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
12
		super(configurer);
13
	}
14
	
15
	public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
16
		return new ApplicationActionBarAdvisor(configurer);
17
	}
18
	
19
	public void preWindowOpen() {
20
		IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
21
		configurer.setInitialSize(new Point(400, 300));
22
		configurer.setShowCoolBar(false);
23
		configurer.setShowStatusLine(false);
24
		configurer.setTitle("Hello RCP"); //$NON-NLS-1$
25
	}
26 26
}
tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/ApplicationActionBarAdvisor.java (revision 2421)
6 6
import org.eclipse.ui.application.IActionBarConfigurer;
7 7

  
8 8
public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
9

  
10
    public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
11
        super(configurer);
12
    }
13

  
14
    protected void makeActions(IWorkbenchWindow window) {
15
    }
16

  
17
    protected void fillMenuBar(IMenuManager menuBar) {
18
    }
19
    
9
	
10
	public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
11
		super(configurer);
12
	}
13
	
14
	protected void makeActions(IWorkbenchWindow window) {}
15
	
16
	protected void fillMenuBar(IMenuManager menuBar) {}
17
	
20 18
}
tmp/org.txm.backtomedia.rcp/src/vlcplayerrcp/ApplicationWorkbenchAdvisor.java (revision 2421)
5 5
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
6 6

  
7 7
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
8

  
8
	
9 9
	private static final String PERSPECTIVE_ID = "WordCloudRCP.perspective"; //$NON-NLS-1$
10

  
11
    public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
12
        return new ApplicationWorkbenchWindowAdvisor(configurer);
13
    }
14

  
10
	
11
	public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
12
		return new ApplicationWorkbenchWindowAdvisor(configurer);
13
	}
14
	
15 15
	public String getInitialWindowPerspectiveId() {
16 16
		return PERSPECTIVE_ID;
17 17
	}
tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/TripleRangeSlider.java (revision 2421)
45 45
 * </p>
46 46
 */
47 47
public class TripleRangeSlider extends Canvas {
48

  
49
	public enum SELECTED_KNOB {NONE, UPPER, LOWER, MIDDLE  };
50

  
48
	
49
	public enum SELECTED_KNOB {
50
		NONE, UPPER, LOWER, MIDDLE
51
	};
52
	
51 53
	private int minimum;
54
	
52 55
	private int maximum;
56
	
53 57
	private int lowerValue;
58
	
54 59
	private int middleValue;
60
	
55 61
	private int upperValue;
62
	
56 63
	private final List<SelectionListener> listeners;
64
	
57 65
	private final Image slider, sliderHover, sliderDrag, sliderSelected;
66
	
58 67
	private final Image vSlider, vSliderHover, vSliderDrag, vSliderSelected;
68
	
59 69
	private int orientation;
70
	
60 71
	private int increment;
72
	
61 73
	private int pageIncrement;
74
	
62 75
	private SELECTED_KNOB lastSelected;
76
	
63 77
	private boolean dragInProgress;
78
	
64 79
	private Point coordUpper;
80
	
65 81
	private boolean upperHover;
82
	
66 83
	private Point coordMiddle;
84
	
67 85
	private boolean middleHover;
86
	
68 87
	private Point coordLower;
88
	
69 89
	private boolean lowerHover;
90
	
70 91
	private int previousUpperValue;
92
	
71 93
	private int previousMiddleValue;
94
	
72 95
	private int previousLowerValue;
73

  
96
	
74 97
	/**
75 98
	 * Constructs a new instance of this class given its parent and a style
76 99
	 * value describing its behavior and appearance.
......
87 110
	 *            instance (cannot be null)
88 111
	 * @param style the style of control to construct
89 112
	 *
90
	 * @exception IllegalArgumentException <ul>
113
	 * @exception IllegalArgumentException
114
	 *                <ul>
91 115
	 *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
92 116
	 *                </ul>
93
	 * @exception SWTException <ul>
117
	 * @exception SWTException
118
	 *                <ul>
94 119
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
95 120
	 *                thread that created the parent</li>
96 121
	 *                </ul>
......
109 134
		this.sliderHover = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/slider-hover.png")); //$NON-NLS-1$
110 135
		this.sliderDrag = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/slider-drag.png")); //$NON-NLS-1$
111 136
		this.sliderSelected = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/slider-selected.png")); //$NON-NLS-1$
112

  
137
		
113 138
		this.vSlider = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/h-slider-normal.png")); //$NON-NLS-1$
114 139
		this.vSliderHover = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/h-slider-hover.png")); //$NON-NLS-1$
115 140
		this.vSliderDrag = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/h-slider-drag.png")); //$NON-NLS-1$
116 141
		this.vSliderSelected = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/h-slider-selected.png")); //$NON-NLS-1$
117

  
142
		
118 143
		if ((style & SWT.VERTICAL) == SWT.VERTICAL) {
119 144
			this.orientation = SWT.VERTICAL;
120
		} else {
145
		}
146
		else {
121 147
			this.orientation = SWT.HORIZONTAL;
122 148
		}
123

  
149
		
124 150
		this.addListener(SWT.Dispose, new Listener() {
151
			
125 152
			@Override
126 153
			public void handleEvent(final Event event) {
127 154
				SWTGraphicUtil.dispose(TripleRangeSlider.this.slider);
128 155
				SWTGraphicUtil.dispose(TripleRangeSlider.this.sliderHover);
129 156
				SWTGraphicUtil.dispose(TripleRangeSlider.this.sliderDrag);
130 157
				SWTGraphicUtil.dispose(TripleRangeSlider.this.sliderSelected);
131

  
158
				
132 159
				SWTGraphicUtil.dispose(TripleRangeSlider.this.vSlider);
133 160
				SWTGraphicUtil.dispose(TripleRangeSlider.this.vSliderHover);
134 161
				SWTGraphicUtil.dispose(TripleRangeSlider.this.vSliderDrag);
135 162
				SWTGraphicUtil.dispose(TripleRangeSlider.this.vSliderSelected);
136 163
			}
137 164
		});
138

  
165
		
139 166
		addMouseListeners();
140 167
		addListener(SWT.KeyDown, new Listener() {
141

  
168
			
142 169
			@Override
143 170
			public void handleEvent(final Event event) {
144 171
				handleKeyDown(event);
145 172
			}
146 173
		});
147 174
		addPaintListener(new PaintListener() {
175
			
148 176
			@Override
149 177
			public void paintControl(final PaintEvent e) {
150 178
				drawWidget(e);
151

  
179
				
152 180
			}
153 181
		});
154

  
182
		
155 183
	}
156

  
184
	
157 185
	/**
158 186
	 * Add the mouse listeners (mouse up, mouse down, mouse move, mouse wheel)
159 187
	 */
160 188
	private void addMouseListeners() {
161 189
		addListener(SWT.MouseDown, new Listener() {
190
			
162 191
			@Override
163 192
			public void handleEvent(final Event e) {
164 193
				handleMouseDown(e);
165 194
			}
166 195
		});
167

  
196
		
168 197
		addListener(SWT.MouseUp, new Listener() {
198
			
169 199
			@Override
170 200
			public void handleEvent(final Event e) {
171 201
				handleMouseUp(e);
172 202
			}
173 203
		});
174

  
204
		
175 205
		addListener(SWT.MouseMove, new Listener() {
206
			
176 207
			@Override
177 208
			public void handleEvent(final Event e) {
178 209
				handleMouseMove(e);
179 210
			}
180 211
		});
181

  
212
		
182 213
		addListener(SWT.MouseWheel, new Listener() {
214
			
183 215
			@Override
184 216
			public void handleEvent(final Event e) {
185 217
				handleMouseWheel(e);
186 218
			}
187 219
		});
188

  
220
		
189 221
	}
190

  
222
	
191 223
	/**
192 224
	 * Code executed when the mouse is down
193 225
	 *
......
199 231
			this.dragInProgress = true;
200 232
			this.lastSelected = SELECTED_KNOB.UPPER;
201 233
			this.previousUpperValue = this.upperValue;
202
		} else if (this.lowerHover) {
234
		}
235
		else if (this.lowerHover) {
203 236
			this.dragInProgress = true;
204 237
			this.lastSelected = SELECTED_KNOB.LOWER;
205 238
			this.previousLowerValue = this.lowerValue;
206
		} else if (this.middleHover) {
239
		}
240
		else if (this.middleHover) {
207 241
			this.dragInProgress = true;
208 242
			this.lastSelected = SELECTED_KNOB.MIDDLE;
209 243
			this.previousMiddleValue = this.middleValue;
210
		} else {
244
		}
245
		else {
211 246
			this.dragInProgress = true;
212
			//this.lastSelected = SELECTED_KNOB.NONE;
247
			// this.lastSelected = SELECTED_KNOB.NONE;
213 248
			this.lastSelected = SELECTED_KNOB.MIDDLE;
214 249
			this.previousMiddleValue = this.middleValue;
215 250
			handleMouseMove(e);
216 251
		}
217
		//System.out.println("MouseDown : "+lastSelected);
252
		// System.out.println("MouseDown : "+lastSelected);
218 253
	}
219

  
254
	
220 255
	/**
221 256
	 * Code executed when the mouse is up
222 257
	 *
......
231 266
			if (this.lastSelected == SELECTED_KNOB.UPPER) {
232 267
				this.upperValue = this.previousUpperValue;
233 268
				if (this.middleValue > this.upperValue) this.middleValue = upperValue;
234
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
269
			}
270
			else if (this.lastSelected == SELECTED_KNOB.LOWER) {
235 271
				this.lowerValue = this.previousLowerValue;
236 272
				if (this.middleValue < this.lowerValue) this.middleValue = lowerValue;
237
			} else {
273
			}
274
			else {
238 275
				this.middleValue = this.previousMiddleValue;
239 276
			}
240 277
			redraw();
241 278
		}
242 279
	}
243

  
280
	
244 281
	/**
245 282
	 * Fire all selection listeners
246 283
	 *
......
258 295
		}
259 296
		return true;
260 297
	}
261

  
298
	
262 299
	/**
263 300
	 * Code executed when the mouse pointer is moving
264 301
	 *
......
270 307
		this.upperHover = x >= this.coordUpper.x && x <= this.coordUpper.x + img.getBounds().width && y >= this.coordUpper.y && y <= this.coordUpper.y + img.getBounds().height;
271 308
		this.middleHover = x >= this.coordMiddle.x && x <= this.coordMiddle.x + img.getBounds().width && y >= this.coordMiddle.y && y <= this.coordMiddle.y + img.getBounds().height;
272 309
		this.lowerHover = x >= this.coordLower.x && x <= this.coordLower.x + img.getBounds().width && y >= this.coordLower.y && y <= this.coordLower.y + img.getBounds().height;
273

  
310
		
274 311
		if (this.dragInProgress) {
275 312
			if (this.orientation == SWT.HORIZONTAL) {
276 313
				final int mouseValue = (int) ((x - 9f) / computePixelSizeForHorizonalSlider()) + this.minimum;
277 314
				if (this.lastSelected == SELECTED_KNOB.UPPER) {
278 315
					this.upperValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;
279 316
					checkUpperValue();
280
				} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
317
				}
318
				else if (this.lastSelected == SELECTED_KNOB.LOWER) {
281 319
					this.lowerValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;
282 320
					checkLowerValue();
283
				} else {
321
				}
322
				else {
284 323
					this.middleValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;
285 324
					checkMiddleValue();
286 325
				}
287

  
288
			} else {
326
				
327
			}
328
			else {
289 329
				final int mouseValue = (int) ((y - 9f) / computePixelSizeForVerticalSlider()) + this.minimum;
290 330
				if (this.lastSelected == SELECTED_KNOB.UPPER) {
291 331
					this.upperValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;
292 332
					checkUpperValue();
293
				} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
333
				}
334
				else if (this.lastSelected == SELECTED_KNOB.LOWER) {
294 335
					this.lowerValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;
295 336
					checkLowerValue();
296
				} else {
337
				}
338
				else {
297 339
					this.middleValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;
298 340
					checkMiddleValue();
299 341
				}
300 342
			}
301 343
		}
302

  
344
		
303 345
		redraw();
304 346
	}
305

  
347
	
306 348
	/**
307 349
	 * Code executed when the mouse wheel is activated
308 350
	 *
......
312 354
		if (this.lastSelected == SELECTED_KNOB.NONE) {
313 355
			return;
314 356
		}
315

  
357
		
316 358
		if (this.lastSelected == SELECTED_KNOB.LOWER) {
317 359
			this.lowerValue += e.count * this.increment;
318 360
			checkLowerValue();
319 361
			redraw();
320
		} else if (this.lastSelected == SELECTED_KNOB.UPPER) {
362
		}
363
		else if (this.lastSelected == SELECTED_KNOB.UPPER) {
321 364
			this.upperValue += e.count * this.increment;
322 365
			checkUpperValue();
323 366
			redraw();
324
		} else {
367
		}
368
		else {
325 369
			this.middleValue += e.count * this.increment;
326 370
			checkMiddleValue();
327 371
			redraw();
328 372
		}
329 373
	}
330

  
374
	
331 375
	/**
332 376
	 * Check if the lower value is in ranges
333 377
	 */
......
354 398
			this.middleValue = this.upperValue;
355 399
		}
356 400
	}
357

  
401
	
358 402
	/**
359 403
	 * Check if the upper value is in ranges
360 404
	 */
......
369 413
			this.upperValue = this.lowerValue;
370 414
		}
371 415
	}
372

  
416
	
373 417
	/**
374 418
	 * Draws the widget
375 419
	 *
......
384 428
		e.gc.setAntialias(SWT.ON);
385 429
		if (this.orientation == SWT.HORIZONTAL) {
386 430
			drawHorizontalRangeSlider(e.gc);
387
		} else {
431
		}
432
		else {
388 433
			drawVerticalRangeSlider(e.gc);
389 434
		}
390

  
435
		
391 436
	}
392

  
437
	
393 438
	/**
394 439
	 * Draw the range slider (horizontal)
395 440
	 *
......
402 447
		this.coordMiddle = drawHorizontalKnob(gc, this.middleValue, SELECTED_KNOB.MIDDLE);
403 448
		this.coordLower = drawHorizontalKnob(gc, this.lowerValue, SELECTED_KNOB.LOWER);
404 449
	}
405

  
450
	
406 451
	/**
407 452
	 * Draw the background
408 453
	 *
......
410 455
	 */
411 456
	private void drawBackgroundHorizontal(final GC gc) {
412 457
		final Rectangle clientArea = this.getClientArea();
413

  
458
		
414 459
		gc.setBackground(getBackground());
415 460
		gc.fillRectangle(clientArea);
416

  
461
		
417 462
		if (isEnabled()) {
418 463
			gc.setForeground(getForeground());
419
		} else {
464
		}
465
		else {
420 466
			gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));
421 467
		}
422 468
		gc.drawRoundRectangle(9, 9, clientArea.width - 20, clientArea.height - 20, 3, 3);
423

  
469
		
424 470
		final float pixelSize = computePixelSizeForHorizonalSlider();
425 471
		final int startX = (int) (pixelSize * this.lowerValue);
426 472
		final int endX = (int) (pixelSize * this.upperValue);
427 473
		if (isEnabled()) {
428 474
			gc.setBackground(getForeground());
429
		} else {
475
		}
476
		else {
430 477
			gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_GRAY));
431 478
		}
432 479
		gc.fillRectangle(12 + startX, 9, endX - startX - 6, clientArea.height - 20);
433

  
480
		
434 481
	}
435

  
482
	
436 483
	/**
437 484
	 * @return how many pixels corresponds to 1 point of value
438 485
	 */
439 486
	private float computePixelSizeForHorizonalSlider() {
440 487
		return (getClientArea().width - 20f) / (this.maximum - this.minimum);
441 488
	}
442

  
489
	
443 490
	/**
444 491
	 * Draw the bars
445 492
	 *
......
449 496
		final Rectangle clientArea = this.getClientArea();
450 497
		if (isEnabled()) {
451 498
			gc.setForeground(getForeground());
452
		} else {
499
		}
500
		else {
453 501
			gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));
454 502
		}
455

  
503
		
456 504
		final float pixelSize = computePixelSizeForHorizonalSlider();
457 505
		for (int i = 1; i < 10; i++) {
458 506
			final int x = (int) (9 + pixelSize * (this.maximum - this.minimum) / 10 * i);
459 507
			gc.drawLine(x, 4, x, 7);
460 508
			gc.drawLine(x, clientArea.height - 6, x, clientArea.height - 9);
461 509
		}
462

  
510
		
463 511
	}
464

  
512
	
465 513
	/**
466 514
	 * Draws an horizontal knob
467 515
	 *
......
478 526
		if (knob == SELECTED_KNOB.UPPER) {
479 527
			if (this.upperHover) {
480 528
				image = this.dragInProgress ? this.sliderDrag : this.sliderHover;
481
			} else if (this.lastSelected == SELECTED_KNOB.UPPER) {
529
			}
530
			else if (this.lastSelected == SELECTED_KNOB.UPPER) {
482 531
				image = this.sliderSelected;
483
			} else {
532
			}
533
			else {
484 534
				image = this.slider;
485 535
			}
486
		} else if (knob == SELECTED_KNOB.LOWER) {
536
		}
537
		else if (knob == SELECTED_KNOB.LOWER) {
487 538
			if (this.lowerHover) {
488 539
				image = this.dragInProgress ? this.sliderDrag : this.sliderHover;
489
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
540
			}
541
			else if (this.lastSelected == SELECTED_KNOB.LOWER) {
490 542
				image = this.sliderSelected;
491
			} else {
543
			}
544
			else {
492 545
				image = this.slider;
493 546
			}
494
		} else {
547
		}
548
		else {
495 549
			if (this.middleHover) {
496 550
				image = this.dragInProgress ? this.sliderDrag : this.sliderHover;
497
			} else if (this.lastSelected == SELECTED_KNOB.MIDDLE) {
551
			}
552
			else if (this.lastSelected == SELECTED_KNOB.MIDDLE) {
498 553
				image = this.sliderSelected;
499
			} else {
554
			}
555
			else {
500 556
				image = this.slider;
501 557
			}
502 558
		}
503 559
		if (isEnabled()) {
504 560
			gc.drawImage(image, x + 5, getClientArea().height / 2 - this.slider.getBounds().height / 2);
505
		} else {
561
		}
562
		else {
506 563
			final Image temp = new Image(getDisplay(), image, SWT.IMAGE_DISABLE);
507 564
			gc.drawImage(temp, x + 5, getClientArea().height / 2 - this.slider.getBounds().height / 2);
508 565
			temp.dispose();
509 566
		}
510 567
		return new Point(x + 5, getClientArea().height / 2 - this.slider.getBounds().height / 2);
511 568
	}
512

  
569
	
513 570
	/**
514 571
	 * Draw the range slider (vertical)
515 572
	 *
......
522 579
		this.coordMiddle = drawVerticalKnob(gc, this.middleValue, SELECTED_KNOB.MIDDLE);
523 580
		this.coordLower = drawVerticalKnob(gc, this.lowerValue, SELECTED_KNOB.LOWER);
524 581
	}
525

  
582
	
526 583
	/**
527 584
	 * Draws the background
528 585
	 *
......
532 589
		final Rectangle clientArea = this.getClientArea();
533 590
		gc.setBackground(getBackground());
534 591
		gc.fillRectangle(clientArea);
535

  
592
		
536 593
		if (isEnabled()) {
537 594
			gc.setForeground(getForeground());
538
		} else {
595
		}
596
		else {
539 597
			gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));
540 598
		}
541 599
		gc.drawRoundRectangle(9, 9, clientArea.width - 20, clientArea.height - 20, 3, 3);
542

  
600
		
543 601
		final float pixelSize = computePixelSizeForVerticalSlider();
544 602
		final int startY = (int) (pixelSize * this.lowerValue);
545 603
		final int endY = (int) (pixelSize * this.upperValue);
546 604
		if (isEnabled()) {
547 605
			gc.setBackground(getForeground());
548
		} else {
606
		}
607
		else {
549 608
			gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_GRAY));
550 609
		}
551 610
		gc.fillRectangle(9, 12 + startY, clientArea.width - 20, endY - startY - 6);
552

  
611
		
553 612
	}
554

  
613
	
555 614
	/**
556 615
	 * @return how many pixels corresponds to 1 point of value
557 616
	 */
558 617
	private float computePixelSizeForVerticalSlider() {
559 618
		return (getClientArea().height - 20f) / (this.maximum - this.minimum);
560 619
	}
561

  
620
	
562 621
	/**
563 622
	 * Draws the bars
564 623
	 *
......
568 627
		final Rectangle clientArea = this.getClientArea();
569 628
		if (isEnabled()) {
570 629
			gc.setForeground(getForeground());
571
		} else {
630
		}
631
		else {
572 632
			gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));
573 633
		}
574

  
634
		
575 635
		final float pixelSize = computePixelSizeForVerticalSlider();
576 636
		for (int i = 1; i < 10; i++) {
577 637
			final int y = (int) (9 + pixelSize * (this.maximum - this.minimum) / 10 * i);
578 638
			gc.drawLine(4, y, 7, y);
579 639
			gc.drawLine(clientArea.width - 6, y, clientArea.width - 9, y);
580

  
640
			
581 641
		}
582

  
642
		
583 643
	}
584

  
644
	
585 645
	/**
586 646
	 * Draws a vertical knob
587 647
	 *
......
594 654
	private Point drawVerticalKnob(final GC gc, final int value, final SELECTED_KNOB knob) {
595 655
		final float pixelSize = computePixelSizeForVerticalSlider();
596 656
		final int y = (int) (pixelSize * value);
597

  
657
		
598 658
		Image image;
599 659
		if (knob == SELECTED_KNOB.UPPER) {
600 660
			if (this.upperHover) {
601 661
				image = this.dragInProgress ? this.vSliderDrag : this.vSliderHover;
602
			} else if (this.lastSelected == SELECTED_KNOB.UPPER) {
662
			}
663
			else if (this.lastSelected == SELECTED_KNOB.UPPER) {
603 664
				image = this.vSliderSelected;
604
			} else {
665
			}
666
			else {
605 667
				image = this.vSlider;
606 668
			}
607
		} else if (knob == SELECTED_KNOB.LOWER) {
669
		}
670
		else if (knob == SELECTED_KNOB.LOWER) {
608 671
			if (this.lowerHover) {
609 672
				image = this.dragInProgress ? this.vSliderDrag : this.vSliderHover;
610
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
673
			}
674
			else if (this.lastSelected == SELECTED_KNOB.LOWER) {
611 675
				image = this.vSliderSelected;
612
			} else {
676
			}
677
			else {
613 678
				image = this.vSlider;
614 679
			}
615
		} else { // MIDDLE
680
		}
681
		else { // MIDDLE
616 682
			if (this.middleHover) {
617 683
				image = this.dragInProgress ? this.vSliderDrag : this.vSliderHover;
618
			} else if (this.lastSelected == SELECTED_KNOB.MIDDLE) {
684
			}
685
			else if (this.lastSelected == SELECTED_KNOB.MIDDLE) {
619 686
				image = this.vSliderSelected;
620
			} else {
687
			}
688
			else {
621 689
				image = this.vSlider;
622 690
			}
623 691
		}
624 692
		if (isEnabled()) {
625 693
			gc.drawImage(image, getClientArea().width / 2 - 8, y + 2);
626
		} else {
694
		}
695
		else {
627 696
			final Image temp = new Image(getDisplay(), image, SWT.IMAGE_DISABLE);
628 697
			gc.drawImage(temp, getClientArea().width / 2 - 8, y + 2);
629 698
			temp.dispose();
630 699
		}
631 700
		return new Point(getClientArea().width / 2 - 8, y + 2);
632 701
	}
633

  
702
	
634 703
	/**
635 704
	 * Code executed when a key is typed
636 705
	 *
637 706
	 * @param event event
638 707
	 */
639 708
	private void handleKeyDown(final Event event) {
640

  
709
		
641 710
		boolean needRedraw = false;
642

  
711
		
643 712
		if (this.lastSelected == SELECTED_KNOB.NONE) {
644 713
			this.lastSelected = SELECTED_KNOB.LOWER;
645 714
		}
646

  
715
		
647 716
		switch (event.keyCode) {
648
		case SWT.HOME:
649
			if (this.lastSelected == SELECTED_KNOB.UPPER) {
650
				this.upperValue = this.minimum;
651
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
652
				this.lowerValue = this.minimum;
653
			} else {
654
				this.middleValue = this.minimum;
655
			}
656
			needRedraw = true;
657
			break;
658
		case SWT.END:
659
			if (this.lastSelected == SELECTED_KNOB.UPPER) {
660
				this.upperValue = this.maximum;
661
			} if (this.lastSelected == SELECTED_KNOB.LOWER) {
662
				this.lowerValue = this.maximum;
663
			} else {
664
				this.middleValue = this.maximum;
665
			}
666
			needRedraw = true;
667
			break;
668
		case SWT.PAGE_UP:
669
			if (this.lastSelected == SELECTED_KNOB.UPPER) {
670
				this.upperValue += this.pageIncrement;
671
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
672
				this.lowerValue += this.pageIncrement;
673
			} else {
674
				this.middleValue += this.pageIncrement;
675
			}
676
			needRedraw = true;
677
			break;
678
		case SWT.PAGE_DOWN:
679
			if (this.lastSelected == SELECTED_KNOB.UPPER) {
680
				this.upperValue -= this.pageIncrement;
681
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
682
				this.lowerValue -= this.pageIncrement;
683
			} else {
684
				this.middleValue -= this.pageIncrement;
685
			}
686
			needRedraw = true;
687
			break;
688
		case SWT.ARROW_LEFT:
689
		case SWT.ARROW_UP:
690
			if (this.lastSelected == SELECTED_KNOB.UPPER) {
691
				this.upperValue -= this.increment;
692
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
693
				this.lowerValue -= this.increment;
694
			} else {
695
				this.middleValue -= this.increment;
696
			}
697
			needRedraw = true;
698
			break;
699
		case SWT.ARROW_RIGHT:
700
		case SWT.ARROW_DOWN:
701
			if (this.lastSelected == SELECTED_KNOB.UPPER) {
702
				this.upperValue += this.increment;
703
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
704
				this.lowerValue += this.increment;
705
			} else {
706
				this.middleValue += this.increment;
707
			}
708
			needRedraw = true;
709
			break;
717
			case SWT.HOME:
718
				if (this.lastSelected == SELECTED_KNOB.UPPER) {
719
					this.upperValue = this.minimum;
720
				}
721
				else if (this.lastSelected == SELECTED_KNOB.LOWER) {
722
					this.lowerValue = this.minimum;
723
				}
724
				else {
725
					this.middleValue = this.minimum;
726
				}
727
				needRedraw = true;
728
				break;
729
			case SWT.END:
730
				if (this.lastSelected == SELECTED_KNOB.UPPER) {
731
					this.upperValue = this.maximum;
732
				}
733
				if (this.lastSelected == SELECTED_KNOB.LOWER) {
734
					this.lowerValue = this.maximum;
735
				}
736
				else {
737
					this.middleValue = this.maximum;
738
				}
739
				needRedraw = true;
740
				break;
741
			case SWT.PAGE_UP:
742
				if (this.lastSelected == SELECTED_KNOB.UPPER) {
743
					this.upperValue += this.pageIncrement;
744
				}
745
				else if (this.lastSelected == SELECTED_KNOB.LOWER) {
746
					this.lowerValue += this.pageIncrement;
747
				}
748
				else {
749
					this.middleValue += this.pageIncrement;
750
				}
751
				needRedraw = true;
752
				break;
753
			case SWT.PAGE_DOWN:
754
				if (this.lastSelected == SELECTED_KNOB.UPPER) {
755
					this.upperValue -= this.pageIncrement;
756
				}
757
				else if (this.lastSelected == SELECTED_KNOB.LOWER) {
758
					this.lowerValue -= this.pageIncrement;
759
				}
760
				else {
761
					this.middleValue -= this.pageIncrement;
762
				}
763
				needRedraw = true;
764
				break;
765
			case SWT.ARROW_LEFT:
766
			case SWT.ARROW_UP:
767
				if (this.lastSelected == SELECTED_KNOB.UPPER) {
768
					this.upperValue -= this.increment;
769
				}
770
				else if (this.lastSelected == SELECTED_KNOB.LOWER) {
771
					this.lowerValue -= this.increment;
772
				}
773
				else {
774
					this.middleValue -= this.increment;
775
				}
776
				needRedraw = true;
777
				break;
778
			case SWT.ARROW_RIGHT:
779
			case SWT.ARROW_DOWN:
780
				if (this.lastSelected == SELECTED_KNOB.UPPER) {
781
					this.upperValue += this.increment;
782
				}
783
				else if (this.lastSelected == SELECTED_KNOB.LOWER) {
784
					this.lowerValue += this.increment;
785
				}
786
				else {
787
					this.middleValue += this.increment;
788
				}
789
				needRedraw = true;
790
				break;
710 791
		}
711

  
792
		
712 793
		if (needRedraw) {
713 794
			if (this.lastSelected == SELECTED_KNOB.UPPER) {
714 795
				checkUpperValue();
715
			} else if (this.lastSelected == SELECTED_KNOB.LOWER) {
796
			}
797
			else if (this.lastSelected == SELECTED_KNOB.LOWER) {
716 798
				checkLowerValue();
717
			} else {
799
			}
800
			else {
718 801
				checkMiddleValue();
719 802
			}
720 803
			redraw();
721 804
		}
722 805
	}
723

  
806
	
724 807
	/**
725 808
	 * Adds the listener to the collection of listeners who will be notified
726 809
	 * when the user changes the receiver's value, by sending it one of the
......
732 815
	 *
733 816
	 * @param listener the listener which should be notified
734 817
	 *
735
	 * @exception IllegalArgumentException <ul>
818
	 * @exception IllegalArgumentException
819
	 *                <ul>
736 820
	 *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
737 821
	 *                </ul>
738
	 * @exception SWTException <ul>
822
	 * @exception SWTException
823
	 *                <ul>
739 824
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
740 825
	 *                disposed</li>
741 826
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
749 834
		checkWidget();
750 835
		this.listeners.add(listener);
751 836
	}
752

  
837
	
753 838
	/**
754 839
	 * @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)
755 840
	 */
......
760 845
		if (this.orientation == SWT.HORIZONTAL) {
761 846
			if (wHint < 100) {
762 847
				width = 100;
763
			} else {
848
			}
849
			else {
764 850
				width = wHint;
765 851
			}
766

  
852
			
767 853
			if (hHint < 30) {
768 854
				height = 30;
769
			} else {
855
			}
856
			else {
770 857
				height = hHint;
771 858
			}
772
		} else {
859
		}
860
		else {
773 861
			if (wHint < 30) {
774 862
				width = 30;
775
			} else {
863
			}
864
			else {
776 865
				width = wHint;
777 866
			}
778

  
867
			
779 868
			if (hHint < 100) {
780 869
				height = 100;
781
			} else {
870
			}
871
			else {
782 872
				height = hHint;
783 873
			}
784 874
		}
785

  
875
		
786 876
		return new Point(width, height);
787 877
	}
788

  
878
	
789 879
	/**
790 880
	 * Returns the amount that the selected receiver's value will be modified by
791 881
	 * when the up/down (or right/left) arrows are pressed.
792 882
	 *
793 883
	 * @return the increment
794 884
	 *
795
	 * @exception SWTException <ul>
885
	 * @exception SWTException
886
	 *                <ul>
796 887
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
797 888
	 *                disposed</li>
798 889
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
803 894
		checkWidget();
804 895
		return this.increment;
805 896
	}
806

  
897
	
807 898
	/**
808 899
	 * Returns the 'lower selection', which is the lower receiver's position.
809 900
	 *
810 901
	 * @return the selection
811 902
	 *
812
	 * @exception SWTException <ul>
903
	 * @exception SWTException
904
	 *                <ul>
813 905
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
814 906
	 *                disposed</li>
815 907
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
824 916
	public SELECTED_KNOB getLastSelectedKnob() {
825 917
		return lastSelected;
826 918
	}
827

  
919
	
828 920
	/**
829 921
	 * Returns the 'middle selection', which is the middle receiver's position.
830 922
	 *
831 923
	 * @return the selection
832 924
	 *
833
	 * @exception SWTException <ul>
925
	 * @exception SWTException
926
	 *                <ul>
834 927
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
835 928
	 *                disposed</li>
836 929
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
847 940
	 *
848 941
	 * @return the maximum
849 942
	 *
850
	 * @exception SWTException <ul>
943
	 * @exception SWTException
944
	 *                <ul>
851 945
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
852 946
	 *                disposed</li>
853 947
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
858 952
		checkWidget();
859 953
		return this.maximum;
860 954
	}
861

  
955
	
862 956
	/**
863 957
	 * Returns the minimum value which the receiver will allow.
864 958
	 *
865 959
	 * @return the minimum
866 960
	 *
867
	 * @exception SWTException <ul>
961
	 * @exception SWTException
962
	 *                <ul>
868 963
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
869 964
	 *                disposed</li>
870 965
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
875 970
		checkWidget();
876 971
		return this.minimum;
877 972
	}
878

  
973
	
879 974
	/**
880 975
	 * Returns the amount that the selected receiver's value will be modified by
881 976
	 * when the page increment/decrement areas are selected.
882 977
	 *
883 978
	 * @return the page increment
884 979
	 *
885
	 * @exception SWTException <ul>
980
	 * @exception SWTException
981
	 *                <ul>
886 982
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
887 983
	 *                disposed</li>
888 984
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
893 989
		checkWidget();
894 990
		return this.pageIncrement;
895 991
	}
896

  
992
	
897 993
	/**
898 994
	 * Returns the 'selection', which is an array where the first element is the
899 995
	 * lower selection, and the second element is the upper selection
900 996
	 *
901 997
	 * @return the selection
902 998
	 *
903
	 * @exception SWTException <ul>
999
	 * @exception SWTException
1000
	 *                <ul>
904 1001
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
905 1002
	 *                disposed</li>
906 1003
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
915 1012
		selection[2] = this.upperValue;
916 1013
		return selection;
917 1014
	}
918

  
1015
	
919 1016
	/**
920 1017
	 * Returns the 'upper selection', which is the upper receiver's position.
921 1018
	 *
922 1019
	 * @return the selection
923 1020
	 *
924
	 * @exception SWTException <ul>
1021
	 * @exception SWTException
1022
	 *                <ul>
925 1023
	 *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been
926 1024
	 *                disposed</li>
927 1025
	 *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
......
932 1030
		checkWidget();
933 1031
		return this.upperValue;
934 1032
	}
935

  
1033
	
936 1034
	/**
937 1035
	 * Removes the listener from the collection of listeners who will be
938 1036
	 * notified when the user changes the receiver's value.
939 1037
	 *
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff