Java Doc for ToolTipSupport.java in  » Swing-Library » abeille-forms-designer » org » netbeans » editor » ext » 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 » Swing Library » abeille forms designer » org.netbeans.editor.ext 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.event.MouseAdapter
      org.netbeans.editor.ext.ToolTipSupport

ToolTipSupport
public class ToolTipSupport extends MouseAdapter implements MouseMotionListener,ActionListener,PropertyChangeListener,SettingsChangeListener,FocusListener(Code)
Support for editor tooltips. Once the user stops moving the mouse for the ToolTipSupport.INITIAL_DELAY milliseconds the enterTimer fires and the ToolTipSupport.updateToolTip() method is called which searches for the action named ExtKit.buildToolTipAction and if found it executes it. The tooltips can be displayed by either calling ToolTipSupport.setToolTipText(java.lang.String) or ToolTipSupport.setToolTip(javax.swing.JComponent) .
However only one of the above ways should be used not a combination of both because in such case the text could be propagated in the previously set custom tooltip component.
author:
   Miloslav Metelka
version:
   1.00


Field Summary
final public static  intDISMISS_DELAY
     Delay after which the tooltip will be hidden automatically in milliseconds.
final public static  intINITIAL_DELAY
     Initial delay before the tooltip is shown in milliseconds.
final public static  StringPROP_DISMISS_DELAY
    
final public static  StringPROP_ENABLED
    
final public static  StringPROP_INITIAL_DELAY
    
final public static  StringPROP_STATUS
     Property for the visibility status change.
final public static  StringPROP_TOOL_TIP
    
final public static  StringPROP_TOOL_TIP_TEXT
    
final public static  intSTATUS_COMPONENT_VISIBLE
     Status indicating that the tooltip is visible because ToolTipSupport.setToolTip(javax.swing.JComponent) was called.
final public static  intSTATUS_HIDDEN
     Status indicating that the tooltip is not showing on the screen.
final public static  intSTATUS_TEXT_VISIBLE
     Status indicating that the tooltip is visible because ToolTipSupport.setToolTipText(java.lang.String) was called.
final public static  intSTATUS_VISIBILITY_ENABLED
     Status indicating that the tooltip is not showing on the screen but once either the ToolTipSupport.setToolTipText(java.lang.String) or ToolTipSupport.setToolTip(javax.swing.JComponent) gets called the tooltip will become visible.

Constructor Summary
public  ToolTipSupport(ExtEditorUI extEditorUI)
     Construct new support for tooltips.

Method Summary
public  voidactionPerformed(ActionEvent evt)
    
public  voidaddPropertyChangeListener(PropertyChangeListener listener)
     Add the listener for the property changes.
protected  voidcomponentToolTipTextChanged(PropertyChangeEvent evt)
     Called automatically when the javax.swing.JComponent.TOOL_TIP_TEXT_KEY property of the corresponding editor component gets changed.
By default it calls ToolTipSupport.setToolTipText(java.lang.String) with the new tooltip text of the component.
protected  JComponentcreateDefaultToolTip()
     Create the default tooltip component.
protected  voidfirePropertyChange(String propertyName, Object oldValue, Object newValue)
     Fire the change of the given property.
public  voidfocusGained(FocusEvent e)
    
public  voidfocusLost(FocusEvent e)
    
public  intgetDismissDelay()
    
public  StringgetIdentifierUnderCursor()
     Helper method to get the identifier under the mouse cursor.
public  intgetInitialDelay()
    
final public  MouseEventgetLastMouseEvent()
     last mouse event captured by this support.
final public  intgetStatus()
     status of the tooltip visibility.
final public  JComponentgetToolTip()
    
public  StringgetToolTipText()
    
public  booleanisEnabled()
     whether the tooltip support is enabled.
public  booleanisToolTipVisible()
    
public  voidmouseClicked(MouseEvent evt)
    
public  voidmouseDragged(MouseEvent evt)
    
public  voidmouseEntered(MouseEvent evt)
    
public  voidmouseExited(MouseEvent evt)
    
public  voidmouseMoved(MouseEvent evt)
    
public  voidmousePressed(MouseEvent evt)
    
public  voidmouseReleased(MouseEvent evt)
    
public  voidpropertyChange(PropertyChangeEvent evt)
    
public  voidremovePropertyChangeListener(PropertyChangeListener listener)
    
public  voidsetDismissDelay(int delay)
     Set the delay between displaying of the tooltip and its automatic hiding in milliseconds.
public  voidsetEnabled(boolean enabled)
     Set whether the tooltip support is enabled.
public  voidsetInitialDelay(int delay)
     Set the delay between stopping mouse movement and displaying of the tooltip in milliseconds.
public  voidsetToolTip(JComponent toolTip)
     Set the tooltip component.
public  voidsetToolTipText(String text)
     Set the tooltip text to make the tooltip to be shown on the screen.
protected  voidsetToolTipVisible(boolean visible)
    
public  voidsettingsChange(SettingsChangeEvent evt)
    
protected  voidupdateToolTip()
     Update the tooltip by running corresponding action ExtKit.buildToolTipAction .
protected  voidupdateToolTipBounds()
     Update bounds of the tooltip component.

Field Detail
DISMISS_DELAY
final public static int DISMISS_DELAY(Code)
Delay after which the tooltip will be hidden automatically in milliseconds.



INITIAL_DELAY
final public static int INITIAL_DELAY(Code)
Initial delay before the tooltip is shown in milliseconds.



PROP_DISMISS_DELAY
final public static String PROP_DISMISS_DELAY(Code)
Property for the dismiss delay change



PROP_ENABLED
final public static String PROP_ENABLED(Code)
Property for the enabled flag change



PROP_INITIAL_DELAY
final public static String PROP_INITIAL_DELAY(Code)
Property for the initial delay change



PROP_STATUS
final public static String PROP_STATUS(Code)
Property for the visibility status change.



PROP_TOOL_TIP
final public static String PROP_TOOL_TIP(Code)
Property for the tooltip component change



PROP_TOOL_TIP_TEXT
final public static String PROP_TOOL_TIP_TEXT(Code)
Property for the tooltip text change



STATUS_COMPONENT_VISIBLE
final public static int STATUS_COMPONENT_VISIBLE(Code)
Status indicating that the tooltip is visible because ToolTipSupport.setToolTip(javax.swing.JComponent) was called.



STATUS_HIDDEN
final public static int STATUS_HIDDEN(Code)
Status indicating that the tooltip is not showing on the screen.



STATUS_TEXT_VISIBLE
final public static int STATUS_TEXT_VISIBLE(Code)
Status indicating that the tooltip is visible because ToolTipSupport.setToolTipText(java.lang.String) was called.



STATUS_VISIBILITY_ENABLED
final public static int STATUS_VISIBILITY_ENABLED(Code)
Status indicating that the tooltip is not showing on the screen but once either the ToolTipSupport.setToolTipText(java.lang.String) or ToolTipSupport.setToolTip(javax.swing.JComponent) gets called the tooltip will become visible.




Constructor Detail
ToolTipSupport
public ToolTipSupport(ExtEditorUI extEditorUI)(Code)
Construct new support for tooltips.




Method Detail
actionPerformed
public void actionPerformed(ActionEvent evt)(Code)



addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)(Code)
Add the listener for the property changes. The names of the supported properties are defined as "PROP_" public static string constants.
Parameters:
  listener - listener to be added.



componentToolTipTextChanged
protected void componentToolTipTextChanged(PropertyChangeEvent evt)(Code)
Called automatically when the javax.swing.JComponent.TOOL_TIP_TEXT_KEY property of the corresponding editor component gets changed.
By default it calls ToolTipSupport.setToolTipText(java.lang.String) with the new tooltip text of the component.



createDefaultToolTip
protected JComponent createDefaultToolTip()(Code)
Create the default tooltip component.



firePropertyChange
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code)
Fire the change of the given property.
Parameters:
  propertyName - name of the fired property
Parameters:
  oldValue - old value of the property
Parameters:
  newValue - new value of the property.



focusGained
public void focusGained(FocusEvent e)(Code)



focusLost
public void focusLost(FocusEvent e)(Code)



getDismissDelay
public int getDismissDelay()(Code)
the delay between displaying of the tooltip and its automatichiding in milliseconds.



getIdentifierUnderCursor
public String getIdentifierUnderCursor()(Code)
Helper method to get the identifier under the mouse cursor. string containing identifier under mouse cursor.



getInitialDelay
public int getInitialDelay()(Code)
the delay between stopping mouse movement and displaying of thetooltip in milliseconds.



getLastMouseEvent
final public MouseEvent getLastMouseEvent()(Code)
last mouse event captured by this support. This method can beused by the action that evaluates the tooltip.



getStatus
final public int getStatus()(Code)
status of the tooltip visibility. It can beToolTipSupport.STATUS_HIDDEN or ToolTipSupport.STATUS_VISIBILITY_ENABLED orToolTipSupport.STATUS_TEXT_VISIBLE or ToolTipSupport.STATUS_COMPONENT_VISIBLE.



getToolTip
final public JComponent getToolTip()(Code)
the component that either contains the tooltip or is responsiblefor displaying of text tooltips.



getToolTipText
public String getToolTipText()(Code)
the current tooltip text.



isEnabled
public boolean isEnabled()(Code)
whether the tooltip support is enabled. If it's disabled thetooltip does not become visible.



isToolTipVisible
public boolean isToolTipVisible()(Code)
Whether the tooltip is showing on the screen.ToolTipSupport.getStatus() gives the exact visibility state.



mouseClicked
public void mouseClicked(MouseEvent evt)(Code)



mouseDragged
public void mouseDragged(MouseEvent evt)(Code)



mouseEntered
public void mouseEntered(MouseEvent evt)(Code)



mouseExited
public void mouseExited(MouseEvent evt)(Code)



mouseMoved
public void mouseMoved(MouseEvent evt)(Code)



mousePressed
public void mousePressed(MouseEvent evt)(Code)



mouseReleased
public void mouseReleased(MouseEvent evt)(Code)



propertyChange
public void propertyChange(PropertyChangeEvent evt)(Code)



removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)(Code)



setDismissDelay
public void setDismissDelay(int delay)(Code)
Set the delay between displaying of the tooltip and its automatic hiding in milliseconds.



setEnabled
public void setEnabled(boolean enabled)(Code)
Set whether the tooltip support is enabled. If it's disabled the tooltip does not become visible.
Parameters:
  enabled - whether the tooltip will be enabled or not.



setInitialDelay
public void setInitialDelay(int delay)(Code)
Set the delay between stopping mouse movement and displaying of the tooltip in milliseconds.



setToolTip
public void setToolTip(JComponent toolTip)(Code)
Set the tooltip component. It can be called either to set the custom component that will display the text tooltips or to display the generic component with the tooltip after the tooltip timer has fired.
Parameters:
  toolTip - component that either contains the tooltip or that willdisplay a text tooltip.



setToolTipText
public void setToolTipText(String text)(Code)
Set the tooltip text to make the tooltip to be shown on the screen.
Parameters:
  text - tooltip text to be displayed.



setToolTipVisible
protected void setToolTipVisible(boolean visible)(Code)



settingsChange
public void settingsChange(SettingsChangeEvent evt)(Code)



updateToolTip
protected void updateToolTip()(Code)
Update the tooltip by running corresponding action ExtKit.buildToolTipAction . This method gets called once the enterTimer fires and it can be overriden by children.



updateToolTipBounds
protected void updateToolTipBounds()(Code)
Update bounds of the tooltip component. It gets called when the tooltip component is about to be shown or when it was updated by ToolTipSupport.setToolTip(javax.swing.JComponent) .



Methods inherited from java.awt.event.MouseAdapter
public void mouseClicked(MouseEvent e)(Code)(Java Doc)
public void mouseDragged(MouseEvent e)(Code)(Java Doc)
public void mouseEntered(MouseEvent e)(Code)(Java Doc)
public void mouseExited(MouseEvent e)(Code)(Java Doc)
public void mouseMoved(MouseEvent e)(Code)(Java Doc)
public void mousePressed(MouseEvent e)(Code)(Java Doc)
public void mouseReleased(MouseEvent e)(Code)(Java Doc)
public void mouseWheelMoved(MouseWheelEvent e)(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.