3441 |
13 Oct 09 |
olle |
1 |
/* |
3441 |
13 Oct 09 |
olle |
$Id$ |
3441 |
13 Oct 09 |
olle |
3 |
|
3441 |
13 Oct 09 |
olle |
Copyright (C) 2009 Gregory Vincic |
3441 |
13 Oct 09 |
olle |
5 |
|
3441 |
13 Oct 09 |
olle |
Files are copyright by their respective authors. The contributions to |
3441 |
13 Oct 09 |
olle |
files where copyright is not explicitly stated can be traced with the |
3441 |
13 Oct 09 |
olle |
source code revision system. |
3441 |
13 Oct 09 |
olle |
9 |
|
3441 |
13 Oct 09 |
olle |
This file is part of Proteios. |
3441 |
13 Oct 09 |
olle |
Available at http://www.proteios.org/ |
3441 |
13 Oct 09 |
olle |
12 |
|
3441 |
13 Oct 09 |
olle |
proteios-2.x is free software; you can redistribute it and/or |
3441 |
13 Oct 09 |
olle |
modify it under the terms of the GNU General Public License |
3441 |
13 Oct 09 |
olle |
as published by the Free Software Foundation; either version 2 |
3441 |
13 Oct 09 |
olle |
of the License, or (at your option) any later version. |
3441 |
13 Oct 09 |
olle |
17 |
|
3441 |
13 Oct 09 |
olle |
Proteios is distributed in the hope that it will be useful, |
3441 |
13 Oct 09 |
olle |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
3441 |
13 Oct 09 |
olle |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3441 |
13 Oct 09 |
olle |
GNU General Public License for more details. |
3441 |
13 Oct 09 |
olle |
22 |
|
3441 |
13 Oct 09 |
olle |
You should have received a copy of the GNU General Public License |
3441 |
13 Oct 09 |
olle |
along with this program; if not, write to the Free Software |
3441 |
13 Oct 09 |
olle |
Foundation, Inc., 59 Temple Place - Suite 330, |
3441 |
13 Oct 09 |
olle |
Boston, MA 02111-1307, USA. |
3441 |
13 Oct 09 |
olle |
27 |
*/ |
3441 |
13 Oct 09 |
olle |
28 |
package org.proteios.gui; |
3441 |
13 Oct 09 |
olle |
29 |
|
3441 |
13 Oct 09 |
olle |
30 |
|
3441 |
13 Oct 09 |
olle |
31 |
/** |
3441 |
13 Oct 09 |
olle |
* @author olle |
3441 |
13 Oct 09 |
olle |
33 |
*/ |
3441 |
13 Oct 09 |
olle |
34 |
public class ImageMapArea |
3441 |
13 Oct 09 |
olle |
35 |
extends GUIElement<ImageMapArea> |
3441 |
13 Oct 09 |
olle |
36 |
{ |
3441 |
13 Oct 09 |
olle |
37 |
private int xTopLeft = 0; |
3441 |
13 Oct 09 |
olle |
38 |
private int yTopLeft = 0; |
3441 |
13 Oct 09 |
olle |
39 |
private int xBottomRight = 0; |
3441 |
13 Oct 09 |
olle |
40 |
private int yBottomRight = 0; |
3441 |
13 Oct 09 |
olle |
41 |
private String hrefStr = null; |
3441 |
13 Oct 09 |
olle |
42 |
private String toolTipStr = null; |
3441 |
13 Oct 09 |
olle |
43 |
|
3441 |
13 Oct 09 |
olle |
44 |
|
3441 |
13 Oct 09 |
olle |
45 |
/** |
3441 |
13 Oct 09 |
olle |
* Get x top left value in pixels. |
3441 |
13 Oct 09 |
olle |
47 |
* |
3441 |
13 Oct 09 |
olle |
* @return int The x top left value in pixels. |
3441 |
13 Oct 09 |
olle |
49 |
*/ |
3441 |
13 Oct 09 |
olle |
50 |
public int getXTopLeft() |
3441 |
13 Oct 09 |
olle |
51 |
{ |
3441 |
13 Oct 09 |
olle |
52 |
return this.xTopLeft; |
3441 |
13 Oct 09 |
olle |
53 |
} |
3441 |
13 Oct 09 |
olle |
54 |
|
3441 |
13 Oct 09 |
olle |
55 |
|
3441 |
13 Oct 09 |
olle |
56 |
/** |
3441 |
13 Oct 09 |
olle |
* Set x top left value in pixels. |
3441 |
13 Oct 09 |
olle |
58 |
* |
3441 |
13 Oct 09 |
olle |
* @param xTopLeft int The x top left value in pixels to set. |
3441 |
13 Oct 09 |
olle |
60 |
*/ |
3441 |
13 Oct 09 |
olle |
61 |
public void setXTopLeft(int xTopLeft) |
3441 |
13 Oct 09 |
olle |
62 |
{ |
3441 |
13 Oct 09 |
olle |
63 |
this.xTopLeft = xTopLeft; |
3441 |
13 Oct 09 |
olle |
64 |
} |
3441 |
13 Oct 09 |
olle |
65 |
|
3441 |
13 Oct 09 |
olle |
66 |
|
3441 |
13 Oct 09 |
olle |
67 |
/** |
3441 |
13 Oct 09 |
olle |
* Get y top left value in pixels. |
3441 |
13 Oct 09 |
olle |
69 |
* |
3441 |
13 Oct 09 |
olle |
* @return int The y top left value in pixels. |
3441 |
13 Oct 09 |
olle |
71 |
*/ |
3441 |
13 Oct 09 |
olle |
72 |
public int getYTopLeft() |
3441 |
13 Oct 09 |
olle |
73 |
{ |
3441 |
13 Oct 09 |
olle |
74 |
return this.yTopLeft; |
3441 |
13 Oct 09 |
olle |
75 |
} |
3441 |
13 Oct 09 |
olle |
76 |
|
3441 |
13 Oct 09 |
olle |
77 |
|
3441 |
13 Oct 09 |
olle |
78 |
/** |
3441 |
13 Oct 09 |
olle |
* Set y top left value in pixels. |
3441 |
13 Oct 09 |
olle |
80 |
* |
3441 |
13 Oct 09 |
olle |
* @param yTopLeft int The y top left value in pixels to set. |
3441 |
13 Oct 09 |
olle |
82 |
*/ |
3441 |
13 Oct 09 |
olle |
83 |
public void setYTopLeft(int yTopLeft) |
3441 |
13 Oct 09 |
olle |
84 |
{ |
3441 |
13 Oct 09 |
olle |
85 |
this.yTopLeft = yTopLeft; |
3441 |
13 Oct 09 |
olle |
86 |
} |
3441 |
13 Oct 09 |
olle |
87 |
|
3441 |
13 Oct 09 |
olle |
88 |
|
3441 |
13 Oct 09 |
olle |
89 |
/** |
3441 |
13 Oct 09 |
olle |
* Get x bottom right value in pixels. |
3441 |
13 Oct 09 |
olle |
91 |
* |
3441 |
13 Oct 09 |
olle |
* @return int The x bottom right value in pixels. |
3441 |
13 Oct 09 |
olle |
93 |
*/ |
3441 |
13 Oct 09 |
olle |
94 |
public int getXBottomRight() |
3441 |
13 Oct 09 |
olle |
95 |
{ |
3441 |
13 Oct 09 |
olle |
96 |
return this.xBottomRight; |
3441 |
13 Oct 09 |
olle |
97 |
} |
3441 |
13 Oct 09 |
olle |
98 |
|
3441 |
13 Oct 09 |
olle |
99 |
|
3441 |
13 Oct 09 |
olle |
100 |
/** |
3441 |
13 Oct 09 |
olle |
* Set x bottom right value in pixels. |
3441 |
13 Oct 09 |
olle |
102 |
* |
3441 |
13 Oct 09 |
olle |
* @param xBottomRight int The x bottom right value in pixels to set. |
3441 |
13 Oct 09 |
olle |
104 |
*/ |
3441 |
13 Oct 09 |
olle |
105 |
public void setXBottomRight(int xBottomRight) |
3441 |
13 Oct 09 |
olle |
106 |
{ |
3441 |
13 Oct 09 |
olle |
107 |
this.xBottomRight = xBottomRight; |
3441 |
13 Oct 09 |
olle |
108 |
} |
3441 |
13 Oct 09 |
olle |
109 |
|
3441 |
13 Oct 09 |
olle |
110 |
|
3441 |
13 Oct 09 |
olle |
111 |
/** |
3441 |
13 Oct 09 |
olle |
* Get y bottom right value in pixels. |
3441 |
13 Oct 09 |
olle |
113 |
* |
3441 |
13 Oct 09 |
olle |
* @return int The y bottom right value in pixels. |
3441 |
13 Oct 09 |
olle |
115 |
*/ |
3441 |
13 Oct 09 |
olle |
116 |
public int getYBottomRight() |
3441 |
13 Oct 09 |
olle |
117 |
{ |
3441 |
13 Oct 09 |
olle |
118 |
return this.yBottomRight; |
3441 |
13 Oct 09 |
olle |
119 |
} |
3441 |
13 Oct 09 |
olle |
120 |
|
3441 |
13 Oct 09 |
olle |
121 |
|
3441 |
13 Oct 09 |
olle |
122 |
/** |
3441 |
13 Oct 09 |
olle |
* Set y bottom right value in pixels. |
3441 |
13 Oct 09 |
olle |
124 |
* |
3441 |
13 Oct 09 |
olle |
* @param yBottomRight int The y bottom right value in pixels to set. |
3441 |
13 Oct 09 |
olle |
126 |
*/ |
3441 |
13 Oct 09 |
olle |
127 |
public void setYBottomRight(int yBottomRight) |
3441 |
13 Oct 09 |
olle |
128 |
{ |
3441 |
13 Oct 09 |
olle |
129 |
this.yBottomRight = yBottomRight; |
3441 |
13 Oct 09 |
olle |
130 |
} |
3441 |
13 Oct 09 |
olle |
131 |
|
3441 |
13 Oct 09 |
olle |
132 |
|
3441 |
13 Oct 09 |
olle |
133 |
/** |
3441 |
13 Oct 09 |
olle |
* Get the HTML link href string. |
3441 |
13 Oct 09 |
olle |
135 |
* |
3441 |
13 Oct 09 |
olle |
* @return String The HTML link href string. |
3441 |
13 Oct 09 |
olle |
137 |
*/ |
3441 |
13 Oct 09 |
olle |
138 |
public String getHrefStr() |
3441 |
13 Oct 09 |
olle |
139 |
{ |
3441 |
13 Oct 09 |
olle |
140 |
return this.hrefStr; |
3441 |
13 Oct 09 |
olle |
141 |
} |
3441 |
13 Oct 09 |
olle |
142 |
|
3441 |
13 Oct 09 |
olle |
143 |
|
3441 |
13 Oct 09 |
olle |
144 |
/** |
3441 |
13 Oct 09 |
olle |
* Set the HTML link href string. |
3441 |
13 Oct 09 |
olle |
146 |
* |
3441 |
13 Oct 09 |
olle |
* @param hrefStr String The HTML link href string to set. |
3441 |
13 Oct 09 |
olle |
148 |
*/ |
3441 |
13 Oct 09 |
olle |
149 |
public void setHrefStr(String hrefStr) |
3441 |
13 Oct 09 |
olle |
150 |
{ |
3441 |
13 Oct 09 |
olle |
151 |
this.hrefStr = hrefStr; |
3441 |
13 Oct 09 |
olle |
152 |
} |
3441 |
13 Oct 09 |
olle |
153 |
|
3441 |
13 Oct 09 |
olle |
154 |
|
3441 |
13 Oct 09 |
olle |
155 |
/** |
3441 |
13 Oct 09 |
olle |
* Get the tool-tip string. |
3441 |
13 Oct 09 |
olle |
157 |
* |
3441 |
13 Oct 09 |
olle |
* @return String The tool-tip string. |
3441 |
13 Oct 09 |
olle |
159 |
*/ |
3441 |
13 Oct 09 |
olle |
160 |
public String getToolTipStr() |
3441 |
13 Oct 09 |
olle |
161 |
{ |
3441 |
13 Oct 09 |
olle |
162 |
return this.toolTipStr; |
3441 |
13 Oct 09 |
olle |
163 |
} |
3441 |
13 Oct 09 |
olle |
164 |
|
3441 |
13 Oct 09 |
olle |
165 |
|
3441 |
13 Oct 09 |
olle |
166 |
/** |
3441 |
13 Oct 09 |
olle |
* Set the tool-tip string. |
3441 |
13 Oct 09 |
olle |
168 |
* |
3441 |
13 Oct 09 |
olle |
* @param toolTipStr String The tool-tip string to set. |
3441 |
13 Oct 09 |
olle |
170 |
*/ |
3441 |
13 Oct 09 |
olle |
171 |
public void setToolTipStr(String toolTipStr) |
3441 |
13 Oct 09 |
olle |
172 |
{ |
3441 |
13 Oct 09 |
olle |
173 |
this.toolTipStr = toolTipStr; |
3441 |
13 Oct 09 |
olle |
174 |
} |
3441 |
13 Oct 09 |
olle |
175 |
|
3441 |
13 Oct 09 |
olle |
176 |
|
3441 |
13 Oct 09 |
olle |
177 |
/** |
3441 |
13 Oct 09 |
olle |
* Default constructor |
3441 |
13 Oct 09 |
olle |
179 |
*/ |
3441 |
13 Oct 09 |
olle |
180 |
public ImageMapArea() |
3441 |
13 Oct 09 |
olle |
181 |
{} |
3441 |
13 Oct 09 |
olle |
182 |
|
3441 |
13 Oct 09 |
olle |
183 |
|
3441 |
13 Oct 09 |
olle |
184 |
/** |
3441 |
13 Oct 09 |
olle |
* Constructor with attributes set. |
3441 |
13 Oct 09 |
olle |
186 |
* |
3441 |
13 Oct 09 |
olle |
* @param xTopLeft int The x top left value in pixels to set. |
3441 |
13 Oct 09 |
olle |
* @param yTopLeft int The y top left value in pixels to set. |
3441 |
13 Oct 09 |
olle |
* @param xBottomRight int The x bottom right value in pixels to set. |
3441 |
13 Oct 09 |
olle |
* @param yBottomRight int The y bottom right value in pixels to set. |
3441 |
13 Oct 09 |
olle |
* @param hrefStr String The HTML link href string to set. |
3441 |
13 Oct 09 |
olle |
* @param toolTipStr String The tool-tip string to set. |
3441 |
13 Oct 09 |
olle |
193 |
*/ |
3441 |
13 Oct 09 |
olle |
194 |
public ImageMapArea(int xTopLeft, int yTopLeft, int xBottomRight, int yBottomRight, String hrefStr, String toolTipStr) |
3441 |
13 Oct 09 |
olle |
195 |
{ |
3441 |
13 Oct 09 |
olle |
196 |
setXTopLeft(xTopLeft); |
3441 |
13 Oct 09 |
olle |
197 |
setYTopLeft(yTopLeft); |
3441 |
13 Oct 09 |
olle |
198 |
setXBottomRight(xBottomRight); |
3441 |
13 Oct 09 |
olle |
199 |
setYBottomRight(yBottomRight); |
3441 |
13 Oct 09 |
olle |
200 |
setHrefStr(hrefStr); |
3441 |
13 Oct 09 |
olle |
201 |
setToolTipStr(toolTipStr); |
3441 |
13 Oct 09 |
olle |
202 |
} |
3441 |
13 Oct 09 |
olle |
203 |
} |