Source Code Cross Referenced for Welcome.java in  » XML-UI » xui32 » com » xoetrope » svgcomponentswizard » 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 » XML UI » xui32 » com.xoetrope.svgcomponentswizard 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Welcome.java
003:         *
004:         * Created on 16 March 2007, 09:37
005:         *
006:         * To change this template, choose Tools | Template Manager
007:         * and open the template in the editor.
008:         */
009:
010:        package com.xoetrope.svgcomponentswizard;
011:
012:        import com.xoetrope.tools.XCircularBackground;
013:        import java.awt.Component;
014:        import java.awt.Font;
015:        import java.awt.event.MouseEvent;
016:        import java.awt.event.MouseListener;
017:        import javax.swing.SwingUtilities;
018:        import net.xoetrope.swing.XImageButton;
019:        import net.xoetrope.swing.XPanel;
020:        import net.xoetrope.swing.dnd.XTransferHandlerFactory;
021:        import net.xoetrope.xui.XPage;
022:        import net.xoetrope.xui.XPageManager;
023:        import net.xoetrope.xui.XProjectManager;
024:
025:        /**
026:         *
027:         * @author kingsley.elmes
028:         */
029:        public class Welcome extends XPage implements  MouseListener {
030:            protected XImageButton imagesButton, magButton, catalogButton,
031:                    rolloverButton, rockerButton, guageButton;
032:            protected XPanel imagesPanel, magPanel, catalogPanel,
033:                    rolloverPanel, descriptionPanel, listenerPanel;
034:            protected XTransferHandlerFactory factory;
035:            protected XCircularBackground background;
036:
037:            /** Creates a new instance of Welcome */
038:            public Welcome() {
039:                factory = XTransferHandlerFactory.getInstance(project);
040:            }
041:
042:            /**
043:             * Add mouse listener to each button and set-up circular background panel. 
044:             */
045:            public void pageCreated() {
046:                imagesButton = (XImageButton) findComponent("imagesBtn");
047:                magButton = (XImageButton) findComponent("magBtn");
048:                catalogButton = (XImageButton) findComponent("catalogBtn");
049:                rolloverButton = (XImageButton) findComponent("rolloverBtn");
050:                rockerButton = (XImageButton) findComponent("rockerBtn");
051:                guageButton = (XImageButton) findComponent("guageBtn");
052:
053:                descriptionPanel = (XPanel) findComponent("descriptionPanel");
054:                listenerPanel = (XPanel) findComponent("listenerPanel");
055:
056:                imagesButton.addMouseListener(this );
057:                magButton.addMouseListener(this );
058:                catalogButton.addMouseListener(this );
059:                rolloverButton.addMouseListener(this );
060:                rockerButton.addMouseListener(this );
061:                guageButton.addMouseListener(this );
062:                listenerPanel.addMouseListener(this );
063:
064:                background = new XCircularBackground();
065:                background.setCircleRotation(0.0);
066:                background
067:                        .setRotatedText("    SVG Components Wizard       SVG Components Wizard       SVG Components Wizard");
068:                //    background.setAlignTopLeft( false );
069:
070:                descriptionPanel.setPainter(background);
071:            }
072:
073:            /**
074:             * Set the text to be displayed in the circular background panel component and set it visible.
075:             */
076:            public void pageActivated() {
077:                background.setFont(new Font("Arial", Font.BOLD, 14));
078:                background
079:                        .setCenterText("The SVG Components Wizard gives the user an overview of how the various SVG "
080:                                + "components provided by Carousel can be used for mapping, facilities management, "
081:                                + "drawing and visualization. The wizard provides options to filter SVG images for "
082:                                + "certain types and view them, magnify svg images with the aid of the magnifying "
083:                                + "window and magnifying glass components, view a catalog of products with a shopping "
084:                                + "cart to drag and drop products too and a details panel displaying details about each product "
085:                                + "and lastly, a demo of the component rollover and svg rollover features is shown.");
086:                descriptionPanel.setVisible(true);
087:            }
088:
089:            public void mouseEntered(final MouseEvent e) {
090:                SwingUtilities.invokeLater(new Runnable() {
091:                    public void run() {
092:                        togglePanels(e.getSource());
093:                    }
094:                });
095:            }
096:
097:            public void mouseExited(MouseEvent e) {
098:            }
099:
100:            /**
101:             * Toggle the current display status of the background panel based on the 
102:             * object that fired the mouse event.
103:             * @param source <CODE>Object</CODE> that fired the smouse event.  
104:             */
105:            private void togglePanels(Object source) {
106:                if (source == imagesButton) {
107:                    background.setCircleRotation(45.0);
108:                    background
109:                            .setCenterText("View a set of SVG images with automatic enlargement and preview of the images as the mouse rolls over the components. The preview is useful for both highlighting important information and for selection purposes.");
110:                } else if (source == magButton) {
111:                    background.setCircleRotation(37.0);
112:                    background
113:                            .setCenterText("Magnify SVG images using a magnifying glass or an airplane view. The magnifier saves some space over the airplane view as it does not need a window of its own. The magnifier rotates so that the enlarged view is always visible within the client area of the image.");
114:                } else if (source == catalogButton) {
115:                    background.setCircleRotation(22.0);
116:                    background
117:                            .setCenterText("Display a catalog of items with stats and information. The catalog integrates SVG components and normal Swing components using painters and other such mechanisms. Using this catalog SVG images are display in a shopping cart and can be dragged and dropped.");
118:                } else if (source == rolloverButton) {
119:                    background.setCircleRotation(15.0);
120:                    background
121:                            .setCenterText("Mouse over certain parts of the svg images to display rollover components. Again rollovers are used to highlight a area of an SVG, in this case the rollover is an expanded version of the item under the cursor.");
122:                } else if (source == rockerButton) {
123:                    background.setCircleRotation(8.0);
124:                    background
125:                            .setCenterText("View an SVG rocker component that can be used for panning images left, right, up and down. This example displays a layered SVG image, where the layers are turned on or off to give rollover and mouse pressed effects.");
126:                } else if (source == guageButton) {
127:                    background.setCircleRotation(1.0);
128:                    background
129:                            .setCenterText("View an SVG guage component in which the needle can be rotated using mouse clicks. Animation is used to show some of the capabilities of SVG and add greater interactivity. Click on the needle while holding or releasing the CTRL key to move the guage's needle.");
130:                }
131:                descriptionPanel.repaint();
132:            }
133:
134:            /**
135:             * Show page method which is called to display one of the wizard's pages. 
136:             */
137:            public void showPage() {
138:                XPageManager pageMgr = XProjectManager.getPageManager();
139:                String page = ((Component) getCurrentEvent().getSource())
140:                        .getName();
141:                String destination = ((String) getAttribute("dest", page));
142:
143:                if (destination.equals("Images"))
144:                    background.setCircleRotation(45.0);
145:                else if (destination.equals("Magnification"))
146:                    background.setCircleRotation(37.0);
147:                else if (destination.equals("Catalog"))
148:                    background.setCircleRotation(22.0);
149:                else if (destination.equals("Rollover"))
150:                    background.setCircleRotation(15.0);
151:                else if (destination.equals("SvgRocker"))
152:                    background.setCircleRotation(8.0);
153:                else if (destination.equals("SvgGuage"))
154:                    background.setCircleRotation(8.0);
155:
156:                pageMgr.showPage(destination);
157:            }
158:
159:            public void mouseClicked(MouseEvent e) {
160:            }
161:
162:            public void mousePressed(MouseEvent e) {
163:            }
164:
165:            public void mouseReleased(MouseEvent e) {
166:            }
167:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.