Java Reference
In-Depth Information
<bookstore:area id="map1"
value
="#{Book201}"
onmouseover="resources/images/book_201.jpg"
onmouseout="resources/images/book_all.jpg"
targetImage="mapImage" />
To reference the
ImageArea
model object bean values from the component class,
you implement a
getValue
method in the component class. This method calls
su-
per.getValue
. The superclass of
tut-install
/examples/case-studies/
dukes-bookstore/src/java/dukesbookstore/components/AreaCom-
ponent.java
,
UIOutput
, has a
getValue
method that does the work of finding the
ImageArea
object associated with
AreaComponent
. The
AreaRenderer
class,
which needs to render the
alt
,
shape
, and
coords
values from the
ImageArea
ob-
ject, calls the
getValue
method of
AreaComponent
to retrieve the
ImageArea
ob-
ject.
ImageArea iarea = (ImageArea) area.getValue();
ImageArea
is a simple bean, so you can access the shape, coordinates, and alternative
Summary of the Image Map Application Classes
Table 6-2
summarizes all the classes needed to implement the image map component.