Source Code Cross Referenced for Panel.java in  » 6.0-JDK-Core » AWT » java » awt » 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 » 6.0 JDK Core » AWT » java.awt 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
003:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004:         *
005:         * This code is free software; you can redistribute it and/or modify it
006:         * under the terms of the GNU General Public License version 2 only, as
007:         * published by the Free Software Foundation.  Sun designates this
008:         * particular file as subject to the "Classpath" exception as provided
009:         * by Sun in the LICENSE file that accompanied this code.
010:         *
011:         * This code is distributed in the hope that it will be useful, but WITHOUT
012:         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013:         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014:         * version 2 for more details (a copy is included in the LICENSE file that
015:         * accompanied this code).
016:         *
017:         * You should have received a copy of the GNU General Public License version
018:         * 2 along with this work; if not, write to the Free Software Foundation,
019:         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020:         *
021:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022:         * CA 95054 USA or visit www.sun.com if you need additional information or
023:         * have any questions.
024:         */
025:        package java.awt;
026:
027:        import javax.accessibility.*;
028:
029:        /**
030:         * <code>Panel</code> is the simplest container class. A panel
031:         * provides space in which an application can attach any other
032:         * component, including other panels.
033:         * <p>
034:         * The default layout manager for a panel is the
035:         * <code>FlowLayout</code> layout manager.
036:         *
037:         * @version 	1.46, 06/05/07
038:         * @author 	Sami Shaio
039:         * @see     java.awt.FlowLayout
040:         * @since   JDK1.0
041:         */
042:        public class Panel extends Container implements  Accessible {
043:            private static final String base = "panel";
044:            private static int nameCounter = 0;
045:
046:            /*
047:             * JDK 1.1 serialVersionUID
048:             */
049:            private static final long serialVersionUID = -2728009084054400034L;
050:
051:            /**
052:             * Creates a new panel using the default layout manager.
053:             * The default layout manager for all panels is the
054:             * <code>FlowLayout</code> class.
055:             */
056:            public Panel() {
057:                this (new FlowLayout());
058:            }
059:
060:            /**
061:             * Creates a new panel with the specified layout manager.
062:             * @param layout the layout manager for this panel.
063:             * @since JDK1.1
064:             */
065:            public Panel(LayoutManager layout) {
066:                setLayout(layout);
067:            }
068:
069:            /**
070:             * Construct a name for this component.  Called by getName() when the
071:             * name is null.
072:             */
073:            String constructComponentName() {
074:                synchronized (Panel.class) {
075:                    return base + nameCounter++;
076:                }
077:            }
078:
079:            /**
080:             * Creates the Panel's peer.  The peer allows you to modify the
081:             * appearance of the panel without changing its functionality.
082:             */
083:
084:            public void addNotify() {
085:                synchronized (getTreeLock()) {
086:                    if (peer == null)
087:                        peer = getToolkit().createPanel(this );
088:                    super .addNotify();
089:                }
090:            }
091:
092:            /////////////////
093:            // Accessibility support
094:            ////////////////
095:
096:            /**
097:             * Gets the AccessibleContext associated with this Panel. 
098:             * For panels, the AccessibleContext takes the form of an 
099:             * AccessibleAWTPanel. 
100:             * A new AccessibleAWTPanel instance is created if necessary.
101:             *
102:             * @return an AccessibleAWTPanel that serves as the 
103:             *         AccessibleContext of this Panel
104:             * @since 1.3
105:             */
106:            public AccessibleContext getAccessibleContext() {
107:                if (accessibleContext == null) {
108:                    accessibleContext = new AccessibleAWTPanel();
109:                }
110:                return accessibleContext;
111:            }
112:
113:            /**
114:             * This class implements accessibility support for the 
115:             * <code>Panel</code> class.  It provides an implementation of the 
116:             * Java Accessibility API appropriate to panel user-interface elements.
117:             * @since 1.3
118:             */
119:            protected class AccessibleAWTPanel extends AccessibleAWTContainer {
120:
121:                private static final long serialVersionUID = -6409552226660031050L;
122:
123:                /**
124:                 * Get the role of this object.
125:                 *
126:                 * @return an instance of AccessibleRole describing the role of the 
127:                 * object
128:                 */
129:                public AccessibleRole getAccessibleRole() {
130:                    return AccessibleRole.PANEL;
131:                }
132:            }
133:
134:        }
w__ww__.j_a__v___a___2___s___.__c_o__m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.