Source Code Cross Referenced for SAnchor.java in  » Swing-Library » wings3 » org » wings » 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 
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;
014:
015:        import org.wings.plaf.AnchorCG;
016:
017:        import java.net.URL;
018:
019:        /**
020:         * Container used to force a HTML Link.
021:         * <p/>
022:         * Creates a 'normal'
023:         * &lt;a href=&quot;http://whatever/&quot;&gt;...&lt;/a&gt;
024:         * HTML link around some components that are stored in the container.
025:         *
026:         * @author <a href="mailto:H.Zeller@acm.org">Henner Zeller</a>
027:         */
028:        public class SAnchor extends SContainer {
029:
030:            /**
031:             * the URL to link to.
032:             */
033:            protected SimpleURL url;
034:
035:            /**
036:             * the target frame/window.
037:             */
038:            protected String target;
039:
040:            /**
041:             * creates an anchor with emtpy URL and target.
042:             */
043:            public SAnchor() {
044:                this (new SimpleURL("#"), null);
045:            }
046:
047:            /**
048:             * create an anchor that points to the URL url.
049:             *
050:             * @param url the url to point to.
051:             */
052:            public SAnchor(String url) {
053:                this (url, null);
054:            }
055:
056:            /**
057:             * creates an anchor that points to the URL and is openend
058:             * in the frame or window named target.
059:             *
060:             * @param url    the url to link to.
061:             * @param target the target window or frame.
062:             */
063:            public SAnchor(String url, String target) {
064:                setURL(url);
065:                setTarget(target);
066:            }
067:
068:            /**
069:             * creates an anchor that points to the URL and is openend
070:             * in the frame or window named target.
071:             *
072:             * @param url    the url to link to.
073:             * @param target the target window or frame.
074:             */
075:            public SAnchor(SimpleURL url, String target) {
076:                setURL(url);
077:                setTarget(target);
078:            }
079:
080:            /**
081:             * set the url this anchor points to.
082:             *
083:             * @param ref the url.
084:             */
085:            public void setURL(URL ref) {
086:                if (ref != null) {
087:                    setURL(ref.toString());
088:                } else {
089:                    setURL((SimpleURL) null);
090:                }
091:            }
092:
093:            /**
094:             * set the url this anchor points to.
095:             *
096:             * @param r the url.
097:             */
098:            public void setURL(SimpleURL r) {
099:                SimpleURL oldURL = url;
100:                url = r;
101:                if (url == null && oldURL != null
102:                        || (url != null && !url.equals(oldURL))) {
103:                    reload();
104:                }
105:            }
106:
107:            /**
108:             * set the url this anchor points to.
109:             *
110:             * @param url the url.
111:             */
112:            public void setURL(String url) {
113:                setURL(new SimpleURL(url));
114:            }
115:
116:            /**
117:             * set the name of the target frame/window.
118:             */
119:            public void setTarget(String t) {
120:                target = t;
121:            }
122:
123:            /**
124:             * get the name of the target frame/window.
125:             */
126:            public String getTarget() {
127:                return target;
128:            }
129:
130:            /**
131:             * get the url the anchor points to.
132:             */
133:            public SimpleURL getURL() {
134:                return url;
135:            }
136:
137:            public void setCG(AnchorCG cg) {
138:                super.setCG(cg);
139:            }
140:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.