All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.demos.a401k.b401kViewer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----com.ibm.beans.demos.a401k.b401kViewer

public class b401kViewer
extends Panel
implements b401kListener, ItemListener, Serializable

This bean is a simple viewer bean for 401K Investment Portfolio Percentage Information. It is wired to the b401kDap bean which itself is wired to the accountID bean. When a user enters a new account id and hits the submit button, a b401kInformationChanged event is sent from the b401kDap to this viewer with information detailing the names and percentages of that users 401K investment account.

See Also:
b401kDap, b401kListener, PercentEvent, b401kEvent

Constructor Index

 o b401kViewer()
Constructs an instance of the b401kViewer bean.

Method Index

 o addPercentListener(PercentListener)
Allows other beans to listen to the PercentChanged events this bean generates.
 o b401kInformationChanged(b401kEvent)
Responds to a b401kInformationChanged event.
 o firePercent(PercentEvent)
Notifies all registered listeners that a PercentChanged event has occurred.
 o getInsets()
Set the insets for the b401kViewer.
 o getMinimumSize()
Return the minimum size of the b401kViewer bean.
 o initialize()
Initialize and build the graphical user interface for the b401kViewer bean.
 o itemStateChanged(ItemEvent)
Responds to an ItemEvent.
 o paint(Graphics)
Draws the title string when this bean is displayed at design time.
 o removePercentListener(PercentListener)
Allows beans to remove themselves from the listener list for this bean's PercentChanged event.

Constructors

 o b401kViewer
 public b401kViewer()
Constructs an instance of the b401kViewer bean. The constructor initializes instance data.

Methods

 o paint
 public void paint(Graphics g)
Draws the title string when this bean is displayed at design time.

Overrides:
paint in class Container
 o getMinimumSize
 public Dimension getMinimumSize()
Return the minimum size of the b401kViewer bean.

Returns:
The dimensions of the minimum size of the b401kViewer bean.
Overrides:
getMinimumSize in class Container
 o initialize
 public void initialize()
Initialize and build the graphical user interface for the b401kViewer bean.

 o addPercentListener
 public synchronized void addPercentListener(PercentListener pL)
Allows other beans to listen to the PercentChanged events this bean generates. This is the addListener method for all listeners that want to be notified when a PercentChanged event occurs. In the demo, the b401kViewer bean is wired to the b401kDap bean and is notified when the PercentChanged event happens.

Parameters:
pL - The registering listener.
See Also:
removePercentListener
 o removePercentListener
 public synchronized void removePercentListener(PercentListener pL)
Allows beans to remove themselves from the listener list for this bean's PercentChanged event. This is the removeListener method for all listeners that want to be notified when a PercentChanged event occurs. In the demo, the b401kViewer bean is wired to the b401kDap bean and is notified when the PercentChanged event happens.

Parameters:
pL - The unregistering listener.
See Also:
addPercentListener
 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
Responds to an ItemEvent. This method is invoked when a user changes one of the percentages associated with an investment choice. A PercentChanged event is then fired to the b401kDap providing this information.

Parameters:
e - The event signifying that a new percentage has been chosen
 o firePercent
 public void firePercent(PercentEvent pEvt)
Notifies all registered listeners that a PercentChanged event has occurred. In the demo, this event fires in response to a users changing the percentage of one of the investment portfolio choices.

Parameters:
pEvt - The PercentEvent that is the parameter of the PercentChanged event method.
 o b401kInformationChanged
 public void b401kInformationChanged(b401kEvent b401kE)
Responds to a b401kInformationChanged event. This method is invoked by the b401kDap bean when it is wired to the b401kViewer bean and the b401kDap bean receives notification that the 401K Investment Choice Percentages have been updated.

Parameters:
b401kE - The event signifying that a the 401K Investment Choice Percentages have been updated
 o getInsets
 public Insets getInsets()
Set the insets for the b401kViewer.

Returns:
The insets of the b401kViewer bean.
Overrides:
getInsets in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index