package net.xoetrope.samples.travel;
import java.awt.Color;
import net.xoetrope.awt.XImage;
import net.xoetrope.awt.XLabel;
import net.xoetrope.xui.XPage;
import net.xoetrope.xui.XProjectManager;
/**
* <p>Title: Xui</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) Xoetrope Ltd., 1998-2003</p>
* <p>Company: Xoetrope Ltd.</p>
* @author not attributable
* @version 1.0
*/
public class GuidedTourIndex extends XPage
{
XLabel lblPrompt, lblSightSeeing, lbl1916, lblViking, lblMedieval, lblJoyce, lblPub;
XImage imgBack;
public GuidedTourIndex()
{
setBackground( Color.white );
imgBack = (XImage)componentFactory.addComponent( XPage.IMAGE, 220, 10, 18, 14, "home.gif" );
lblPrompt = (XLabel)componentFactory.addComponent( XPage.LABEL, 10, 10, 300, 30, "Please select the service you require!", "prompt" );
lblSightSeeing = (XLabel)componentFactory.addComponent( XPage.LABEL, 10, 50, 220, 30, "Historical tour", "link/on" );
lbl1916 = (XLabel)componentFactory.addComponent( XPage.LABEL, 10, 90, 220, 30, "1916 tour", "link" );
lblViking = (XLabel)componentFactory.addComponent( XPage.LABEL, 10, 130, 220, 30, "Viking tour", "link" );
lblMedieval = (XLabel)componentFactory.addComponent( XPage.LABEL, 10, 170, 220, 30, "Medieval tour", "link" );
lblJoyce = (XLabel)componentFactory.addComponent( XPage.LABEL, 10, 210, 220, 30, "James Joyce tour", "link" );
lblPub = (XLabel)componentFactory.addComponent( XPage.LABEL, 10, 250, 220, 30, "Famous Pubs tour", "link" );
mapEvents();
}
public void mapEvents()
{
addMouseHandler( lblSightSeeing, "showSightSeeing" );
addMouseHandler( imgBack, "goHome" );
}
public void goHome()
{
if ( wasMouseClicked() )
XProjectManager.getPageManager().showPage("Services");
}
public void showSightSeeing()
{
if ( wasMouseClicked() )
XProjectManager.getPageManager().showPage("SightSeeingTourIntro");
}
}
|