org.jboss.errai.widgets.client
Class WSStackPanel

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.ComplexPanel
                  extended by org.jboss.errai.widgets.client.WSStackPanel
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.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>

public class WSStackPanel
extends com.google.gwt.user.client.ui.ComplexPanel


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
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
WSStackPanel()
          Creates an empty stack panel.
 
Method Summary
 void add(com.google.gwt.user.client.ui.Widget w)
          Adds a new child with the given widget.
 void add(com.google.gwt.user.client.ui.Widget w, String stackText)
          Adds a new child with the given widget and header.
 void add(com.google.gwt.user.client.ui.Widget w, String stackText, boolean asHTML)
          Adds a new child with the given widget and header, optionally interpreting the header as HTML.
 int getSelectedIndex()
          Gets the currently selected child index.
 void insert(com.google.gwt.user.client.ui.Widget w, int beforeIndex)
          Inserts a widget before the specified index.
 void onBrowserEvent(com.google.gwt.user.client.Event event)
           
protected  void onEnsureDebugId(String baseID)
          Affected Elements: -text# = The element around the header at the specified index. -text-wrapper# = The element around the header at the specified index. -content# = The element around the body at the specified index.
 boolean remove(int index)
           
 boolean remove(com.google.gwt.user.client.ui.Widget child)
           
 void setStackText(int index, String text)
          Sets the text associated with a child by its index.
 void setStackText(int index, String text, boolean asHTML)
          Sets the text associated with a child by its index.
 void showStack(int index)
          Shows the widget at the specified child index.
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
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, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WSStackPanel

public WSStackPanel()
Creates an empty stack panel.

Method Detail

add

public void add(com.google.gwt.user.client.ui.Widget w)
Adds a new child with the given widget.

Specified by:
add in interface com.google.gwt.user.client.ui.HasWidgets
Overrides:
add in class com.google.gwt.user.client.ui.Panel
Parameters:
w - the widget to be added

add

public void add(com.google.gwt.user.client.ui.Widget w,
                String stackText)
Adds a new child with the given widget and header.

Parameters:
w - the widget to be added
stackText - the header text associated with this widget

add

public void add(com.google.gwt.user.client.ui.Widget w,
                String stackText,
                boolean asHTML)
Adds a new child with the given widget and header, optionally interpreting the header as HTML.

Parameters:
w - the widget to be added
stackText - the header text associated with this widget
asHTML - true to treat the specified text as HTML

getSelectedIndex

public int getSelectedIndex()
Gets the currently selected child index.

Returns:
selected child

insert

public void insert(com.google.gwt.user.client.ui.Widget w,
                   int beforeIndex)
Inserts a widget before the specified index.

Parameters:
w - the widget to be inserted
beforeIndex - the index before which it will be inserted
Throws:
IndexOutOfBoundsException - if beforeIndex is out of range

onBrowserEvent

public void onBrowserEvent(com.google.gwt.user.client.Event event)
Specified by:
onBrowserEvent in interface com.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent in class com.google.gwt.user.client.ui.Widget

remove

public boolean remove(int index)
Specified by:
remove in interface com.google.gwt.user.client.ui.IndexedPanel
Overrides:
remove in class com.google.gwt.user.client.ui.ComplexPanel

remove

public boolean remove(com.google.gwt.user.client.ui.Widget child)
Specified by:
remove in interface com.google.gwt.user.client.ui.HasWidgets
Overrides:
remove in class com.google.gwt.user.client.ui.ComplexPanel

setStackText

public void setStackText(int index,
                         String text)
Sets the text associated with a child by its index.

Parameters:
index - the index of the child whose text is to be set
text - the text to be associated with it

setStackText

public void setStackText(int index,
                         String text,
                         boolean asHTML)
Sets the text associated with a child by its index.

Parameters:
index - the index of the child whose text is to be set
text - the text to be associated with it
asHTML - true to treat the specified text as HTML

showStack

public void showStack(int index)
Shows the widget at the specified child index.

Parameters:
index - the index of the child to be shown

onEnsureDebugId

protected void onEnsureDebugId(String baseID)
Affected Elements:

Overrides:
onEnsureDebugId in class com.google.gwt.user.client.ui.UIObject
See Also:
UIObject.onEnsureDebugId(String)


Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.