com.sibvisions.rad.application
Class Login

java.lang.Object
  extended by javax.rad.genui.UIResource<C>
      extended by javax.rad.genui.UIComponent<C>
          extended by javax.rad.genui.UIContainer<C>
              extended by javax.rad.genui.container.AbstractWindow<C>
                  extended by javax.rad.genui.container.AbstractFrame<IInternalFrame>
                      extended by javax.rad.genui.container.UIInternalFrame
                          extended by com.sibvisions.rad.application.Login
All Implemented Interfaces:
ITranslatable, IFrame, IInternalFrame, IToolBarPanel, IWindow, IComponent, IContainer, IResource, INamedObject

public class Login
extends UIInternalFrame

The Login creates and layouts the UI components for the login screen of the Application application.


Field Summary
static int MODE_CHANGE_PASSWORD
          the mode for password change UI.
static int MODE_LOGIN
          the mode for standard login UI.
 
Fields inherited from class javax.rad.genui.container.AbstractFrame
iconImage, menuBar
 
Fields inherited from class javax.rad.genui.UIContainer
components
 
Fields inherited from class javax.rad.genui.UIComponent
lLastTranslationModified, parent
 
Fields inherited from class javax.rad.genui.UIResource
uiResource
 
Fields inherited from interface javax.rad.ui.container.IFrame
ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, NORMAL
 
Fields inherited from interface javax.rad.ui.container.IToolBarPanel
AREA_BOTTOM, AREA_LEFT, AREA_RIGHT, AREA_TOP
 
Constructor Summary
Login(UIDesktopPanel pDesktop, IConnectable pConnectable)
          Creates a new instance of the login UI.
 
Method Summary
 String getError()
          Gets the current error text, if set.
 IImage getInfoImage()
          Gets the login-info image.
 int getMode()
          Returns the current mode.
 String getNewPassword()
          Gets the new password.
 String getPassword()
          Gets the password.
 String getUserName()
          Gets the user name.
protected  void init()
          Initializes the UI components.
 void setError(String pError)
          Sets an error text instead of the welcome text.
 void setInfoImage(IImage pImage)
          Sets the login-info image.
 void setMode(int pMode)
          Sets the mode for the login.
 void setPassword(String pPassword)
          Sets the password.
 void setUserName(String pUserName)
          Sets the user name.
 
Methods inherited from class javax.rad.genui.container.UIInternalFrame
close, dispose, isClosable, isClosed, isIconifiable, isMaximizable, isModal, setClosable, setIconifiable, setMaximizable, setModal, toBack, toFront, topLevelAddNotify
 
Methods inherited from class javax.rad.genui.container.AbstractFrame
addNotify, addToolBar, addToolBar, beforeAddNotify, getIconImage, getMenuBar, getState, getTitle, getToolBar, getToolBarArea, getToolBarCount, indexOfToolBar, isResizable, isToolBarMovable, removeAllToolBars, removeNotify, removeToolBar, removeToolBar, setIconImage, setMenuBar, setResizable, setState, setTitle, setToolBarArea, setToolBarMovable, updateTranslation
 
Methods inherited from class javax.rad.genui.container.AbstractWindow
centerRelativeTo, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, pack, setVisible
 
Methods inherited from class javax.rad.genui.UIContainer
add, add, add, add, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout, setZOrder
 
Methods inherited from class javax.rad.genui.UIComponent
capture, createCellFormatter, createNodeFormatter, debug, error, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getComponentUIResource, getCurrentTranslation, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getResource, getSize, getToolTipText, getTranslation, info, invokeAndWait, invokeAndWait, invokeInThread, invokeInThread, invokeLater, invokeLater, isBackgroundSet, isBeforeNotified, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isNotified, isPreferredSizeSet, isTranslationChanged, isTranslationEnabled, isVisible, requestFocus, setBackground, setBounds, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocation, setLocationRelativeTo, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setParent, setPreferredSize, setPreferredSize, setSize, setSize, setToolTipText, setTranslation, setTranslationEnabled, translate
 
Methods inherited from class javax.rad.genui.UIResource
equals, getUIResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.container.IFrame
getIconImage, getMenuBar, getState, getTitle, isResizable, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from interface javax.rad.ui.container.IWindow
centerRelativeTo, eventWindowActivated, eventWindowClosed, eventWindowClosing, eventWindowDeactivated, eventWindowDeiconified, eventWindowIconified, eventWindowOpened, isActive, isDisposed, pack
 
Methods inherited from interface javax.rad.ui.container.IToolBarPanel
addToolBar, addToolBar, getToolBar, getToolBarArea, getToolBarCount, indexOfToolBar, removeAllToolBars, removeToolBar, removeToolBar, setToolBarArea
 
Methods inherited from interface javax.rad.ui.IContainer
add, add, add, add, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, setLayout
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Field Detail

MODE_LOGIN

public static final int MODE_LOGIN
the mode for standard login UI.

See Also:
Constant Field Values

MODE_CHANGE_PASSWORD

public static final int MODE_CHANGE_PASSWORD
the mode for password change UI.

See Also:
Constant Field Values
Constructor Detail

Login

public Login(UIDesktopPanel pDesktop,
             IConnectable pConnectable)
Creates a new instance of the login UI.

Parameters:
pDesktop - the desktop for showing the frame
pConnectable - the main connection
Method Detail

init

protected void init()
Initializes the UI components.


setUserName

public void setUserName(String pUserName)
Sets the user name.

Parameters:
pUserName - the user name

getUserName

public String getUserName()
Gets the user name.

Returns:
the user name

setPassword

public void setPassword(String pPassword)
Sets the password.

Parameters:
pPassword - the password

getPassword

public String getPassword()
Gets the password.

Returns:
the password

getNewPassword

public String getNewPassword()
Gets the new password.

Returns:
the new password or null if ther is no new password
Throws:
SecurityException - if the new password is invalid

setInfoImage

public void setInfoImage(IImage pImage)
Sets the login-info image.

Parameters:
pImage - the image

getInfoImage

public IImage getInfoImage()
Gets the login-info image.

Returns:
the image

setError

public void setError(String pError)
Sets an error text instead of the welcome text.

Parameters:
pError - the error text

getError

public String getError()
Gets the current error text, if set.

Returns:
the error text or null if no text is set

setMode

public void setMode(int pMode)
Sets the mode for the login. The frame depends on the mode. When the password mode will be set, and the application is connected, the user only can change its password. If the application is not connected, the user have to enter the login data and the new password. When the default mode will be set, the user have to enter the login credentials.

Parameters:
pMode - the mode can be one of the following: MODE_CHANGE_PASSWORD or MODE_LOGIN

getMode

public int getMode()
Returns the current mode.

Returns:
one of the known modes: MODE_CHANGE_PASSWORD or MODE_LOGIN


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.