Java Doc for BasicDropTargetListener.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » designer » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.designer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.visualweb.designer.BasicDropTargetListener

BasicDropTargetListener
class BasicDropTargetListener implements DropTargetListener,UIResource,ActionListener(Code)
COPIED from javax.swing.plaf.basic.BasicDropTargetListener because that copy is package private.

The Swing DropTarget implementation supports multicast notification to listeners, so this implementation is used as an additional listener that extends the primary drop target functionality (i.e. linkage to the TransferHandler) to include autoscroll and establish an insertion point for the drop. This is used by the ComponentUI of components supporting a selection mechanism, which have a way of indicating a location within their model.

The autoscroll functionality is based upon the Swing scrolling mechanism of the Scrollable interface. The unit scroll increment is used to as the scroll amount, and the scrolling is based upon JComponent.getVisibleRect and JComponent.scrollRectToVisible. The band of area around the visible rectangle used to invoke autoscroll is based upon the unit scroll increment as that is assumed to represent the last possible item in the visible region.

The subclasses are expected to implement the following methods to manage the insertion location via the components selection mechanism.

  • saveComponentState
  • restoreComponentState
  • restoreComponentStateForDrop
  • updateInsertionLocation

author:
   Timothy Prinzing
version:
   1.8 01/23/03



Constructor Summary
protected  BasicDropTargetListener()
    

Method Summary
public synchronized  voidactionPerformed(ActionEvent e)
     The timer fired, perform autoscroll if the pointer is within the autoscroll region.
 voidautoscroll(JComponent c, Point pos)
     Perform an autoscroll operation.
public  voiddragEnter(DropTargetDragEvent e)
    
public  voiddragExit(DropTargetEvent e)
    
public  voiddragOver(DropTargetDragEvent e)
    
public  voiddrop(DropTargetDropEvent e)
    
public  voiddropActionChanged(DropTargetDragEvent e)
    
static  JComponentgetComponent(DropTargetEvent e)
    
protected  voidrestoreComponentState(JComponent c)
     called to restore the state of a component in case a drop is not performed.
protected  voidrestoreComponentStateForDrop(JComponent c)
     called to restore the state of a component in case a drop is performed.
protected  voidsaveComponentState(JComponent c)
     called to save the state of a component in case it needs to be restored because a drop is not performed.
 voidupdateAutoscrollRegion(JComponent c)
     Update the geometry of the autoscroll region.
protected  voidupdateInsertionLocation(JComponent c, Point p)
     called to set the insertion location to match the current mouse pointer coordinates.


Constructor Detail
BasicDropTargetListener
protected BasicDropTargetListener()(Code)
construct a DropTargetAutoScroller


Parameters:
  c - the Component
Parameters:
  p - the Point





Method Detail
actionPerformed
public synchronized void actionPerformed(ActionEvent e)(Code)
The timer fired, perform autoscroll if the pointer is within the autoscroll region.


Parameters:
  e - the ActionEvent




autoscroll
void autoscroll(JComponent c, Point pos)(Code)
Perform an autoscroll operation. This is implemented to scroll by the unit increment of the Scrollable using scrollRectToVisible. If the cursor is in a corner of the autoscroll region, more than one axis will scroll.



dragEnter
public void dragEnter(DropTargetDragEvent e)(Code)



dragExit
public void dragExit(DropTargetEvent e)(Code)



dragOver
public void dragOver(DropTargetDragEvent e)(Code)



drop
public void drop(DropTargetDropEvent e)(Code)



dropActionChanged
public void dropActionChanged(DropTargetDragEvent e)(Code)



getComponent
static JComponent getComponent(DropTargetEvent e)(Code)



restoreComponentState
protected void restoreComponentState(JComponent c)(Code)
called to restore the state of a component in case a drop is not performed.



restoreComponentStateForDrop
protected void restoreComponentStateForDrop(JComponent c)(Code)
called to restore the state of a component in case a drop is performed.



saveComponentState
protected void saveComponentState(JComponent c)(Code)
called to save the state of a component in case it needs to be restored because a drop is not performed.



updateAutoscrollRegion
void updateAutoscrollRegion(JComponent c)(Code)
Update the geometry of the autoscroll region. The geometry is maintained as a pair of rectangles. The region can cause a scroll if the pointer sits inside it for the duration of the timer. The region that causes the timer countdown is the area between the two rectangles.

This is implemented to use the visible area of the component as the outer rectangle and the insets are based upon the Scrollable information (if any). If the Scrollable is scrollable along an axis, the step increment is used as the autoscroll inset. If the component is not scrollable, the insets will be zero (i.e. autoscroll will not happen).




updateInsertionLocation
protected void updateInsertionLocation(JComponent c, Point p)(Code)
called to set the insertion location to match the current mouse pointer coordinates.



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.