Java Doc for DragSourceDragEvent.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.awt.dnd.DragSourceEvent
   java.awt.dnd.DragSourceDragEvent

DragSourceDragEvent
public class DragSourceDragEvent extends DragSourceEvent (Code)
The DragSourceDragEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the DragSourceListener registered with that DragSourceContext and with its associated DragSource.

The DragSourceDragEvent reports the target drop action and the user drop action that reflect the current state of the drag operation.

Target drop action is one of DnDConstants that represents the drop action selected by the current drop target if this drop action is supported by the drag source or DnDConstants.ACTION_NONE if this drop action is not supported by the drag source.

User drop action depends on the drop actions supported by the drag source and the drop action selected by the user. The user can select a drop action by pressing modifier keys during the drag operation:

 
 Ctrl + Shift -> ACTION_LINK
 Ctrl         -> ACTION_COPY
 Shift        -> ACTION_MOVE
 
If the user selects a drop action, the user drop action is one of DnDConstants that represents the selected drop action if this drop action is supported by the drag source or DnDConstants.ACTION_NONE if this drop action is not supported by the drag source.

If the user doesn't select a drop action, the set of DnDConstants that represents the set of drop actions supported by the drag source is searched for DnDConstants.ACTION_MOVE, then for DnDConstants.ACTION_COPY, then for DnDConstants.ACTION_LINK and the user drop action is the first constant found. If no constant is found the user drop action is DnDConstants.ACTION_NONE.
version:
   1.37, 05/05/07
since:
   1.2




Constructor Summary
public  DragSourceDragEvent(DragSourceContext dsc, int dropAction, int action, int modifiers)
     Constructs a DragSourceDragEvent.
public  DragSourceDragEvent(DragSourceContext dsc, int dropAction, int action, int modifiers, int x, int y)
     Constructs a DragSourceDragEvent given the specified DragSourceContext, user drop action, target drop action, modifiers and coordinates.

The arguments dropAction and action should be one of DnDConstants that represents a single action. The argument modifiers should be either a bitwise mask of old java.awt.event.InputEvent.*_MASK constants or a bitwise mask of extended java.awt.event.InputEvent.*_DOWN_MASK constants. This constructor does not throw any exception for invalid dropAction, action and modifiers.
Parameters:
  dsc - the DragSourceContext associated with thisevent.


Method Summary
public  intgetDropAction()
     This method returns the logical intersection of the target drop action and the set of drop actions supported by the drag source.
public  intgetGestureModifiers()
     This method returns an int representing the current state of the input device modifiers associated with the user's gesture.
public  intgetGestureModifiersEx()
     This method returns an int representing the current state of the input device extended modifiers associated with the user's gesture.
public  intgetTargetActions()
     This method returns the target drop action.
public  intgetUserAction()
     This method returns the user drop action.


Constructor Detail
DragSourceDragEvent
public DragSourceDragEvent(DragSourceContext dsc, int dropAction, int action, int modifiers)(Code)
Constructs a DragSourceDragEvent. This class is typically instantiated by the DragSourceContextPeer rather than directly by client code. The coordinates for this DragSourceDragEvent are not specified, so getLocation will return null for this event.

The arguments dropAction and action should be one of DnDConstants that represents a single action. The argument modifiers should be either a bitwise mask of old java.awt.event.InputEvent.*_MASK constants or a bitwise mask of extended java.awt.event.InputEvent.*_DOWN_MASK constants. This constructor does not throw any exception for invalid dropAction, action and modifiers.
Parameters:
  dsc - the DragSourceContext that is to manage notifications for this event.
Parameters:
  dropAction - the user drop action.
Parameters:
  action - the target drop action.
Parameters:
  modifiers - the modifier keys down during event (shift, ctrl,alt, meta)Either extended _DOWN_MASK or old _MASK modifiersshould be used, but both models should not be mixedin one event. Use of the extended modifiers ispreferred. IllegalArgumentException if dsc is null.
See Also:   java.awt.event.InputEvent
See Also:   DragSourceEvent.getLocation




DragSourceDragEvent
public DragSourceDragEvent(DragSourceContext dsc, int dropAction, int action, int modifiers, int x, int y)(Code)
Constructs a DragSourceDragEvent given the specified DragSourceContext, user drop action, target drop action, modifiers and coordinates.

The arguments dropAction and action should be one of DnDConstants that represents a single action. The argument modifiers should be either a bitwise mask of old java.awt.event.InputEvent.*_MASK constants or a bitwise mask of extended java.awt.event.InputEvent.*_DOWN_MASK constants. This constructor does not throw any exception for invalid dropAction, action and modifiers.
Parameters:
  dsc - the DragSourceContext associated with thisevent.
Parameters:
  dropAction - the user drop action.
Parameters:
  action - the target drop action.
Parameters:
  modifiers - the modifier keys down during event (shift, ctrl,alt, meta)Either extended _DOWN_MASK or old _MASK modifiersshould be used, but both models should not be mixedin one event. Use of the extended modifiers ispreferred.
Parameters:
  x - the horizontal coordinate for the cursor location
Parameters:
  y - the vertical coordinate for the cursor location IllegalArgumentException if dsc is null.
See Also:   java.awt.event.InputEvent
since:
   1.4





Method Detail
getDropAction
public int getDropAction()(Code)
This method returns the logical intersection of the target drop action and the set of drop actions supported by the drag source. the logical intersection of the target drop action andthe set of drop actions supported by the drag source.



getGestureModifiers
public int getGestureModifiers()(Code)
This method returns an int representing the current state of the input device modifiers associated with the user's gesture. Typically these would be mouse buttons or keyboard modifiers.

If the modifiers passed to the constructor are invalid, this method returns them unchanged. the current state of the input device modifiers




getGestureModifiersEx
public int getGestureModifiersEx()(Code)
This method returns an int representing the current state of the input device extended modifiers associated with the user's gesture. See InputEvent.getModifiersEx

If the modifiers passed to the constructor are invalid, this method returns them unchanged. the current state of the input device extended modifiers
since:
   1.4




getTargetActions
public int getTargetActions()(Code)
This method returns the target drop action. the target drop action.



getUserAction
public int getUserAction()(Code)
This method returns the user drop action. the user drop action.



Methods inherited from java.awt.dnd.DragSourceEvent
public DragSourceContext getDragSourceContext()(Code)(Java Doc)
public Point getLocation()(Code)(Java Doc)
public int getX()(Code)(Java Doc)
public int getY()(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.