Source Code Cross Referenced for CalendarMonthChangeEvent.java in  » J2EE » Sofia » com » salmonllc » html » events » 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 » J2EE » Sofia » com.salmonllc.html.events 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //** Copyright Statement ***************************************************
002:        //The Salmon Open Framework for Internet Applications (SOFIA)
003:        // Copyright (C) 1999 - 2002, Salmon LLC
004:        //
005:        // This program is free software; you can redistribute it and/or
006:        // modify it under the terms of the GNU General Public License version 2
007:        // as published by the Free Software Foundation;
008:        // 
009:        // This program is distributed in the hope that it will be useful,
010:        // but WITHOUT ANY WARRANTY; without even the implied warranty of
011:        // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012:        // GNU General Public License for more details.
013:        // 
014:        // You should have received a copy of the GNU General Public License
015:        // along with this program; if not, write to the Free Software
016:        // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
017:        // 
018:        // For more information please visit http://www.salmonllc.com
019:        //** End Copyright Statement ***************************************************
020:        package com.salmonllc.html.events;
021:
022:        /////////////////////////
023:        //$Archive: /JADE/SourceCode/com/salmonllc/html/events/CalendarMonthChangeEvent.java $
024:        //$Author: Dan $ 
025:        //$Revision: 7 $ 
026:        //$Modtime: 10/30/02 2:58p $ 
027:        /////////////////////////
028:
029:        import com.salmonllc.html.*;
030:        import java.util.*;
031:
032:        /**
033:         * This object will be created and passed to every Calendar Month Change event method.
034:         */
035:
036:        public class CalendarMonthChangeEvent extends java.awt.AWTEvent {
037:            int _oldMonth, _oldYear, _newMonth, _newYear;
038:            HtmlCalendar _source;
039:
040:            /**
041:             * This method constructs a new Event.
042:             */
043:
044:            public CalendarMonthChangeEvent(HtmlCalendar source, int oldMonth,
045:                    int oldYear, int newMonth, int newYear) {
046:                super (source, 0);
047:                _oldMonth = oldMonth;
048:                _oldYear = oldYear;
049:                _newYear = newYear;
050:                _newMonth = newMonth;
051:                _source = source;
052:            }
053:
054:            /**
055:             * This method returns the calendar that generated the event.
056:             */
057:            public HtmlCalendar getCalendar() {
058:                return _source;
059:            }
060:
061:            /**
062:             * This method returns the first day to be displayed on the new month of the calendat
063:             * @return java.util.GregorianCalendar
064:             */
065:            public GregorianCalendar getFirstDayOnCalendar() {
066:
067:                GregorianCalendar g = new GregorianCalendar(_newYear,
068:                        _newMonth, 1);
069:                int dow = g.get(Calendar.DAY_OF_WEEK);
070:
071:                if (dow != 1)
072:                    g.add(Calendar.DATE, ((dow - 1) * -1));
073:
074:                return g;
075:            }
076:
077:            /**
078:             * This method returns the last day displayed on the new month in the calendar.
079:             */
080:            public GregorianCalendar getLastDayOnCalendar() {
081:                GregorianCalendar g = getFirstDayOnCalendar();
082:                g.add(Calendar.DATE, 41);
083:                return g;
084:            }
085:
086:            /**
087:             * This method returns the selected year of the calendar after the change.
088:             */
089:            public int getNewMonth() {
090:                return _newMonth;
091:            }
092:
093:            /**
094:             * This method returns the selected year of the calendar after the change.
095:             */
096:            public int getNewYear() {
097:                return _newYear;
098:            }
099:
100:            /**
101:             * This method returns the selected month of the calendar before the change.
102:             */
103:            public int getOldMonth() {
104:                return _oldMonth;
105:            }
106:
107:            /**
108:             * This method returns the selected year of the calendar before the change.
109:             */
110:            public int getOldYear() {
111:                return _oldYear;
112:            }
113:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.