blob: 47d140c2e2a71ec34f6b85a5925fba3ac38b690b [file] [log] [blame]
itrimble38bf0b92006-10-30 18:59:16 +00001/*******************************************************************************
2 * Copyright (c) 2006 Sybase, Inc. and others.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Sybase, Inc. - initial API and implementation
11 *******************************************************************************/
12package org.eclipse.jst.pagedesigner.dnd;
13
14import org.eclipse.draw2d.geometry.Point;
15import org.eclipse.gef.Request;
16import org.eclipse.gef.requests.DropRequest;
17
18/**
19 * @author mengbo
20 */
21public class LocalDropRequest extends Request implements DropRequest {
22 // XXX: need move this constant to somewhere else.
cbateman57f0d4f2007-10-10 00:05:16 +000023 /**
24 * the request name for local drops
25 */
gkesslercfc53082008-11-18 22:25:04 +000026 public static final String REQ_LOCAL_DROP = "Local Drop"; //$NON-NLS-1$
itrimble38bf0b92006-10-30 18:59:16 +000027
28 private Point _location;
29
30 private Object _localObject;
31
32 /**
33 *
34 */
35 public LocalDropRequest() {
36 super(REQ_LOCAL_DROP);
itrimble38bf0b92006-10-30 18:59:16 +000037 }
38
39 /**
40 * Returns the location of the object to be created.
41 *
42 * @return the location
43 */
44 public Point getLocation() {
45 return _location;
46 }
47
48 /**
49 * Sets the location where the new object will be placed.
50 *
51 * @param location
52 * the location
53 */
54 public void setLocation(Point location) {
55 this._location = location;
56 }
57
cbateman57f0d4f2007-10-10 00:05:16 +000058 /**
59 * @return the local object
60 */
itrimble38bf0b92006-10-30 18:59:16 +000061 public Object getLocalObject() {
62 return _localObject;
63 }
64
cbateman57f0d4f2007-10-10 00:05:16 +000065 /**
66 * @param local
67 */
itrimble38bf0b92006-10-30 18:59:16 +000068 public void setLocalObject(Object local) {
69 this._localObject = local;
70 }
71}