All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class distans.pwBean

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----distans.pwBean

public class pwBean
extends Dialog
This class creates a small Dialog asking the user for username password and the course he want to access.


Variable Index

 o button1
 o button2
 o dl
 o info
 o label1
 o label2
 o label3
 o pwField
 o pwOk
 o subjectChosing
 o subjectField
 o subjectSelect
 o subjectsLoaded
 o userName
 o userNameField

Constructor Index

 o pwBean(Frame, DataLoader, boolean)
Constructs a pwBean, adding all the graphical components

Method Index

 o button1_ActionPerformed(ActionEvent)
 o button2_ActionPerformed(ActionEvent)
 o checkPassword()
Checks that all fields are filled and checks the password using the DataLoader class.
 o getSubject()
 o getSubjects()
 o getUserName()
 o isPwOk()
Accessor
 o setPwOk(boolean)
Sets pwOk, if pwOk the username and password are Ok.
 o show()
 o subjectField_EnterHit(ActionEvent)
 o subjectSelect_DblClicked(ActionEvent)
 o subjectSelect_ItemStateChanged(ItemEvent)

Variables

 o dl
 private DataLoader dl
 o subjectsLoaded
 private boolean subjectsLoaded
 o userName
 private String userName
 o subjectChosing
 private boolean subjectChosing
 o subjectSelect
 List subjectSelect
 o userNameField
 TextField userNameField
 o label1
 Label label1
 o pwField
 TextField pwField
 o label2
 Label label2
 o button1
 Button button1
 o info
 Label info
 o subjectField
 TextField subjectField
 o label3
 Label label3
 o button2
 Button button2
 o pwOk
 protected boolean pwOk

Constructors

 o pwBean
 public pwBean(Frame father,
               DataLoader dl,
               boolean subjectChosing)
Constructs a pwBean, adding all the graphical components

Parameters:
father - the Father frame this is requiered by the Java Dialog constructor. Probably for blocking user input.
dl - a DataLoader responsible for connecting to the Server.
subjectChosing - this should be true if the password dialog should let the user choose the subject. True for ReadAnswer and MakePage Applet false when used by CreateCourseApplet

Methods

 o getSubject
 public String getSubject()
Returns:
the subject selected in the subject list, if none is selected the text in the subject textfield.
 o getSubjects
 public String[] getSubjects()
Returns:
all the subjects in the subjectSelect list, if there are no item null is returned.
 o getUserName
 public String getUserName()
Returns:
the userName entered in the username textfield, if no username has been entered null is returned.
 o setPwOk
 public void setPwOk(boolean pwOk)
Sets pwOk, if pwOk the username and password are Ok. Even though the teatecher may not have access to the course.

 o isPwOk
 public boolean isPwOk()
Accessor

 o show
 public void show()
Overrides:
show in class Dialog
 o checkPassword
 public void checkPassword()
Checks that all fields are filled and checks the password using the DataLoader class. Appropiate feedback is given the user.

 o button1_ActionPerformed
 void button1_ActionPerformed(ActionEvent event)
 o subjectSelect_ItemStateChanged
 void subjectSelect_ItemStateChanged(ItemEvent event)
 o subjectField_EnterHit
 void subjectField_EnterHit(ActionEvent event)
 o subjectSelect_DblClicked
 void subjectSelect_DblClicked(ActionEvent event)
 o button2_ActionPerformed
 void button2_ActionPerformed(ActionEvent event)

All Packages  Class Hierarchy  This Package  Previous  Next  Index