Java Doc for MouseTracker.java in  » XML-UI » xui32 » com » blogofbug » swing » delegates » 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 » XML UI » xui32 » com.blogofbug.swing.delegates 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.blogofbug.swing.delegates.MouseTracker

MouseTracker
public class MouseTracker implements ContainerListener,MouseListener,MouseMotionListener(Code)
A class which abstracts away some of the complexity of a mouse listener meaning that listeners (See MouseTrackerListener) need to implement fewer methods. Furthermore, unlike a normal mouse listener it still considers the mouse to be inside even if it is over a component inside a container, and will translate the co-ordintates to be relative to the "listened to" component
author:
   nigel


Field Summary
protected  LinkedList<MouseTrackerListener>clients
    
protected  Componentcomponent
    
protected  booleanmouseInside
    
protected  Pointposition
    

Constructor Summary
public  MouseTracker(Component component)
    
public  MouseTracker(Component component, MouseTrackerListener client)
    

Method Summary
public  voidaddListener(MouseTrackerListener client)
     Adds a listener to the MouseTracker.
public  voidcomponentAdded(ContainerEvent e)
    
public  voidcomponentRemoved(ContainerEvent e)
    
public  PointgetPosition()
    
public  booleanisMouseInside()
    
public  voidmouseClicked(MouseEvent e)
    
public  voidmouseDragged(MouseEvent e)
    
public  voidmouseEntered(MouseEvent e)
    
protected  voidmouseExited()
    
public  voidmouseExited(MouseEvent e)
     Captures the exit event and checks to see if the compnent is a container.
public  voidmouseMoved(MouseEvent e)
     When the mouse moves within the component, or one of the contained componets determines the point within the tracked component and passes that on to the listeners.
public  voidmousePressed(MouseEvent e)
    
public  voidmouseReleased(MouseEvent e)
    
public  voidremoveListener(MouseTrackerListener client)
    

Field Detail
clients
protected LinkedList<MouseTrackerListener> clients(Code)
The lisetners



component
protected Component component(Code)
The component being tracked



mouseInside
protected boolean mouseInside(Code)
True if the mouse is inside



position
protected Point position(Code)
The last known position




Constructor Detail
MouseTracker
public MouseTracker(Component component)(Code)
Adds a mouse tracker to the specified component
Parameters:
  component - the component to track



MouseTracker
public MouseTracker(Component component, MouseTrackerListener client)(Code)
Adds a mouse tracker to the specified component, and adds the specified listener
Parameters:
  component - The component to track
Parameters:
  client - A listener




Method Detail
addListener
public void addListener(MouseTrackerListener client)(Code)
Adds a listener to the MouseTracker. The listener will get all of the mouse tracker events
Parameters:
  client - The listener



componentAdded
public void componentAdded(ContainerEvent e)(Code)
Adds a mouseMotion listener to the added component
Parameters:
  e - The event when something is added



componentRemoved
public void componentRemoved(ContainerEvent e)(Code)
Removes the mouseMotion listener from the removed component
Parameters:
  e -



getPosition
public Point getPosition()(Code)
Retreives the point position, returns null if the pointer is outside the component The pointer position or null if the pointer is not inside the tracked object



isMouseInside
public boolean isMouseInside()(Code)
Determines if the mouse is inside the tracked component true if it is, false if it isn't



mouseClicked
public void mouseClicked(MouseEvent e)(Code)
NOT USED
Parameters:
  e - Mouse Event



mouseDragged
public void mouseDragged(MouseEvent e)(Code)
NOT USED
Parameters:
  e - Mouse Event



mouseEntered
public void mouseEntered(MouseEvent e)(Code)
Tracks when the mouse moves into the component
Parameters:
  e - Mouse Event



mouseExited
protected void mouseExited()(Code)
Called when the mouse has been determined to have REALLY exited the component



mouseExited
public void mouseExited(MouseEvent e)(Code)
Captures the exit event and checks to see if the compnent is a container. If it's not it just passes on the event, otherwise the event is only passed on if the component the mouse is now over is not contained in the container.
Parameters:
  e - Mouse Event



mouseMoved
public void mouseMoved(MouseEvent e)(Code)
When the mouse moves within the component, or one of the contained componets determines the point within the tracked component and passes that on to the listeners.
Parameters:
  e - Mouse Event



mousePressed
public void mousePressed(MouseEvent e)(Code)
NOT USED
Parameters:
  e - Mouse Event



mouseReleased
public void mouseReleased(MouseEvent e)(Code)
NOT USED
Parameters:
  e - Mouse Event



removeListener
public void removeListener(MouseTrackerListener client)(Code)
Removes a listener from the listener list
Parameters:
  client - the listener to remove from the list



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.