-
Notifications
You must be signed in to change notification settings - Fork 1
/
LoginCntl.java
84 lines (72 loc) · 1.87 KB
/
LoginCntl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package spark2.pkg0;
/**
*
* @author brend
*/
public class LoginCntl {
private UserList list1;
private LoginUI theUI;
private NavCntl theNavCntl;
LoginCntl(){
list1 = new UserList();
theUI = new LoginUI(this);
theUI.setVisible(true);
theNavCntl = new NavCntl();
getTheUI().getfailLabel().setVisible(false);
}
public boolean requestAuthenticate(){
boolean result= false;
result = getList1().Authenticate(getTheUI().getUserNameText().getText(), getTheUI().getPasswordText().getText());
return result;
}
public void recieveAuthenticate(boolean result2){
if(result2 == true){
getTheUI().setVisible(false);
getTheNavCntl().setNavUIVisible();
}
else{
getTheUI().getfailLabel().setVisible(true);
}
}
/**
* @return the list1
*/
public UserList getList1() {
return list1;
}
/**
* @param list1 the list1 to set
*/
public void setList1(UserList list1) {
this.list1 = list1;
}
/**
* @return the theUI
*/
public LoginUI getTheUI() {
return theUI;
}
/**
* @param theUI the theUI to set
*/
public void setTheUI(LoginUI theUI) {
this.theUI = theUI;
}
/**
* @return the theNavCntl
*/
public NavCntl getTheNavCntl() {
return theNavCntl;
}
/**
* @param theNavCntl the theNavCntl to set
*/
public void setTheNavCntl(NavCntl theNavCntl) {
this.theNavCntl = theNavCntl;
}
}