vooga.users.ui.login
Class LoginScreenModel
java.lang.Object
vooga.users.ui.login.LoginScreenModel
- All Implemented Interfaces:
- java.awt.event.WindowListener, java.util.EventListener
public class LoginScreenModel
- extends java.lang.Object
- implements java.awt.event.WindowListener
This class provides the logic for the GUI drawn by LoginScreenView. It works
with a UserDatabase to process human input.
- Author:
- Alex Edelsburg, Stephanie Chang
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoginScreenModel
public LoginScreenModel(VoogaGUI gui,
int frameID,
UserDatabaseInterface db)
setView
protected void setView(LoginScreenView view)
- Pairs the model with a view that will provide it with human input
- Parameters:
view
- the view providing human input
verifyLogin
public void verifyLogin(java.lang.String username,
java.lang.String password)
- Verifies human login info against the user database
- Parameters:
username
- the human's user name entrypassword
- the human's password entry
getCreateAccountListener
public java.awt.event.ActionListener getCreateAccountListener()
getPlayAsGuestListener
public java.awt.event.ActionListener getPlayAsGuestListener(java.lang.String string)
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Specified by:
windowActivated
in interface java.awt.event.WindowListener
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Specified by:
windowClosed
in interface java.awt.event.WindowListener
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- Specified by:
windowClosing
in interface java.awt.event.WindowListener
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Specified by:
windowDeactivated
in interface java.awt.event.WindowListener
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Specified by:
windowDeiconified
in interface java.awt.event.WindowListener
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Specified by:
windowIconified
in interface java.awt.event.WindowListener
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Specified by:
windowOpened
in interface java.awt.event.WindowListener