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.
-
button1
-
-
button2
-
-
dl
-
-
info
-
-
label1
-
-
label2
-
-
label3
-
-
pwField
-
-
pwOk
-
-
subjectChosing
-
-
subjectField
-
-
subjectSelect
-
-
subjectsLoaded
-
-
userName
-
-
userNameField
-
-
pwBean(Frame, DataLoader, boolean)
- Constructs a pwBean, adding all the graphical components
-
button1_ActionPerformed(ActionEvent)
-
-
button2_ActionPerformed(ActionEvent)
-
-
checkPassword()
- Checks that all fields are filled and checks the password using the DataLoader class.
-
getSubject()
-
-
getSubjects()
-
-
getUserName()
-
-
isPwOk()
- Accessor
-
setPwOk(boolean)
- Sets pwOk, if pwOk the username and password are Ok.
-
show()
-
-
subjectField_EnterHit(ActionEvent)
-
-
subjectSelect_DblClicked(ActionEvent)
-
-
subjectSelect_ItemStateChanged(ItemEvent)
-
dl
private DataLoader dl
subjectsLoaded
private boolean subjectsLoaded
userName
private String userName
subjectChosing
private boolean subjectChosing
subjectSelect
List subjectSelect
userNameField
TextField userNameField
label1
Label label1
pwField
TextField pwField
label2
Label label2
button1
Button button1
info
Label info
subjectField
TextField subjectField
label3
Label label3
button2
Button button2
pwOk
protected boolean pwOk
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
getSubject
public String getSubject()
- Returns:
- the subject selected in the subject list, if none is selected the text in the subject textfield.
getSubjects
public String[] getSubjects()
- Returns:
- all the subjects in the subjectSelect list, if there are no item null is returned.
getUserName
public String getUserName()
- Returns:
- the userName entered in the username textfield, if no username has been entered null is returned.
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.
isPwOk
public boolean isPwOk()
- Accessor
show
public void show()
- Overrides:
- show in class Dialog
checkPassword
public void checkPassword()
- Checks that all fields are filled and checks the password using the DataLoader class.
Appropiate feedback is given the user.
button1_ActionPerformed
void button1_ActionPerformed(ActionEvent event)
subjectSelect_ItemStateChanged
void subjectSelect_ItemStateChanged(ItemEvent event)
subjectField_EnterHit
void subjectField_EnterHit(ActionEvent event)
subjectSelect_DblClicked
void subjectSelect_DblClicked(ActionEvent event)
button2_ActionPerformed
void button2_ActionPerformed(ActionEvent event)
All Packages Class Hierarchy This Package Previous Next Index