com.google.gwt.widgetideas.client
Class TitledPanel

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.widgetideas.client.TitledPanel
All Implemented Interfaces:
com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets

public class TitledPanel
extends com.google.gwt.user.client.ui.SimplePanel

A panel that wraps its contents in a border with a title that appears in the upper left corner of the border. This is an implementation of the fieldset HTML element.


Nested Class Summary
static class TitledPanel.TitledPanelImpl
          Implementation class for TitledPanel.
static class TitledPanel.TitledPanelImplMozilla
          Implementation class for TitledPanel that handles Mozilla rendering issues.
 
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
TitledPanel(java.lang.String title)
          Constructor.
TitledPanel(java.lang.String title, com.google.gwt.user.client.ui.Widget w)
          Constructor.
 
Method Summary
 java.lang.String getTitle()
          Get the current title.
 void setTitle(java.lang.String title)
          Set the title in the border.
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
clear
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onBrowserEvent, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStylePrimaryName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TitledPanel

public TitledPanel(java.lang.String title)
Constructor.

Parameters:
title - the title to display

TitledPanel

public TitledPanel(java.lang.String title,
                   com.google.gwt.user.client.ui.Widget w)
Constructor.

Parameters:
title - the title to display
w - the widget to add to the panel
Method Detail

getTitle

public java.lang.String getTitle()
Get the current title.

Overrides:
getTitle in class com.google.gwt.user.client.ui.UIObject
Returns:
the title of the panel

setTitle

public void setTitle(java.lang.String title)
Set the title in the border. Pass in null or an empty string to remove the title completely, leaving just a box.

Overrides:
setTitle in class com.google.gwt.user.client.ui.UIObject
Parameters:
title - the new title