Java Doc for DragGestureEvent.java in  » 6.0-JDK-Core » AWT » java » awt » dnd » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » AWT » java.awt.dnd 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.EventObject
      java.awt.dnd.DragGestureEvent

DragGestureEvent
public class DragGestureEvent extends EventObject (Code)
A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking.
version:
   1.31
See Also:   java.awt.dnd.DragGestureRecognizer
See Also:   java.awt.dnd.DragGestureListener
See Also:   java.awt.dnd.DragSource



Constructor Summary
public  DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List<? extends InputEvent> evs)
     Constructs a DragGestureEvent given the DragGestureRecognizer firing this event, an int representing the user's preferred action, a Point indicating the origin of the drag, and a List of events that comprise the gesture.

Method Summary
public  ComponentgetComponent()
     Returns the Component associated with this DragGestureEvent.
public  intgetDragAction()
     Returns an int representing the action selected by the user.
public  PointgetDragOrigin()
     Returns a Point in the coordinates of the Component over which the drag originated.
public  DragSourcegetDragSource()
     Returns the DragSource.
public  DragGestureRecognizergetSourceAsDragGestureRecognizer()
     Returns the source as a DragGestureRecognizer.
public  InputEventgetTriggerEvent()
     Returns the initial event that triggered the gesture.
public  Iterator<InputEvent>iterator()
     Returns an Iterator for the events comprising the gesture.
public  voidstartDrag(Cursor dragCursor, Transferable transferable)
     Starts the drag operation given the Cursor for this drag operation and the Transferable representing the source data for this drag operation.
If a null Cursor is specified no exception will be thrown and default drag cursors will be used instead.
If a null Transferable is specified NullPointerException will be thrown.
Parameters:
  dragCursor - The initial Cursor for this drag operationor null for the default cursor handling;see DragSourceContextfor more details on the cursor handling mechanismduring drag and drop
Parameters:
  transferable - The Transferable representing the sourcedata for this drag operation.
throws:
  InvalidDnDOperationException - if the Drag and Dropsystem is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation isstill executing.
public  voidstartDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl)
     Starts the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.
public  voidstartDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl)
     Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.
public  Object[]toArray()
     Returns an Object array of the events comprising the drag gesture.
public  Object[]toArray(Object[] array)
     Returns an array of the events comprising the drag gesture.


Constructor Detail
DragGestureEvent
public DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori, List<? extends InputEvent> evs)(Code)
Constructs a DragGestureEvent given the DragGestureRecognizer firing this event, an int representing the user's preferred action, a Point indicating the origin of the drag, and a List of events that comprise the gesture.


Parameters:
  dgr - The DragGestureRecognizer firing this event
Parameters:
  act - The the user's preferred action
Parameters:
  ori - The origin of the drag
Parameters:
  evs - The List of events that comprise the gesture


throws:
  IllegalArgumentException - if input parameters are null





Method Detail
getComponent
public Component getComponent()(Code)
Returns the Component associated with this DragGestureEvent.

the Component




getDragAction
public int getDragAction()(Code)
Returns an int representing the action selected by the user.

the action selected by the user




getDragOrigin
public Point getDragOrigin()(Code)
Returns a Point in the coordinates of the Component over which the drag originated.

the Point where the drag originated in Component coords.




getDragSource
public DragSource getDragSource()(Code)
Returns the DragSource.

the DragSource




getSourceAsDragGestureRecognizer
public DragGestureRecognizer getSourceAsDragGestureRecognizer()(Code)
Returns the source as a DragGestureRecognizer.

the source as a DragGestureRecognizer




getTriggerEvent
public InputEvent getTriggerEvent()(Code)
Returns the initial event that triggered the gesture.

the first "triggering" event in the sequence of the gesture




iterator
public Iterator<InputEvent> iterator()(Code)
Returns an Iterator for the events comprising the gesture.

an Iterator for the events comprising the gesture




startDrag
public void startDrag(Cursor dragCursor, Transferable transferable) throws InvalidDnDOperationException(Code)
Starts the drag operation given the Cursor for this drag operation and the Transferable representing the source data for this drag operation.
If a null Cursor is specified no exception will be thrown and default drag cursors will be used instead.
If a null Transferable is specified NullPointerException will be thrown.
Parameters:
  dragCursor - The initial Cursor for this drag operationor null for the default cursor handling;see DragSourceContextfor more details on the cursor handling mechanismduring drag and drop
Parameters:
  transferable - The Transferable representing the sourcedata for this drag operation.
throws:
  InvalidDnDOperationException - if the Drag and Dropsystem is unable to initiate a drag operation, or if the user attempts to start a drag while an existing drag operation isstill executing.
throws:
  NullPointerException - if the Transferable is null
since:
   1.4



startDrag
public void startDrag(Cursor dragCursor, Transferable transferable, DragSourceListener dsl) throws InvalidDnDOperationException(Code)
Starts the drag given the initial Cursor to display, the Transferable object, and the DragSourceListener to use.


Parameters:
  dragCursor - The initial Cursor for this drag operationor null for the default cursor handling;seeDragSourceContextfor more details on the cursor handling mechanismduring drag and drop
Parameters:
  transferable - The source's Transferable
Parameters:
  dsl - The source's DragSourceListener


throws:
  InvalidDnDOperationException - if the Drag and Drop system is unable toinitiate a drag operation, or if the user attempts to start a drag while an existingdrag operation is still executing.




startDrag
public void startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Transferable transferable, DragSourceListener dsl) throws InvalidDnDOperationException(Code)
Start the drag given the initial Cursor to display, a drag Image, the offset of the Image, the Transferable object, and the DragSourceListener to use.


Parameters:
  dragCursor - The initial Cursor for this drag operationor null for the default cursor handling;seeDragSourceContextfor more details on the cursor handling mechanismduring drag and drop
Parameters:
  dragImage - The source's dragImage
Parameters:
  imageOffset - The dragImage's offset
Parameters:
  transferable - The source's Transferable
Parameters:
  dsl - The source's DragSourceListener


throws:
  InvalidDnDOperationException - if the Drag and Drop system is unable toinitiate a drag operation, or if the user attempts to start a drag while an existingdrag operation is still executing.




toArray
public Object[] toArray()(Code)
Returns an Object array of the events comprising the drag gesture.

an array of the events comprising the gesture




toArray
public Object[] toArray(Object[] array)(Code)
Returns an array of the events comprising the drag gesture.


Parameters:
  array - the array of EventObject sub(types)

an array of the events comprising the gesture




Fields inherited from java.util.EventObject
protected transient Object source(Code)(Java Doc)

Methods inherited from java.util.EventObject
public Object getSource()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.