All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.demos.travel.Itinerary

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----com.ibm.beans.demos.travel.Itinerary

public class Itinerary
extends Panel
implements Serializable, FlightRequestedListener, FlightReservedListener
The Itinerary class displays the Travel planner UI.

The Itinerary contains:

  1. Header GIF
  2. 0 or more "legs of trip"
  3. 0 a row of buttons
  4. Footer GIF


Constructor Index

 o Itinerary()
Constructs an Itinerary

Method Index

 o addFlightRequestedListener(FlightRequestedListener)
Adds listeners for FlightRequestedEvents.
 o addTravelInfoChangedListener(TravelInfoChangedListener)
Adds listeners for TravelInfoChangedEvents.
 o fireFlightRequested()
Initiates a FlightRequestedEvent to all registered listeners.
 o fireTravelInfoChanged(ItineraryFlightSubInfo)
Initiates a TravelInfoChangedEvent to all registered listeners.
 o FlightRequested(FlightRequestedEvent)
Invoked by the flight information viewer bean when a flight has been selected.
 o FlightReserved(FlightReservedEvent)
Responds to the FlightReserved event.
 o getCurrentItineraryFlightSubInfo()
Returns the ItineraryFlightSubInfo object currently in focus (the last one to call setCurrentItineraryFlightSubInfo).
 o getPreferredSize()
Returns the preferred size of the Itinerary UI.
 o removeFlightRequestedListener(FlightRequestedListener)
Removes listeners for FlightRequestedEvents.
 o removeTravelInfoChangedListener(TravelInfoChangedListener)
Removes listeners for TravelInfoChangedEvents.
 o setCurrentItineraryFlightSubInfo(ItineraryFlightSubInfo)
Sets the given ItineraryFlightSubInfo object to be the one currently "in focus".
 o setFooter(Component)
Sets the footer panel of the Itinerary.
 o setHeader(Component)
Sets the header panel of the Itinerary.

Constructors

 o Itinerary
 public Itinerary()
Constructs an Itinerary

Methods

 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of the Itinerary UI.

Returns:
A Dimension object indicating the component's preferred size is returned.
Overrides:
getPreferredSize in class Container
 o setHeader
 public void setHeader(Component c)
Sets the header panel of the Itinerary.

Parameters:
c - The component (typically a GIF image) to be put in the header.
 o setFooter
 public void setFooter(Component c)
Sets the footer panel of the Itinerary.

Parameters:
c - The component (typically a GIF image) to be put in the footer.
 o fireTravelInfoChanged
 public void fireTravelInfoChanged(ItineraryFlightSubInfo ifsi)
Initiates a TravelInfoChangedEvent to all registered listeners. It is called by an ItineraryFlightSubInfo object when the user modifies its travel information.

Parameters:
ifsi - The ItineraryFlightSubInfo panel whose travel information has been changed by the user.
 o fireFlightRequested
 public void fireFlightRequested()
Initiates a FlightRequestedEvent to all registered listeners. It is called by the Adapter when the user presses the "TICKET" button.

 o FlightReserved
 public void FlightReserved(FlightReservedEvent fRE)
Responds to the FlightReserved event. It is Invoked by the flight information data access part bean to signify that a flight has been successfully reserved.

Parameters:
fRE - The FlightReservedEvent, which contains flight reservation information.
 o addTravelInfoChangedListener
 public synchronized void addTravelInfoChangedListener(TravelInfoChangedListener l)
Adds listeners for TravelInfoChangedEvents.

Parameters:
l - Indicates the object implementing the TravelInfoChangedListener interface that wants to listen for TravelInfoChangedEvents.
 o removeTravelInfoChangedListener
 public synchronized void removeTravelInfoChangedListener(TravelInfoChangedListener l)
Removes listeners for TravelInfoChangedEvents.

Parameters:
l - Indicates the object implementing the TravelInfoChangedListener interface that no longer wants to listen for TravelInfoChangedEvents.
 o addFlightRequestedListener
 public synchronized void addFlightRequestedListener(FlightRequestedListener l)
Adds listeners for FlightRequestedEvents.

Parameters:
l - Indicates the object implementing the FlightRequestedListener interface that wants to listen for FlightRequestedEvents.
 o removeFlightRequestedListener
 public synchronized void removeFlightRequestedListener(FlightRequestedListener l)
Removes listeners for FlightRequestedEvents.

Parameters:
l - Indicates the object implementing the FlightRequestedListener interface that no longer wants to listen for FlightRequestedEvents.
 o FlightRequested
 public void FlightRequested(FlightRequestedEvent fre)
Invoked by the flight information viewer bean when a flight has been selected.

Parameters:
fre - The FlightRequestedEvent, which contains flight reservation information.
 o setCurrentItineraryFlightSubInfo
 public void setCurrentItineraryFlightSubInfo(ItineraryFlightSubInfo ifsi)
Sets the given ItineraryFlightSubInfo object to be the one currently "in focus".

Parameters:
ifsi - The ItineraryFlightSubInfo object making the call.
 o getCurrentItineraryFlightSubInfo
 public ItineraryFlightSubInfo getCurrentItineraryFlightSubInfo()
Returns the ItineraryFlightSubInfo object currently in focus (the last one to call setCurrentItineraryFlightSubInfo).

Returns:
The ItineraryFlightSubInfo object currently in focus is returned.

All Packages  Class Hierarchy  This Package  Previous  Next  Index