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
-
b401kViewer()
- Constructs an instance of the b401kViewer bean.
-
addPercentListener(PercentListener)
- Allows other beans to listen to the PercentChanged events this bean generates.
-
b401kInformationChanged(b401kEvent)
- Responds to a b401kInformationChanged event.
-
firePercent(PercentEvent)
- Notifies all registered listeners that a PercentChanged event has
occurred.
-
getInsets()
- Set the insets for the b401kViewer.
-
getMinimumSize()
- Return the minimum size of the b401kViewer bean.
-
initialize()
- Initialize and build the graphical user interface for the b401kViewer bean.
-
itemStateChanged(ItemEvent)
- Responds to an ItemEvent.
-
paint(Graphics)
- Draws the title string when this bean is displayed at design time.
-
removePercentListener(PercentListener)
- Allows beans to remove themselves from the listener list for this bean's
PercentChanged event.
b401kViewer
public b401kViewer()
- Constructs an instance of the b401kViewer bean. The constructor
initializes instance data.
paint
public void paint(Graphics g)
- Draws the title string when this bean is displayed at design time.
- Overrides:
- paint in class Container
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
initialize
public void initialize()
- Initialize and build the graphical user interface for the b401kViewer bean.
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
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
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
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.
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
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