01: package net.xoetrope.samples.travel;
02:
03: import java.awt.Color;
04:
05: import net.xoetrope.awt.XImage;
06: import net.xoetrope.awt.XLabel;
07: import net.xoetrope.xui.XPage;
08: import net.xoetrope.xui.XProjectManager;
09:
10: /**
11: * <p>Title: Xui</p>
12: * <p>Description: </p>
13: * <p>Copyright: Copyright (c) Xoetrope Ltd., 1998-2003</p>
14: * <p>Company: Xoetrope Ltd.</p>
15: * @author not attributable
16: * @version 1.0
17: */
18:
19: public class AirportMapIndex extends XPage {
20:
21: XLabel lblPrompt, lblArrivals, lblDepartures, lblAirport,
22: lblDublin;
23: XImage imgBack;
24:
25: public AirportMapIndex() {
26: setBackground(Color.white);
27: imgBack = (XImage) componentFactory.addComponent(XPage.IMAGE,
28: 220, 10, 18, 14, "home.gif");
29: lblPrompt = (XLabel) componentFactory.addComponent(XPage.LABEL,
30: 10, 10, 300, 30, "Please select the map you require!",
31: "prompt");
32: lblArrivals = (XLabel) componentFactory.addComponent(
33: XPage.LABEL, 10, 50, 220, 30, "Arrivals", "link/on");
34: lblDepartures = (XLabel) componentFactory.addComponent(
35: XPage.LABEL, 10, 100, 220, 30, "Departures", "link");
36: lblAirport = (XLabel) componentFactory.addComponent(
37: XPage.LABEL, 10, 150, 220, 30, "Airport", "link");
38: lblDublin = (XLabel) componentFactory.addComponent(XPage.LABEL,
39: 10, 200, 220, 30, "Dublin", "link");
40: mapEvents();
41: }
42:
43: public void mapEvents() {
44: addMouseHandler(lblArrivals, "showArrivals");
45: addMouseHandler(imgBack, "goHome");
46: }
47:
48: public void goHome() {
49: if (wasMouseClicked())
50: XProjectManager.getPageManager().showPage("Services");
51: }
52:
53: public void showArrivals() {
54: if (wasMouseClicked())
55: XProjectManager.getPageManager().showPage("ArrivalsMap");
56: }
57: }
|