org.cruxframework.crux.widgets.client.scrollbanner
Class ScrollBanner

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.Composite
              extended by org.cruxframework.crux.widgets.client.scrollbanner.ScrollBanner
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget

public class ScrollBanner
extends com.google.gwt.user.client.ui.Composite

A banner for showing multiple text messages, one each time. The messages are displayed in a periodic and sequential way.

Author:
Gesse S. F. Dafe

Nested Class Summary
 
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
 
Field Summary
static String DEFAULT_STYLE_NAME
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ScrollBanner()
          Default constructor
ScrollBanner(int messageScrollingPeriod)
          Parameterized constructor
 
Method Summary
 void addMessage(String message)
          Adds a new message to the banner.
 void clear()
          Clears the message queue.
protected  void showNextMessage()
          Shows the next message in the queue.
protected  void showPreviousMessage()
          Shows the previous message in the queue.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_STYLE_NAME

public static final String DEFAULT_STYLE_NAME
See Also:
Constant Field Values
Constructor Detail

ScrollBanner

public ScrollBanner(int messageScrollingPeriod)
Parameterized constructor

Parameters:
messageScrollingPeriod - the period, in milliseconds, for swaping messages

ScrollBanner

public ScrollBanner()
Default constructor

Method Detail

addMessage

public void addMessage(String message)
Adds a new message to the banner. If no message exists, the new added message is shown. Otherwise, it is stored in the queue, and shown timely.

Parameters:
message -

showNextMessage

protected void showNextMessage()
Shows the next message in the queue.


showPreviousMessage

protected void showPreviousMessage()
Shows the previous message in the queue.


clear

public void clear()
Clears the message queue.



Copyright © 2014. All rights reserved.