com.maryanovsky.gwtutils.client.ui
Class DefaultSizeAccordion

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 com.google.gwt.user.client.ui.ResizeComposite
                  extended by com.maryanovsky.gwtutils.client.ui.Accordion
                      extended by com.maryanovsky.gwtutils.client.ui.DefaultSizeAccordion
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsRenderable, IsWidget, ProvidesResize, RequiresResize

public class DefaultSizeAccordion
extends Accordion

An Accordion where a default height for the widgets and their headers is specified in the constructor. This class is mostly needed because currently, GWT (2.0) does not allow a widget container to specify its own layout elements for a UiBinder XML file.

Author:
Maryanovsky Alexander

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DefaultSizeAccordion(String unit, String headerHeight, String widgetHeight)
          Creates a new FixedSizeAccordion with the specified size unit and heights for the headers and widgets.
DefaultSizeAccordion(Style.Unit unit, double headerHeight, double widgetHeight)
          Creates a new FixedSizeAccordion with the specified size unit and sizes for the headers and widgets.
 
Method Summary
 void add(Widget widget, Widget header)
          Adds a widget and a header to the end of the Accordion.
 void insert(Widget widget, Widget header, int index)
          Inserts a widget and a header at the specified position.
 
Methods inherited from class com.maryanovsky.gwtutils.client.ui.Accordion
add, getHeader, getHeader, getSpacing, getWidgetCount, getWidgetIndex, insert, isWidgetVisible, isWidgetVisible, onLoad, setSpacing, setWidgetVisible, setWidgetVisible
 
Methods inherited from class com.google.gwt.user.client.ui.ResizeComposite
initWidget, onResize
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, 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, 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, onEnsureDebugId, 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
 
Methods inherited from interface com.google.gwt.user.client.ui.RequiresResize
onResize
 

Constructor Detail

DefaultSizeAccordion

public DefaultSizeAccordion(Style.Unit unit,
                            double headerHeight,
                            double widgetHeight)
Creates a new FixedSizeAccordion with the specified size unit and sizes for the headers and widgets.


DefaultSizeAccordion

@UiConstructor
public DefaultSizeAccordion(String unit,
                                          String headerHeight,
                                          String widgetHeight)
Creates a new FixedSizeAccordion with the specified size unit and heights for the headers and widgets. This constructor is meant to be used by the LayoutUiBinder, so it takes String arguments.

Method Detail

insert

public void insert(Widget widget,
                   Widget header,
                   int index)
Inserts a widget and a header at the specified position.


add

public void add(Widget widget,
                Widget header)
Adds a widget and a header to the end of the Accordion.