All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class primitives.frames.TextBox

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----primitives.frames.TextBox

public class TextBox
extends Applet
implements MouseListener
this class encapsulates a TextBox which displays text of a possible enumeration of texts. The user can switch the display between the possible texts by clicking an appropriate button. the texts are read from the values of the parameters:framei from the applet Tag, The first text is the value of frame0. Set the name of the reciever applet (must be instance of FrameListener) in the reciever parameter of the applet Tag.

See Also:

Variable Index

 o Back
 o bLabels
 o buttons
 o Current
 o currentFrame
The current index of the text shown in the TextArea component.
 o framed
Panel containing TextArea.
 o Next
 o reciever
The object which recieves notification by calling its FrameListener.changeFrame.
 o recieverName
name of the reciever read from the reciever parameter.
 o Restart
 o textFrames
Vector containing the texts from the applet Tag parameters: framei

Constructor Index

 o TextBox()

Method Index

 o destroy()
clears components
 o init()
Creates 2 panels one for the buttons and one for the TextArea and reads the texts to the textFrames object.
 o mouseClicked(MouseEvent)
Locates the FrameListener object with the name of the recieverName field, if successfull calls its changeFrame method and sets the text displayed according to the user action.
 o mouseEntered(MouseEvent)
Not implemented.
 o mouseExited(MouseEvent)
Not implemented.
 o mousePressed(MouseEvent)
Not implemented.
 o mouseReleased(MouseEvent)
Not implemented.
 o start()
displays the first text of the textFrame object.
 o stop()
Sets the reciever to null.

Variables

 o framed
 FrameAreaEx framed
Panel containing TextArea.

 o textFrames
 Vector textFrames
Vector containing the texts from the applet Tag parameters: framei

 o recieverName
 String recieverName
name of the reciever read from the reciever parameter.

 o currentFrame
 int currentFrame
The current index of the text shown in the TextArea component.

 o reciever
 Applet reciever
The object which recieves notification by calling its FrameListener.changeFrame. The reciever should be an instance of a FrameLIstener.

 o Next
 private static final int Next
 o Back
 private static final int Back
 o Restart
 private static final int Restart
 o Current
 private static final int Current
 o buttons
 Button buttons[]
 o bLabels
 private static final String bLabels[]

Constructors

 o TextBox
 public TextBox()

Methods

 o init
 public void init()
Creates 2 panels one for the buttons and one for the TextArea and reads the texts to the textFrames object.

Overrides:
init in class Applet
 o destroy
 public void destroy()
clears components

Overrides:
destroy in class Applet
 o start
 public void start()
displays the first text of the textFrame object. and calls the mouseclick method.

Overrides:
start in class Applet
See Also:
mouseClicked
 o stop
 public void stop()
Sets the reciever to null.

Overrides:
stop in class Applet
 o mouseClicked
 public void mouseClicked(MouseEvent e)
Locates the FrameListener object with the name of the recieverName field, if successfull calls its changeFrame method and sets the text displayed according to the user action.

 o mousePressed
 public void mousePressed(MouseEvent e)
Not implemented.

 o mouseReleased
 public void mouseReleased(MouseEvent e)
Not implemented.

 o mouseEntered
 public void mouseEntered(MouseEvent e)
Not implemented.

 o mouseExited
 public void mouseExited(MouseEvent e)
Not implemented.


All Packages  Class Hierarchy  This Package  Previous  Next  Index