Source Code Cross Referenced for SArea.java in  » Swing-Library » Swinglets » com » javelin » swinglets » 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 » Swinglets » com.javelin.swinglets 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright Javelin Software, All rights reserved.
003:         */
004:
005:        package com.javelin.swinglets;
006:
007:        import java.awt.*;
008:        import java.util.*;
009:        import java.io.*;
010:
011:        /**
012:         * SArea defines an area in an SImage that can be associated with
013:         * text and links.
014:         * <P>
015:         * The SArea class is based on HTML ImageMap semantics. It can
016:         * be used to create RECTANGLE, CIRCLE or POLYGON area.
017:         * 
018:         * @author Robin Sharp
019:         */
020:
021:        import java.awt.*;
022:        import java.io.*;
023:        import java.util.*;
024:
025:        public class SArea {
026:            /**
027:             * This is a Rectangle. The Rectange property is valid.
028:             */
029:            public final static String RECTANGLE = "RECT";
030:
031:            /**
032:             * This is a Circle. The Point and radius properties are valid.
033:             */
034:            public final static String CIRCLE = "CIRCLE";
035:
036:            /**
037:             * This is a Polygon. The Points Enumeration property is valid.
038:             */
039:            public final static String POLYGON = "POLY";
040:
041:            /**
042:             * Construct a Rectangular area, without a link.
043:             */
044:            public SArea(Rectangle rectangle, String text) {
045:                this .shape = RECTANGLE;
046:                this .rectangle = rectangle;
047:                this .text = text;
048:            }
049:
050:            /**
051:             * Construct a Rectangular area, with a link.
052:             */
053:            public SArea(Rectangle rectangle, String text, SLink link) {
054:                this .shape = RECTANGLE;
055:                this .rectangle = rectangle;
056:                this .text = text;
057:                this .link = link;
058:            }
059:
060:            /**
061:             * Construct a Circular area, without a link.
062:             */
063:            public SArea(Point point, int radius, String text) {
064:                this .shape = CIRCLE;
065:                this .point = point;
066:                this .radius = radius;
067:                this .text = text;
068:            }
069:
070:            /**
071:             * Construct a Circular area, with a link.
072:             */
073:            public SArea(Point point, int radius, String text, SLink link) {
074:                this .shape = CIRCLE;
075:                this .point = point;
076:                this .radius = radius;
077:                this .text = text;
078:                this .link = link;
079:            }
080:
081:            /**
082:             * Construct a Polygon area, without a link.
083:             */
084:            public SArea(Polygon polygon, String text) {
085:                this .shape = POLYGON;
086:                this .polygon = polygon;
087:                this .text = text;
088:            }
089:
090:            /**
091:             * Construct a Polygon area, with a link.
092:             */
093:            public SArea(Polygon polygon, String text, SLink link) {
094:                this .shape = POLYGON;
095:                this .polygon = polygon;
096:                this .text = text;
097:                this .link = link;
098:            }
099:
100:            /**
101:             * Get the Shape
102:             */
103:            public String getShape() {
104:                return shape;
105:            }
106:
107:            /**
108:             * Get the Text
109:             */
110:            public String getText() {
111:                return text;
112:            }
113:
114:            /**
115:             * Set the SLink
116:             */
117:            public SArea setText(String text) {
118:                this .text = text;
119:                return this ;
120:            }
121:
122:            /**
123:             * Get the SLink
124:             */
125:            public SLink getLink() {
126:                return link;
127:            }
128:
129:            /**
130:             * Set the SLink
131:             */
132:            public SArea setLink(SLink link) {
133:                this .link = link;
134:                return this ;
135:            }
136:
137:            // RECTANGLE ////////////////////////////////////////////////
138:
139:            /**
140:             * Get the Rectangle
141:             */
142:            public Rectangle getRectangle() {
143:                return rectangle;
144:            }
145:
146:            /**
147:             * Set the Rectangle
148:             */
149:            public void setRectangle(Rectangle rectangle) {
150:                this .rectangle = rectangle;
151:            }
152:
153:            // CIRCLE ////////////////////////////////////////////////
154:
155:            /**
156:             * Get the Point
157:             */
158:            public Point getPoint() {
159:                return point;
160:            }
161:
162:            /**
163:             * Set the Rectangle
164:             */
165:            public SArea setPoint(Point point) {
166:                this .point = point;
167:                return this ;
168:            }
169:
170:            /**
171:             * Get the Radius
172:             */
173:            public int getRadius() {
174:                return radius;
175:            }
176:
177:            /**
178:             * Set the Radius
179:             */
180:            public SArea setRadius(int radius) {
181:                this .radius = radius;
182:                return this ;
183:            }
184:
185:            // POLYGON /////////////////////////////////////////////////
186:
187:            /**
188:             * Get the Polygon
189:             */
190:            public Polygon getPolygon() {
191:                return polygon;
192:            }
193:
194:            /**
195:             * Set the Rectangle
196:             */
197:            public SArea setPolygon(Polygon polygon) {
198:                this .polygon = polygon;
199:                return this ;
200:            }
201:
202:            // PRIVATE /////////////////////////////////////////////////
203:
204:            protected String shape;
205:            protected String text;
206:            protected SLink link;
207:
208:            protected Rectangle rectangle;
209:
210:            protected Point point;
211:            protected int radius;
212:
213:            protected Polygon polygon;
214:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.