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:
- Header GIF
- 0 or more "legs of trip"
- 0 a row of buttons
- Footer GIF
-
Itinerary()
- Constructs an Itinerary
-
addFlightRequestedListener(FlightRequestedListener)
- Adds listeners for FlightRequestedEvents.
-
addTravelInfoChangedListener(TravelInfoChangedListener)
- Adds listeners for TravelInfoChangedEvents.
-
fireFlightRequested()
- Initiates a FlightRequestedEvent to all
registered listeners.
-
fireTravelInfoChanged(ItineraryFlightSubInfo)
- Initiates a TravelInfoChangedEvent to all
registered listeners.
-
FlightRequested(FlightRequestedEvent)
- Invoked by the flight information
viewer bean when a flight has been selected.
-
FlightReserved(FlightReservedEvent)
- Responds to the FlightReserved event.
-
getCurrentItineraryFlightSubInfo()
- Returns the ItineraryFlightSubInfo object currently
in focus (the last one to call setCurrentItineraryFlightSubInfo).
-
getPreferredSize()
- Returns the preferred size of the Itinerary UI.
-
removeFlightRequestedListener(FlightRequestedListener)
- Removes listeners for FlightRequestedEvents.
-
removeTravelInfoChangedListener(TravelInfoChangedListener)
- Removes listeners for TravelInfoChangedEvents.
-
setCurrentItineraryFlightSubInfo(ItineraryFlightSubInfo)
- Sets the given ItineraryFlightSubInfo object to be
the one currently "in focus".
-
setFooter(Component)
- Sets the footer panel of the Itinerary.
-
setHeader(Component)
- Sets the header panel of the Itinerary.
Itinerary
public Itinerary()
- Constructs an Itinerary
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
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.
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.
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.
fireFlightRequested
public void fireFlightRequested()
- Initiates a FlightRequestedEvent to all
registered listeners. It is called by the Adapter when the
user presses the "TICKET" button.
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.
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.
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.
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.
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.
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.
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.
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