Mercurial > projects > dwt-mac
comparison dwt/dnd/DND.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | 380af2bdd8e5 |
children | 370410b7852f |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2007 IBM Corporation and others. | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 *******************************************************************************/ | 10 *******************************************************************************/ |
11 module dwt.dnd; | 11 module dwt.dnd.DND; |
12 | |
13 import dwt.dwthelper.utils; | |
12 | 14 |
13 | 15 |
14 import dwt.*; | 16 import dwt.DWT; |
17 import dwt.DWTError; | |
18 import dwt.DWTException; | |
15 | 19 |
16 /** | 20 /** |
17 * | 21 * |
18 * Class DND contains all the constants used in defining a | 22 * Class DND contains all the constants used in defining a |
19 * DragSource or a DropTarget. | 23 * DragSource or a DropTarget. |
20 * | 24 * |
25 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> | |
21 */ | 26 */ |
22 public class DND { | 27 public class DND { |
23 | 28 |
24 /** | 29 /** |
25 * The transfer mechanism for data that is being cut | 30 * The transfer mechanism for data that is being cut |
192 * @since 3.1 | 197 * @since 3.1 |
193 */ | 198 */ |
194 public static final int ERROR_INVALID_DATA = 2003; | 199 public static final int ERROR_INVALID_DATA = 2003; |
195 | 200 |
196 /** | 201 /** |
197 * DropTarget Key: The String constant for looking up the drop target | 202 * DropTarget Key: The string constant for looking up the drop target |
198 * for a control using <code>getData(String)</code>. When a drop target | 203 * for a control using <code>getData(String)</code>. When a drop target |
199 * is created for a control, it is stored as a property in the control | 204 * is created for a control, it is stored as a property in the control |
200 * using <code>setData(String, Object)</code>. | 205 * using <code>setData(String, Object)</code>. |
201 * | 206 * |
202 * @since 3.4 | 207 * @since 3.4 |
203 */ | 208 */ |
204 public static final String DROP_TARGET_KEY = "DropTarget"; //$NON-NLS-1$ | 209 public static final String DROP_TARGET_KEY = "DropTarget"; //$NON-NLS-1$ |
205 | 210 |
206 /** | 211 /** |
207 * DragSource Key: The String constant for looking up the drag source | 212 * DragSource Key: The string constant for looking up the drag source |
208 * for a control using <code>getData(String)</code>. When a drag source | 213 * for a control using <code>getData(String)</code>. When a drag source |
209 * is created for a control, it is stored as a property in the control | 214 * is created for a control, it is stored as a property in the control |
210 * using <code>setData(String, Object)</code>. | 215 * using <code>setData(String, Object)</code>. |
211 * | 216 * |
212 * @since 3.4 | 217 * @since 3.4 |
234 * <p> | 239 * <p> |
235 * In DND, errors are reported by throwing one of three exceptions: | 240 * In DND, errors are reported by throwing one of three exceptions: |
236 * <dl> | 241 * <dl> |
237 * <dd>java.lang.IllegalArgumentException</dd> | 242 * <dd>java.lang.IllegalArgumentException</dd> |
238 * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt> | 243 * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt> |
239 * <dd>dwt.DWTException (: java.lang.RuntimeException)</dd> | 244 * <dd>dwt.DWTException (extends java.lang.RuntimeException)</dd> |
240 * <dt>thrown whenever a recoverable error happens internally in DWT</dt> | 245 * <dt>thrown whenever a recoverable error happens internally in DWT</dt> |
241 * <dd>dwt.DWTError (: java.lang.Error)</dd> | 246 * <dd>dwt.DWTError (extends java.lang.Error)</dd> |
242 * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in DWT</dt> | 247 * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in DWT</dt> |
243 * </dl> | 248 * </dl> |
244 * This method provides the logic which maps between error codes | 249 * This method provides the logic which maps between error codes |
245 * and one of the above exceptions. | 250 * and one of the above exceptions. |
246 * </p> | 251 * </p> |