Source Code Cross Referenced for TooltipPanel.java in  » Web-Framework » wingS » com » javujavu » javux » demo » 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 » Web Framework » wingS » com.javujavu.javux.demo 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *	Javu WingS - Lightweight Java Component Set
003:         *	Copyright (c) 2005-2007 Krzysztof A. Sadlocha
004:         *	e-mail: ksadlocha@programics.com
005:         *
006:         *	This library is free software; you can redistribute it and/or
007:         *	modify it under the terms of the GNU Lesser General Public
008:         *	License as published by the Free Software Foundation; either
009:         *	version 2.1 of the License, or (at your option) any later version.
010:         *
011:         *	This library is distributed in the hope that it will be useful,
012:         *	but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         *	Lesser General Public License for more details.
015:         *
016:         *	You should have received a copy of the GNU Lesser General Public
017:         *	License along with this library; if not, write to the Free Software
018:         *	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         */
020:
021:        package com.javujavu.javux.demo;
022:
023:        import java.awt.BorderLayout;
024:        import java.awt.Color;
025:        import java.awt.GridBagConstraints;
026:        import java.awt.GridBagLayout;
027:        import java.awt.GridLayout;
028:        import java.awt.Insets;
029:        import com.javujavu.javux.wings.WingButton;
030:        import com.javujavu.javux.wings.WingCheckBox;
031:        import com.javujavu.javux.wings.WingCombo;
032:        import com.javujavu.javux.wings.WingLabel;
033:        import com.javujavu.javux.wings.WingMenu;
034:        import com.javujavu.javux.wings.WingMenuItem;
035:        import com.javujavu.javux.wings.WingPanel;
036:        import com.javujavu.javux.wings.WingSpinner;
037:        import com.javujavu.javux.wings.WingTextPane;
038:        import com.javujavu.javux.wings.extra.ColorItem;
039:        import com.javujavu.javux.wings.item.LabelItem;
040:
041:        public class TooltipPanel extends WingPanel {
042:            public TooltipPanel(WingSetPanel owner) {
043:                this .setLayout(new GridBagLayout());
044:                WingPanel panel = new WingPanel(new GridLayout(0, 2, 8, 8));
045:                GridBagConstraints c = new GridBagConstraints();
046:                c.insets = new Insets(10, 10, 10, 10);
047:                c.anchor = GridBagConstraints.CENTER;
048:                c.fill = GridBagConstraints.BOTH;
049:                c.weightx = 1.0;
050:                c.weighty = 1.0;
051:                this .add(panel, c);
052:
053:                WingPanel left, leftAll;
054:                panel.add(leftAll = new WingPanel(new BorderLayout()));
055:                leftAll.add(left = new WingPanel(new GridBagLayout()),
056:                        BorderLayout.CENTER);
057:                left.setStyleId("border1");
058:
059:                c = new GridBagConstraints();
060:                c.insets = new Insets(3, 3, 0, 3);
061:                c.gridwidth = GridBagConstraints.REMAINDER;
062:                c.weighty = 1.0;
063:                c.weightx = 1.0;
064:                WingButton b;
065:                left.add(b = new WingButton(), c);
066:                b.setStyleId("smile");
067:                b.setTooltip(WingSet.imgSmile);
068:                left.add(b = new WingButton("text and icon"), c);
069:                b.setStyleId("smile");
070:                b.setTooltip(new LabelItem("text and icon", WingSet.imgSmile));
071:                left.add(b = new WingButton("multiline\ntext\nand icon"), c);
072:                b.setStyleId("smile");
073:                b.setTooltip(new LabelItem("multiline\ntext\nand icon",
074:                        WingSet.imgSmile));
075:                left.add(b = new WingButton("disabled"), c);
076:                b.setTooltip("disabled has tooltip");
077:                b.setEnabled(false);
078:                left.add(
079:                        b = new WingButton(new LabelItem(
080:                                "tooltip with\ncustom item renderer",
081:                                WingSet.imgSeek)), c);
082:                b.setTooltip(new ColorItem(
083:                        "tooltip with\ncustom item renderer", Color.magenta));
084:                left.add(b = new WingButton(new LabelItem(
085:                        "transparent tooltip", WingSet.imgGlasses)), c);
086:                WingLabel l;
087:                b
088:                        .setTooltip(l = new WingLabel(
089:                                "Transparent tooltip\nstyle: alpha_tooltip (stylesheet wingsetdemo.ini)\n\nTransparency works\non Java >= 1.2",
090:                                LEFT));
091:                l.setStyleId("alpha_tooltip");
092:                left.add(b = new WingButton(new LabelItem("more transparent",
093:                        WingSet.imgEye)), c);
094:                b
095:                        .setTooltip(l = new WingLabel(
096:                                "Transparent tooltip\nstyle: alpha_tooltip2 (stylesheet wingsetdemo.ini)\n\nTransparency works\non Java >= 1.2",
097:                                LEFT));
098:                l.setStyleId("alpha_tooltip2");
099:                //		l.setTextPosition(LEFT);
100:                left.add(b = new WingButton(new LabelItem("animated tooltip",
101:                        WingSet.imgAnim)), c);
102:                b
103:                        .setTooltip(new LabelItem("animated tooltip",
104:                                WingSet.imgAnim));
105:                c.insets = new Insets(3, 3, 3, 3);
106:                left.add(b = new WingButton(new LabelItem("extreme tooltip",
107:                        WingSet.imgBomb)), c);
108:                WingTextPane ta = new WingTextPane();
109:                TextPanePanel.setText(ta, 6);
110:                b.setTooltip(ta);
111:
112:                WingPanel right;
113:                panel.add(right = new WingPanel(new GridBagLayout()));
114:                right.setStyleId("border1");
115:
116:                c.insets = new Insets(3, 3, 0, 3);
117:                right.add(l = new WingLabel("Label with tooltip"), c);
118:                l.setTooltip("Label with tooltip");
119:                WingCombo cb;
120:                right.add(cb = new WingCombo(), c);
121:                cb.addItem("Combo with tooltip");
122:                cb.setTooltip("Combo with tooltip");
123:                WingCheckBox cbx;
124:                right.add(cbx = new WingCheckBox("Checkbox with tooltip"), c);
125:                cbx.setTooltip("Checkbox with tooltip");
126:                WingSpinner sp;
127:                right.add(sp = new WingSpinner(), c);
128:                sp.addEnum(0, "Spinner with tooltip");
129:                sp.addRange(1, 10, 1);
130:                sp.setValue(0);
131:                sp.setTooltip("Spinner with tooltip");
132:                c.fill = GridBagConstraints.HORIZONTAL;
133:                WingMenu m;
134:                right.add(m = new WingMenu(HORIZONTAL), c);
135:                m.setTooltip("Menu with tooltips");
136:                WingMenuItem mi;
137:                WingMenu m2;
138:                m.addSeparator();
139:                m.add(m2 = new WingMenu("Menu"));
140:                m2.setTooltip("Menu");
141:                m2.add(mi = new WingMenuItem("Submenu"));
142:                mi.setTooltip("Submenu");
143:                m2.add(mi = new WingMenuItem("with"));
144:                mi.setTooltip("with");
145:                m2.add(mi = new WingMenuItem("tootlips"));
146:                mi.setTooltip("tootlips");
147:                m.add(m2 = new WingMenu("with"));
148:                m2.setTooltip("with");
149:                m2.add(mi = new WingMenuItem("with"));
150:                mi.setTooltip("with");
151:                m.add(m2 = new WingMenu("tootlips"));
152:                m2.setTooltip("tootlips");
153:                m2.add(mi = new WingMenuItem("tootlips"));
154:                mi.setTooltip("tootlips");
155:                m.addSeparator();
156:                m.add(mi = new WingMenuItem("why", CHECKBOX));
157:                mi.setSelected(true);
158:                mi.setTooltip("why");
159:                m.add(mi = new WingMenuItem("not", RADIO));
160:                mi.setSelected(true);
161:                mi.setTooltip("not");
162:                m.addSeparator();
163:
164:                c.fill = GridBagConstraints.BOTH;
165:                c.insets = new Insets(10, 10, 10, 10);
166:                WingPanel p2;
167:                right.add(p2 = new WingPanel(new GridBagLayout()), c);
168:                p2.setStyleId("border1");
169:                p2.add(l = new WingLabel("Panel with tooltip"));
170:                p2.setTooltip("Panel with tooltip");
171:                l.setTooltip("Panel with tooltip");
172:
173:                left.setTooltip("this panel has tooltip");
174:                right.setTooltip("this panel has tooltip");
175:
176:            }
177:
178:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.