Source Code Cross Referenced for SComponentEvent.java in  » Swing-Library » wings3 » org » wings » event » 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 » wings3 » org.wings.event 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2000,2005 wingS development team.
003:         *
004:         * This file is part of wingS (http://wingsframework.org).
005:         *
006:         * wingS is free software; you can redistribute it and/or modify
007:         * it under the terms of the GNU Lesser General Public License
008:         * as published by the Free Software Foundation; either version 2.1
009:         * of the License, or (at your option) any later version.
010:         *
011:         * Please see COPYING for the complete licence.
012:         */
013:        package org.wings.event;
014:
015:        import org.wings.SComponent;
016:        import org.wings.SDimension;
017:
018:        /**
019:         * A low-level event which indicates that a component moved, changed
020:         * size, or changed visibility (also, the root class for the other
021:         * component-level events).
022:         * <p/>
023:         * Component events are provided for notification purposes ONLY;
024:         * WingS will automatically handle component moves and resizes
025:         * internally so that GUI layout works properly regardless of
026:         * whether a program is receiving these events or not.
027:         * <p/>
028:         * In addition to serving as the base class for other component-related
029:         * events (InputEvent, FocusEvent, WindowEvent, ContainerEvent),
030:         * this class defines the events that indicate changes in
031:         * a component's size, position, or visibility.
032:         * <p/>
033:         * This low-level event is generated by a component object (such as a
034:         * SList) when the component is moved, resized, rendered invisible, or made
035:         * visible again. The event is passed to every ComponentListener or
036:         * ComponentAdapter object which registered to receive such
037:         * events using the component's addComponentListener method.
038:         * (ComponentAdapter objects implement the
039:         * ComponentListener interface.) Each such listener object
040:         * gets this ComponentEvent when the event occurs.
041:         *
042:         * @author <a href="mailto:andre@lison.de">Andre Lison</a>
043:         * @see org.wings.event.SComponentAdapter
044:         * @see org.wings.event.SComponentListener
045:         */
046:        public class SComponentEvent extends java.awt.AWTEvent {
047:            /**
048:             * The first number in the range of ids used for component events.
049:             */
050:            public static final int COMPONENT_FIRST = 10000;
051:
052:            /**
053:             * This event indicates that the component was rendered invisible.
054:             */
055:            public static final int COMPONENT_HIDDEN = COMPONENT_FIRST;
056:
057:            /**
058:             * This event indicates that the component's position changed.
059:             */
060:            public static final int COMPONENT_MOVED = COMPONENT_FIRST + 1;
061:
062:            /**
063:             * This event indicates that the component's size changed.
064:             */
065:            public static final int COMPONENT_RESIZED = COMPONENT_FIRST + 2;
066:
067:            /**
068:             * This event indicates that the component was made visible.
069:             */
070:            public static final int COMPONENT_SHOWN = COMPONENT_FIRST + 3;
071:
072:            /**
073:             * The last number in the range of ids used for component events.
074:             */
075:            public static final int COMPONENT_LAST = COMPONENT_SHOWN; // take last.
076:
077:            /**
078:             * Constructs a ComponentEvent object.
079:             *
080:             * @param aSource the Component object that originated the event
081:             * @param anId    an integer indicating the type of event
082:             */
083:            public SComponentEvent(SComponent aSource, int anId) {
084:                super (aSource, anId);
085:            }
086:
087:            /**
088:             * Returns the originator of the event.
089:             *
090:             * @return the Component object that originated the event
091:             */
092:            public SComponent getComponent() {
093:                return (SComponent) source;
094:            }
095:
096:            /**
097:             * Returns a string representing the state of this event. This
098:             * method is intended to be used only for debugging purposes, and the
099:             * content and format of the returned string may vary between
100:             * implementations. The returned string may be empty but may
101:             * not be <tt>null</tt>.
102:             */
103:            public String paramString() {
104:                if (source == null)
105:                    return "no source";
106:
107:                String typeStr;
108:                SDimension d = ((SComponent) source).getPreferredSize();
109:
110:                switch (id) {
111:                case COMPONENT_SHOWN:
112:                    typeStr = "COMPONENT_SHOWN";
113:                    break;
114:                case COMPONENT_HIDDEN:
115:                    typeStr = "COMPONENT_HIDDEN";
116:                    break;
117:                case COMPONENT_MOVED:
118:                    typeStr = "COMPONENT_MOVED (" + d.getWidthInt() + "x"
119:                            + d.getHeightInt() + ")";
120:                    break;
121:                case COMPONENT_RESIZED:
122:                    typeStr = "COMPONENT_RESIZED (" + d.getWidthInt() + "x"
123:                            + d.getHeightInt() + ")";
124:                    break;
125:                default:
126:                    typeStr = "unknown type";
127:                }
128:                return typeStr;
129:            }
130:
131:            public String toString() {
132:                return "ComponentEvent[source=" + source + "; " + paramString()
133:                        + "]";
134:            }
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.