com.github.gwtbootstrap.client.ui
Class ResponsiveNavbar

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 com.google.gwt.user.client.ui.FlowPanel
                      extended by com.github.gwtbootstrap.client.ui.base.DivWidget
                          extended by com.github.gwtbootstrap.client.ui.Navbar
                              extended by com.github.gwtbootstrap.client.ui.ResponsiveNavbar
All Implemented Interfaces:
HasStyle, IsResponsive, HasAttachHandlers, HasHandlers, EventListener, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, InsertPanel, InsertPanel.ForIsWidget, IsWidget, Iterable<Widget>

public class ResponsiveNavbar
extends Navbar

A Navbar that hides the contents of a NavCollapse whenever the width of the window is too small.

Only works when the Responsive Layout ist turned on. Create your own Configurator and let hasResponsiveDesign() return true.

UiBinder Usage:

 <g:FlowPanel>
     <b:ResponsiveNavbar>
         <b:Brand>Bootstrap</b:Brand>
         <b:NavCollapse>
             <b:Nav>
                 <b:NavLink>Link 1</b:NavLink>
                 <b:NavLink>Link 2</b:NavLink>
             </b:Nav>
             <b:NavForm size="1" />
             <b:Nav alignment="RIGHT">
                 <b:NavLink>Link 3</b:NavLink>
             </b:Nav>
         </b:NavCollapse>
     </b:ResponsiveNavbar>
     <b:Container>
         [...]
     </b:Container>
 </g:FlowPanel>
 
 

Since:
2.0.4.0
Author:
Dominik Mayer, Carlos Alexandro Becker
See Also:
Bootstrap documentation

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
InsertPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ResponsiveNavbar()
          Creates an empty widget.
 
Method Summary
 void add(Widget child)
          
protected  Container getContainer()
          Defines the default container implementation.
 
Methods inherited from class com.github.gwtbootstrap.client.ui.Navbar
addWidget, getId, getSpy, onAttach, setId, setPosition, setScrollspy, setSpyElement
 
Methods inherited from class com.github.gwtbootstrap.client.ui.base.DivWidget
addStyle, pullRight, removeStyle, setHideOn, setShowOn, setStyle
 
Methods inherited from class com.google.gwt.user.client.ui.FlowPanel
clear, insert, insert
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, 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, onBrowserEvent, 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, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, 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.InsertPanel.ForIsWidget
add
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
 

Constructor Detail

ResponsiveNavbar

public ResponsiveNavbar()
Creates an empty widget.

Method Detail

add

public void add(Widget child)

Specified by:
add in interface HasWidgets
Specified by:
add in interface InsertPanel
Overrides:
add in class Navbar

getContainer

protected Container getContainer()
Defines the default container implementation. You can override this in a extended class if you want another implementation, like a FluidContainer.

Overrides:
getContainer in class Navbar


Copyright © 2012 gwtbootstrap. All Rights Reserved.