org.cafesip.gwtcomp.client.ui
Class TitleBar

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.cafesip.gwtcomp.client.ui.TitleBar
All Implemented Interfaces:
com.google.gwt.user.client.EventListener

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

A title bar for GWT applications. A title bar displays the page title and, optionally, displays a help icon. When the user clicks on the help icon, a help window is popped up.

Examples:

CSS Style Rules:

Screen-Shots:


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
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
TitleBar()
          A constructor for this class.
TitleBar(java.lang.String text, java.lang.String helpUrl, int level)
          A constructor for this class.
 
Method Summary
 java.lang.String getHelpUrl()
          Returns the currently-set level.
 int getLevel()
          Returns the currently-set level.
 java.lang.String getText()
          Returns the currently-set header text.
 void setHelpUrl(java.lang.String helpUrl)
          Sets the help URL.
 void setLevel(int level)
          Sets the current level.
 void setText(java.lang.String text)
          Sets the heafer text.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, onLoad, onUnload, removeFromParent
 
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, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TitleBar

public TitleBar()
A constructor for this class.


TitleBar

public TitleBar(java.lang.String text,
                java.lang.String helpUrl,
                int level)
A constructor for this class.

Parameters:
text - header text
helpUrl - URL of the help page. If set to null, no help icon is displayed.
level - header level - used to set the header level to HTML tags -
      <h1>, <h2> ...
 
Method Detail

getText

public java.lang.String getText()
Returns the currently-set header text.

Returns:
Returns the header text.

setText

public void setText(java.lang.String text)
Sets the heafer text.

Parameters:
text - The text to set.

getHelpUrl

public java.lang.String getHelpUrl()
Returns the currently-set level.

Returns:
Returns the helpUrl.

setHelpUrl

public void setHelpUrl(java.lang.String helpUrl)
Sets the help URL. If a null value is supplied, the help icon is removed.

Parameters:
helpUrl - sets the help icon.

getLevel

public int getLevel()
Returns the currently-set level.

Returns:
the level

setLevel

public void setLevel(int level)
Sets the current level.

Parameters:
level - The level to set.


http://www.cafesip.org