com.sptci.echo2
Class LoginPane

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by nextapp.echo2.app.WindowPane
          extended by com.sptci.echo2.LoginPane
All Implemented Interfaces:
Serializable, FloatingPane, ModalSupport, Pane, PaneContainer, RenderIdSupport

public class LoginPane
extends WindowPane

A view component that is used to display login controls to the user.

The following shows usage of this class. Since the associated LoginPaneController is abstract this component cannot be directly instantiated. It will be instantiated through the sub-class of LoginPaneController.

   import com.sptci.echo2.LoginPane;
 
     ...
     // MyLoginController is your sub-class of LoginPaneController
     MyLoginController controller = new MyLoginController();
     LoginPane pane = controller.getView();
 

Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: LoginPane.java 3129 2007-04-23 22:37:20Z rakesh $
Author:
Rakesh Vidyadharan 2006-11-23
See Also:
Serialized Form

Field Summary
protected  LoginPaneController controller
          The controller for this view.
protected  Button login
          The button used to trigger a login action.
static String LOGIN
          The name of the login field used to trigger the login process.
protected  PasswordField password
          The component to use to capture password information.
static String PASSWORD
          The name of the password field.
protected  TextField userName
          The component to use to capture user/account name information.
static String USERNAME
          The name of the userName field.
 
Fields inherited from class nextapp.echo2.app.WindowPane
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, INPUT_CLOSE, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_CLOSABLE, PROPERTY_CLOSE_ICON, PROPERTY_CLOSE_ICON_INSETS, PROPERTY_DEFAULT_CLOSE_OPERATION, PROPERTY_HEIGHT, PROPERTY_ICON, PROPERTY_ICON_INSETS, PROPERTY_INSETS, PROPERTY_MAXIMUM_HEIGHT, PROPERTY_MAXIMUM_WIDTH, PROPERTY_MINIMUM_HEIGHT, PROPERTY_MINIMUM_WIDTH, PROPERTY_MOVABLE, PROPERTY_POSITION_X, PROPERTY_POSITION_Y, PROPERTY_RESIZABLE, PROPERTY_TITLE, PROPERTY_TITLE_BACKGROUND, PROPERTY_TITLE_BACKGROUND_IMAGE, PROPERTY_TITLE_BAR_INSETS, PROPERTY_TITLE_FONT, PROPERTY_TITLE_FOREGROUND, PROPERTY_TITLE_HEIGHT, PROPERTY_TITLE_INSETS, PROPERTY_WIDTH, Z_INDEX_CHANGED_PROPERTY
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface nextapp.echo2.app.ModalSupport
MODAL_CHANGED_PROPERTY
 
Constructor Summary
protected LoginPane()
          Initialise the view using the specified controller.
 
Method Summary
protected  void createComponent(String field, Component component)
          Initialise the specified component and add to the specified container component.
protected  void createLogin(Component component)
          Initialise the login component and add to the specified container component.
 LoginPaneController getController()
          Returns controller.
 String getPassword()
          Return the text entered into password.
 String getUserName()
          Return the text entered into userName.
protected  void initComponents()
          Initialise the components of this pane.
protected  void setController(LoginPaneController controller)
          Set controller.
 
Methods inherited from class nextapp.echo2.app.WindowPane
addWindowPaneListener, fireWindowClosing, getBackgroundImage, getBorder, getCloseIcon, getCloseIconInsets, getDefaultCloseOperation, getHeight, getIcon, getIconInsets, getInsets, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getPositionX, getPositionY, getTitle, getTitleBackground, getTitleBackgroundImage, getTitleBarInsets, getTitleFont, getTitleForeground, getTitleHeight, getTitleInsets, getWidth, getZIndex, isClosable, isModal, isMovable, isResizable, isValidChild, isValidParent, processInput, removeWindowPaneListener, setBackgroundImage, setBorder, setClosable, setCloseIcon, setCloseIconInsets, setDefaultCloseOperation, setHeight, setIcon, setIconInsets, setInsets, setMaximumHeight, setMaximumWidth, setMinimumHeight, setMinimumWidth, setModal, setMovable, setPositionX, setPositionY, setResizable, setTitle, setTitleBackground, setTitleBackgroundImage, setTitleBarInsets, setTitleFont, setTitleForeground, setTitleHeight, setTitleInsets, setWidth, setZIndex, userClose
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERNAME

public static final String USERNAME
The name of the userName field. "userName"

See Also:
Constant Field Values

PASSWORD

public static final String PASSWORD
The name of the password field. "password"

See Also:
Constant Field Values

LOGIN

public static final String LOGIN
The name of the login field used to trigger the login process. "login"

See Also:
Constant Field Values

userName

protected TextField userName
The component to use to capture user/account name information.


password

protected PasswordField password
The component to use to capture password information.


login

protected Button login
The button used to trigger a login action.


controller

protected LoginPaneController controller
The controller for this view.

Constructor Detail

LoginPane

protected LoginPane()
Initialise the view using the specified controller.

Note: After creating a new instance of this view component, setController(com.sptci.echo2.LoginPaneController) and initComponents() must be invoked in the above order.

Method Detail

initComponents

protected void initComponents()
Initialise the components of this pane.

See Also:
createComponent(java.lang.String, nextapp.echo2.app.Component), createLogin(nextapp.echo2.app.Component)

createComponent

protected void createComponent(String field,
                               Component component)
Initialise the specified component and add to the specified container component.

Parameters:
field - The field that is to be initialised.
component - The parent container to which the field is to be added.
See Also:
LoginPaneController.getListener(java.lang.String)

createLogin

protected void createLogin(Component component)
Initialise the login component and add to the specified container component.

Parameters:
component - The parent container to which the field is to be added.
See Also:
LoginPaneController.getListener(java.lang.String)

getUserName

public String getUserName()
Return the text entered into userName.

Returns:
The value entered into the component.

getPassword

public String getPassword()
Return the text entered into password.

Returns:
The value entered into the component.

getController

public LoginPaneController getController()
Returns controller.

Returns:
The value/reference of/to controller.

setController

protected void setController(LoginPaneController controller)
Set controller.

Parameters:
controller - The value to set.