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:
-
-
Back
-
-
bLabels
-
-
buttons
-
-
Current
-
-
currentFrame
- The current index of the text shown in the TextArea component.
-
framed
- Panel containing TextArea.
-
Next
-
-
reciever
- The object which recieves notification by calling its FrameListener.changeFrame.
-
recieverName
- name of the reciever read from the reciever parameter.
-
Restart
-
-
textFrames
- Vector containing the texts from the applet Tag parameters: framei
-
TextBox()
-
-
destroy()
- clears components
-
init()
- Creates 2 panels one for the buttons and one for the TextArea
and reads the texts to the textFrames object.
-
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.
-
mouseEntered(MouseEvent)
- Not implemented.
-
mouseExited(MouseEvent)
- Not implemented.
-
mousePressed(MouseEvent)
- Not implemented.
-
mouseReleased(MouseEvent)
- Not implemented.
-
start()
- displays the first text of the textFrame object.
-
stop()
- Sets the reciever to null.
framed
FrameAreaEx framed
- Panel containing TextArea.
textFrames
Vector textFrames
- Vector containing the texts from the applet Tag parameters: framei
recieverName
String recieverName
- name of the reciever read from the reciever parameter.
currentFrame
int currentFrame
- The current index of the text shown in the TextArea component.
reciever
Applet reciever
- The object which recieves notification by calling its FrameListener.changeFrame.
The reciever should be an instance of a FrameLIstener.
Next
private static final int Next
Back
private static final int Back
Restart
private static final int Restart
Current
private static final int Current
buttons
Button buttons[]
bLabels
private static final String bLabels[]
TextBox
public TextBox()
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
destroy
public void destroy()
- clears components
- Overrides:
- destroy in class Applet
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
stop
public void stop()
- Sets the reciever to null.
- Overrides:
- stop in class Applet
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.
mousePressed
public void mousePressed(MouseEvent e)
- Not implemented.
mouseReleased
public void mouseReleased(MouseEvent e)
- Not implemented.
mouseEntered
public void mouseEntered(MouseEvent e)
- Not implemented.
mouseExited
public void mouseExited(MouseEvent e)
- Not implemented.
All Packages Class Hierarchy This Package Previous Next Index