Source Code Cross Referenced for RadioButton.java in  » Ajax » GWT » com » google » gwt » user » client » ui » 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 » GWT » com.google.gwt.user.client.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2007 Google Inc.
003:         * 
004:         * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005:         * use this file except in compliance with the License. You may obtain a copy of
006:         * the License at
007:         * 
008:         * http://www.apache.org/licenses/LICENSE-2.0
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012:         * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013:         * License for the specific language governing permissions and limitations under
014:         * the License.
015:         */
016:        package com.google.gwt.user.client.ui;
017:
018:        import com.google.gwt.user.client.DOM;
019:
020:        /**
021:         * A mutually-exclusive selection radio button widget.
022:         * 
023:         * <p>
024:         * <img class='gallery' src='RadioButton.png'/>
025:         * </p>
026:         * 
027:         * <h3>CSS Style Rules</h3>
028:         * <ul class='css'>
029:         * <li>.gwt-RadioButton { }</li>
030:         * </ul>
031:         * 
032:         * <p>
033:         * <h3>Example</h3> {@example com.google.gwt.examples.RadioButtonExample}
034:         * </p>
035:         */
036:        public class RadioButton extends CheckBox {
037:
038:            /**
039:             * Creates a new radio associated with a particular group name. All radio
040:             * buttons associated with the same group name belong to a mutually-exclusive
041:             * set.
042:             * 
043:             * Radio buttons are grouped by their name attribute, so changing their
044:             * name using the setName() method will also change their associated
045:             * group.
046:             * 
047:             * @param name the group name with which to associate the radio button
048:             */
049:            public RadioButton(String name) {
050:                super (DOM.createInputRadio(name));
051:                setStyleName("gwt-RadioButton");
052:            }
053:
054:            /**
055:             * Creates a new radio associated with a particular group, and initialized
056:             * with the given HTML label. All radio buttons associated with the same group
057:             * name belong to a mutually-exclusive set.
058:             * 
059:             * Radio buttons are grouped by their name attribute, so changing their
060:             * name using the setName() method will also change their associated
061:             * group.
062:             * 
063:             * @param name the group name with which to associate the radio button
064:             * @param label this radio button's label
065:             */
066:            public RadioButton(String name, String label) {
067:                this (name);
068:                setText(label);
069:            }
070:
071:            /**
072:             * Creates a new radio button associated with a particular group, and
073:             * initialized with the given label (optionally treated as HTML). All radio
074:             * buttons associated with the same group name belong to a mutually-exclusive
075:             * set.
076:             * 
077:             * Radio buttons are grouped by their name attribute, so changing their
078:             * name using the setName() method will also change their associated
079:             * group.
080:             * 
081:             * @param name name the group with which to associate the radio button
082:             * @param label this radio button's label
083:             * @param asHTML <code>true</code> to treat the specified label as HTML
084:             */
085:            public RadioButton(String name, String label, boolean asHTML) {
086:                this (name);
087:                if (asHTML) {
088:                    setHTML(label);
089:                } else {
090:                    setText(label);
091:                }
092:            }
093:
094:            /**
095:             * Change the group name of this radio button.
096:             * 
097:             * Radio buttons are grouped by their name attribute, so changing their
098:             * name using the setName() method will also change their associated
099:             * group.
100:             * 
101:             * If changing this group name results in a new radio group with
102:             * multiple radio buttons selected, this radio button will remain
103:             * selected and the other radio buttons will be unselected.
104:             *  
105:             * @param name name the group with which to associate the radio button
106:             */
107:            @Override
108:            public void setName(String name) {
109:                super.replaceInputElement(DOM.createInputRadio(name));
110:            }
111:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.