com.sptci.echo2
Class LoginPaneController

java.lang.Object
  extended by com.sptci.echo2.Controller<LoginPane>
      extended by com.sptci.echo2.LoginPaneController
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LoginController

public abstract class LoginPaneController
extends Controller<LoginPane>

An abstract controller for the LoginPane view component. Sub-classes must implement the appropriate action to be performed when the login form is submitted.

Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: LoginPaneController.java 3139 2007-04-24 12:22:39Z rakesh $
Author:
Rakesh Vidyadharan 2006-11-23
See Also:
Serialized Form

Nested Class Summary
 class LoginPaneController.UserNameListener
          An action listener that transfers control from the LoginPane.userName field to the LoginPane.password field.
 
Nested classes/interfaces inherited from class com.sptci.echo2.Controller
Controller.LinkedCellRenderer, Controller.Updater<S>, Controller.Worker<S>
 
Field Summary
 
Fields inherited from class com.sptci.echo2.Controller
application, logger, view
 
Constructor Summary
LoginPaneController()
          Create a new instance controlling a new instance of LoginPane stored in the Controller.view field.
 
Method Summary
 boolean checkPassword()
          Check the LoginPane.password field to ensure that a value has been input into the field.
 boolean checkUserName()
          Check the LoginPane.userName field to ensure that a value has been input into the field.
 boolean checkView()
          Check the Controller.view components to ensure that appropriate values have been entered.
abstract  ActionListener getListener(String component)
          Return the ActionListener for the component identified by the name specified.
 
Methods inherited from class com.sptci.echo2.Controller
checkText, getApplication, getLogger, getView, processFatalException, setApplication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginPaneController

public LoginPaneController()
Create a new instance controlling a new instance of LoginPane stored in the Controller.view field.

Method Detail

checkView

public boolean checkView()
Check the Controller.view components to ensure that appropriate values have been entered. The default implementation ensures that non-empty values have been entered into the LoginPane.userName and LoginPane.password fields.

Returns:
Returns true if the tests succeed.
See Also:
checkUserName(), checkPassword()

checkUserName

public boolean checkUserName()
Check the LoginPane.userName field to ensure that a value has been input into the field.

Returns:
Returns true if the value of the field is not null or empty.
See Also:
Controller.checkText(java.lang.String)

checkPassword

public boolean checkPassword()
Check the LoginPane.password field to ensure that a value has been input into the field.

Returns:
Returns true if the value of the field is not null or empty.
See Also:
Controller.checkText(java.lang.String)

getListener

public abstract ActionListener getListener(String component)
Return the ActionListener for the component identified by the name specified.

Parameters:
component - The component for which the action listener is to be returned.
Returns:
The appropriate action listener instance.