Java Doc for DropTargetContext.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.awt.dnd.DropTargetContext

DropTargetContext
public class DropTargetContext implements Serializable(Code)
A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget. The DropTargetContext provides the mechanism for a potential receiver of a drop operation to both provide the end user with the appropriate drag under feedback, but also to effect the subsequent data transfer if appropriate.
version:
   1.44, 05/05/07
since:
   1.2

Inner Class :protected class TransferableProxy implements Transferable


Constructor Summary
 DropTargetContext(DropTarget dt)
     Construct a DropTargetContext given a specified DropTarget.

Method Summary
protected  voidacceptDrag(int dragOperation)
     accept the Drag.
protected  voidacceptDrop(int dropOperation)
     called to signal that the drop is acceptable using the specified operation.
public  voidaddNotify(DropTargetContextPeer dtcp)
     Called when associated with the DropTargetContextPeer.
protected  TransferablecreateTransferableProxy(Transferable t, boolean local)
     Creates a TransferableProxy to proxy for the specified Transferable.
Parameters:
  t - the Transferable to be proxied
Parameters:
  local - true if t representsthe result of a local drag-n-drop operation.
public  voiddropComplete(boolean success)
     This method signals that the drop is completed and if it was successful or not.
public  ComponentgetComponent()
     This method returns the Component associated with this DropTargetContext.
protected  DataFlavor[]getCurrentDataFlavors()
     get the available DataFlavors of the Transferable operand of this operation.
protected  List<DataFlavor>getCurrentDataFlavorsAsList()
     This method returns a the currently available DataFlavors of the Transferable operand as a java.util.List.
public  DropTargetgetDropTarget()
     This method returns the DropTarget associated with this DropTargetContext.
 DropTargetContextPeergetDropTargetContextPeer()
    
protected  intgetTargetActions()
     This method returns an int representing the current actions this DropTarget will accept.
protected  TransferablegetTransferable()
    
protected  booleanisDataFlavorSupported(DataFlavor df)
     This method returns a boolean indicating if the given DataFlavor is supported by this DropTargetContext.
protected  voidrejectDrag()
     reject the Drag.
protected  voidrejectDrop()
     called to signal that the drop is unacceptable.
public  voidremoveNotify()
     Called when disassociated with the DropTargetContextPeer.
protected  voidsetTargetActions(int actions)
     This method sets the current actions acceptable to this DropTarget.


Constructor Detail
DropTargetContext
DropTargetContext(DropTarget dt)(Code)
Construct a DropTargetContext given a specified DropTarget.


Parameters:
  dt - the DropTarget to associate with





Method Detail
acceptDrag
protected void acceptDrag(int dragOperation)(Code)
accept the Drag.


Parameters:
  dragOperation - the supported action(s)




acceptDrop
protected void acceptDrop(int dropOperation)(Code)
called to signal that the drop is acceptable using the specified operation. must be called during DropTargetListener.drop method invocation.


Parameters:
  dropOperation - the supported action(s)




addNotify
public void addNotify(DropTargetContextPeer dtcp)(Code)
Called when associated with the DropTargetContextPeer.


Parameters:
  dtcp - the DropTargetContextPeer




createTransferableProxy
protected Transferable createTransferableProxy(Transferable t, boolean local)(Code)
Creates a TransferableProxy to proxy for the specified Transferable.
Parameters:
  t - the Transferable to be proxied
Parameters:
  local - true if t representsthe result of a local drag-n-drop operation. the new TransferableProxy instance.



dropComplete
public void dropComplete(boolean success) throws InvalidDnDOperationException(Code)
This method signals that the drop is completed and if it was successful or not.


Parameters:
  success - true for success, false if not


throws:
  InvalidDnDOperationException - if a drop is not outstanding/extant




getComponent
public Component getComponent()(Code)
This method returns the Component associated with this DropTargetContext.

the Component associated with this Context




getCurrentDataFlavors
protected DataFlavor[] getCurrentDataFlavors()(Code)
get the available DataFlavors of the Transferable operand of this operation.

a DataFlavor[] containing thesupported DataFlavors of the Transferable operand.




getCurrentDataFlavorsAsList
protected List<DataFlavor> getCurrentDataFlavorsAsList()(Code)
This method returns a the currently available DataFlavors of the Transferable operand as a java.util.List.

the currently available DataFlavors as a java.util.List




getDropTarget
public DropTarget getDropTarget()(Code)
This method returns the DropTarget associated with this DropTargetContext.

the DropTarget associated with this DropTargetContext




getDropTargetContextPeer
DropTargetContextPeer getDropTargetContextPeer()(Code)
Get the DropTargetContextPeer

the platform peer




getTargetActions
protected int getTargetActions()(Code)
This method returns an int representing the current actions this DropTarget will accept.

the current actions acceptable to this DropTarget




getTransferable
protected Transferable getTransferable() throws InvalidDnDOperationException(Code)
get the Transferable (proxy) operand of this operation


throws:
  InvalidDnDOperationException - if a drag is not outstanding/extant

the Transferable




isDataFlavorSupported
protected boolean isDataFlavorSupported(DataFlavor df)(Code)
This method returns a boolean indicating if the given DataFlavor is supported by this DropTargetContext.


Parameters:
  df - the DataFlavor

if the DataFlavor specified is supported




rejectDrag
protected void rejectDrag()(Code)
reject the Drag.



rejectDrop
protected void rejectDrop()(Code)
called to signal that the drop is unacceptable. must be called during DropTargetListener.drop method invocation.



removeNotify
public void removeNotify()(Code)
Called when disassociated with the DropTargetContextPeer.



setTargetActions
protected void setTargetActions(int actions)(Code)
This method sets the current actions acceptable to this DropTarget.


Parameters:
  actions - an int representing the supported action(s)




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.