KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > faces > samples > components > model > ImageArea


1 /*
2  * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
3  *
4  * Redistribution and use in source and binary forms, with or
5  * without modification, are permitted provided that the following
6  * conditions are met:
7  *
8  * - Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * - Redistribution in binary form must reproduce the above
12  * copyright notice, this list of conditions and the following
13  * disclaimer in the documentation and/or other materials
14  * provided with the distribution.
15  *
16  * Neither the name of Sun Microsystems, Inc. or the names of
17  * contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * This software is provided "AS IS," without a warranty of any
21  * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
22  * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
24  * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
25  * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
26  * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
27  * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
28  * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
29  * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
30  * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
31  * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
32  * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
33  *
34  * You acknowledge that this software is not designed, licensed or
35  * intended for use in the design, construction, operation or
36  * maintenance of any nuclear facility.
37  */

38
39 package org.apache.cocoon.faces.samples.components.model;
40
41
42 import java.io.Serializable JavaDoc;
43
44
45 /**
46  * <p>{@link ImageArea} is a JavaBean that represents a hotspot in an
47  * image map. Within a particular image map, no two hotspots may have
48  * the same alternate text, because this is treated as a key.</p>
49  */

50
51 public class ImageArea implements Serializable JavaDoc {
52
53
54     // ------------------------------------------------------------ Constructors
55

56
57     /**
58      * <p>Construct an uninitialized {@link ImageArea} instance.</p>
59      */

60     public ImageArea() {
61     }
62
63
64     /**
65      * <p>Construct an {@link ImageArea} initialized with the specified
66      * property values.</p>
67      *
68      * @param alt Alternate text for this hotspot
69      * @param coords Coordinate positions for this hotspot
70      * @param shape Shape of this hotspot (default, rect, circle, poly)
71      */

72     public ImageArea(String JavaDoc alt, String JavaDoc coords, String JavaDoc shape) {
73         setAlt(alt);
74         setCoords(coords);
75         setShape(shape);
76     }
77
78
79     // -------------------------------------------------------------- Properties
80

81
82     private String JavaDoc alt = null;
83
84
85     /**
86      * <p>Return the alternate text for this hotspot.</p>
87      */

88     public String JavaDoc getAlt() {
89         return (this.alt);
90     }
91
92
93     /**
94      * <p>Set the alternate text for this hotspot.</p>
95      *
96      * @param alt The new alternate text
97      */

98     public void setAlt(String JavaDoc alt) {
99         this.alt = alt;
100     }
101
102
103     private String JavaDoc coords = null;
104
105
106     /**
107      * <p>Return the coordinate positions for this hotspot.</p>
108      */

109     public String JavaDoc getCoords() {
110         return (this.coords);
111     }
112
113
114     /**
115      * <p>Set the coordinate positions for this hotspot.</p>
116      *
117      * @param coords The new coordinate positions
118      */

119     public void setCoords(String JavaDoc coords) {
120         this.coords = coords;
121     }
122
123
124     private String JavaDoc shape = null;
125
126
127     /**
128      * <p>Return the shape for this hotspot.</p>
129      */

130     public String JavaDoc getShape() {
131         return (this.shape);
132     }
133
134
135     /**
136      * <p>Set the shape for this hotspot.</p>
137      *
138      * @param shape The new shape
139      */

140     public void setShape(String JavaDoc shape) {
141         this.shape = shape;
142     }
143
144
145 }
146
Popular Tags