Source Code Cross Referenced for QuickTips.java in  » Ajax » gwtext-2.01 » com » gwtext » client » widgets » 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 » Ajax » gwtext 2.01 » com.gwtext.client.widgets 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * GWT-Ext Widget Library
003:         * Copyright(c) 2007-2008, GWT-Ext.
004:         * licensing@gwt-ext.com
005:         * 
006:         * http://www.gwt-ext.com/license
007:         */
008:
009:        package com.gwtext.client.widgets;
010:
011:        import com.google.gwt.core.client.JavaScriptObject;
012:        import com.google.gwt.user.client.Element;
013:
014:        /**
015:         * Provides attractive and customizable tooltips for any element. The QuickTips singleton is used to configure and manage
016:         * tooltips globally for multiple elements in a generic manner. To create individual tooltips with maximum customizability,
017:         * you should consider either {@link Tip} or {@link ToolTip}.
018:         * <p/>
019:         * Quicktips can be configured via tag attributes directly in markup, or by registering quick tips programmatically via the register method.
020:         * <p/>
021:         * The singleton's instance of {@link QuickTip} is available via {@link QuickTips#getQuickTip}, and supports all the methods,
022:         * and all the all the configuration properties of {@link QuickTip}. These settings will apply to all tooltips shown by the
023:         * singleton.
024:         * <p/>
025:         * To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with the <b>ext:</b>
026:         * namespace. The HTML element itself is automatically set as the quick tip target. Here is the summary of supported attributes
027:         * (optional unless otherwise noted):
028:         * <ul>
029:         * <li>hide: Specifying "user" is equivalent to setting autoHide = false. Any other value will be the same as autoHide = true.</li>
030:         * <li>qclass: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).</li>
031:         * <li>qtip (required): The quick tip text (equivalent to the 'text' target element config).</li>
032:         * <li>qtitle: The quick tip title (equivalent to the 'title' target element config).</li>
033:         * <li>qwidth: The quick tip width (equivalent to the 'width' target element config).</li>
034:         * </ul>
035:         * <p/>
036:         * <p/>
037:         * Here is an example of configuring an HTML element to display a tooltip from markup:
038:         * <pre>
039:         * <code>
040:         * // Add a quick tip to an HTML button
041:         * &lt;input type="button" value="OK" ext:qtitle="OK Button" ext:qwidth="100" ext:qtip="This is a quick tip from markup!"&gt;&lt;/input&gt;
042:         * </ode>
043:         * </pre>
044:         * <p/>
045:         */
046:        public class QuickTips {
047:            /**
048:             * Disable this quick tip.
049:             */
050:            public static native void disable()/*-{
051:                    $wnd.Ext.QuickTips.disable();
052:                }-*/;
053:
054:            /**
055:             * Enable this quick tip.
056:             */
057:            public static native void enable()/*-{
058:                    $wnd.Ext.QuickTips.enable();
059:                }-*/;
060:
061:            /**
062:             * Gets the global QuickTips instance.
063:             *
064:             * @return the global QuickTips instance.
065:             */
066:            public static QuickTip getQuickTip() {
067:                return new QuickTip(doGetQuickTip());
068:            }
069:
070:            private static native JavaScriptObject doGetQuickTip() /*-{
071:                   return $wnd.Ext.QuickTips.getQuickTip();
072:               }-*/;
073:
074:            /**
075:             * Initialize and enable QuickTips for first use. This should be called once before the first attempt to access or display QuickTips in a page.
076:             */
077:            public static native void init()/*-{
078:                    $wnd.Ext.QuickTips.init();
079:                }-*/;
080:
081:            /**
082:             * Returns true if the quick tip is enabled, else false.
083:             *
084:             * @return true if enabled
085:             */
086:            public static native boolean isEnabled()/*-{
087:                    return $wnd.Ext.QuickTips.isEnabled();
088:                }-*/;
089:
090:            /**
091:             * Configures a new quick tip instance and assigns it to a target element.
092:             *
093:             * @param id     target element id
094:             * @param config the config
095:             */
096:            public native void register(String id, QuickTipsConfig config) /*-{
097:                   var configJS = config.@com.gwtext.client.core.JsObject::getJsObj()();
098:                   configJS['target'] = id;
099:                   $wnd.Ext.QuickTips.register(configJS);
100:                }-*/;
101:
102:            /**
103:             * Configures a new quick tip instance and assigns it to a target element.
104:             * 
105:             * @param element the target element
106:             * @param config the quick tip config
107:             */
108:            public native void register(Element element, QuickTipsConfig config) /*-{
109:                   var configJS = config.@com.gwtext.client.core.JsObject::getJsObj()();
110:                   configJS['target'] = element;
111:                   $wnd.Ext.QuickTips.register(configJS);
112:                }-*/;
113:
114:            /**
115:             * Removes any registered quick tip from the target element and destroys it.
116:             *
117:             * @param elementID the element ID
118:             */
119:            public native void unregister(String elementID) /*-{
120:                   $wnd.Ext.QuickTips.register(elementID);
121:               }-*/;
122:
123:            /**
124:             * Removes any registered quick tip from the target element and destroys it.
125:             *
126:             * @param element the element
127:             */
128:            public native void unregister(Element element) /*-{
129:                   $wnd.Ext.QuickTips.register(element);
130:               }-*/;
131:
132:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.