de.hs_rm.cs.lecturenotes.client.core.presentation.ui
Class LoginDialogBox

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.google.gwt.user.client.ui.PopupPanel
                      extended by com.google.gwt.user.client.ui.DecoratedPopupPanel
                          extended by com.google.gwt.user.client.ui.DialogBox
                              extended by de.hs_rm.cs.lecturenotes.client.core.presentation.ui.LoginDialogBox
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.safehtml.client.HasSafeHtml, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.EventPreview, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.HasHTML, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.MouseListener, com.google.gwt.user.client.ui.SourcesPopupEvents, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>

public final class LoginDialogBox
extends com.google.gwt.user.client.ui.DialogBox

Login Dialog. Includes a clock and the possibility to login as an unregistered user (guest) and to register a new user.

Version:
$LastChangedRevision: 242 $
Author:
Enrico Homann

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.DialogBox
com.google.gwt.user.client.ui.DialogBox.Caption, com.google.gwt.user.client.ui.DialogBox.CaptionImpl
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.PositionCallback
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
static int LOGINTIMER_SCHEDULE_MILLIS
          Schedule for Login Timer (Clock) in milliseconds.
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
LoginDialogBox()
          Default Constructor.
 
Method Summary
 void clearInputFields()
          Clears all input fields.
 java.util.Date getClockDate()
          Will return a date singleton instance for the login clock with the current time.
 ILoginListener getLoginListener()
          Will return the registered login listener.
 RegisterUserDialogBox getRegisterUserDialogBox()
          Will return a singleton RegisterUserDialogBox instance.
 void onButtonLogin()
          Event callback that will be called if the user hits the login button.
 void onTimerUpdate()
          Event callback that will be called upon timer schedule.
 void setLoginListener(ILoginListener listener)
          Sets login listener.
 void updateUIFromRegistrationPair(Pair<User,java.lang.String> pair)
          Updates the user interface using the provided login credentials.
 
Methods inherited from class com.google.gwt.user.client.ui.DialogBox
getCaption, getHTML, getText, hide, onBrowserEvent, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, setHTML, setHTML, setText, show
 
Methods inherited from class com.google.gwt.user.client.ui.DecoratedPopupPanel
clear, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, center, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getTitle, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, setWidth, showRelativeTo
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, fireEvent, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Field Detail

LOGINTIMER_SCHEDULE_MILLIS

public static final int LOGINTIMER_SCHEDULE_MILLIS
Schedule for Login Timer (Clock) in milliseconds.

See Also:
Constant Field Values
Constructor Detail

LoginDialogBox

public LoginDialogBox()
Default Constructor.

Method Detail

clearInputFields

public void clearInputFields()
Clears all input fields.


setLoginListener

public void setLoginListener(ILoginListener listener)
Sets login listener.

Parameters:
listener - ILoginListener

getLoginListener

public ILoginListener getLoginListener()
Will return the registered login listener.

Returns:
ILoginListener

getRegisterUserDialogBox

public RegisterUserDialogBox getRegisterUserDialogBox()
Will return a singleton RegisterUserDialogBox instance.

Returns:
RegisterUserDialogBox

getClockDate

public java.util.Date getClockDate()
Will return a date singleton instance for the login clock with the current time.

Returns:
Date

updateUIFromRegistrationPair

public void updateUIFromRegistrationPair(Pair<User,java.lang.String> pair)
Updates the user interface using the provided login credentials.

Parameters:
pair - Pair of User and String

onTimerUpdate

public void onTimerUpdate()
Event callback that will be called upon timer schedule.


onButtonLogin

public void onButtonLogin()
Event callback that will be called if the user hits the login button.