vooga.users.ui.login
Class LoginScreenModel

java.lang.Object
  extended by 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

Constructor Summary
LoginScreenModel(VoogaGUI gui, int frameID, UserDatabaseInterface db)
           
 
Method Summary
 java.awt.event.ActionListener getCreateAccountListener()
           
 java.awt.event.ActionListener getPlayAsGuestListener(java.lang.String string)
           
protected  void setView(LoginScreenView view)
          Pairs the model with a view that will provide it with human input
 void verifyLogin(java.lang.String username, java.lang.String password)
          Verifies human login info against the user database
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginScreenModel

public LoginScreenModel(VoogaGUI gui,
                        int frameID,
                        UserDatabaseInterface db)
Method Detail

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 entry
password - 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