org.gwtbootstrap3.client.ui.base
Class AbstractButtonGroup

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 org.gwtbootstrap3.client.ui.gwt.FlowPanel
                          extended by org.gwtbootstrap3.client.ui.base.AbstractButtonGroup
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasName, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, InsertPanel, InsertPanel.ForIsWidget, IsWidget, Iterable<Widget>, HasDataSpy, HasDataTarget, HasDataToggle, HasId, HasJustified, HasPull, HasResponsiveness
Direct Known Subclasses:
ButtonGroup, VerticalButtonGroup

public abstract class AbstractButtonGroup
extends FlowPanel
implements HasName, HasDataToggle, HasJustified, HasPull, HasResponsiveness

Abstract base class for button groups.

Author:
Sven Jacobs, Joshua Godi
See Also:
ButtonGroup, VerticalButtonGroup

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
protected AbstractButtonGroup(String styleName)
           
 
Method Summary
 void add(Widget w)
           
 Toggle getDataToggle()
          Gets the data-toggle attribute on the widget
 String getName()
           
 Pull getPull()
           
 boolean isJustified()
           
 void setDataToggle(Toggle toggle)
          Sets the attribute data-toggle on the widget
 void setDropUp(boolean dropUp)
          Makes this a "drop up" container for dropdown menus where the menu opens upwards.
 void setHiddenOn(DeviceSize deviceSize)
          Sets the devices that the element is hidden on
 void setJustified(boolean justified)
          Make a group of buttons stretch at the same size to span the entire width of its parent.
 void setName(String name)
          Convenience method that will set the name of all child widgets that can have a name
 void setPull(Pull pull)
           
 void setVisibleOn(DeviceSize deviceSize)
          Sets the devices that the element is visible on
 
Methods inherited from class org.gwtbootstrap3.client.ui.gwt.FlowPanel
getDataSpy, getDataTarget, getId, setDataSpy, setDataTarget, setDataTargetWidget, setDataTargetWidgets, setId
 
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, 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, 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, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
 
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
 
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

AbstractButtonGroup

protected AbstractButtonGroup(String styleName)
Method Detail

setName

public void setName(String name)
Convenience method that will set the name of all child widgets that can have a name

Specified by:
setName in interface HasName
Parameters:
name - Name of group
See Also:
add(com.google.gwt.user.client.ui.Widget)

getName

public String getName()
Specified by:
getName in interface HasName

setDataToggle

public void setDataToggle(Toggle toggle)
Description copied from interface: HasDataToggle
Sets the attribute data-toggle on the widget

Specified by:
setDataToggle in interface HasDataToggle
Parameters:
toggle - Toggle toggle attribute

getDataToggle

public Toggle getDataToggle()
Description copied from interface: HasDataToggle
Gets the data-toggle attribute on the widget

Specified by:
getDataToggle in interface HasDataToggle
Returns:
Toggle data-toggle attribute

setJustified

public void setJustified(boolean justified)
Make a group of buttons stretch at the same size to span the entire width of its parent.

Note: Justified button groups only work with AnchorButton child elements!

Specified by:
setJustified in interface HasJustified
Parameters:
justified - Stretch button group

isJustified

public boolean isJustified()
Specified by:
isJustified in interface HasJustified

setPull

public void setPull(Pull pull)
Specified by:
setPull in interface HasPull

getPull

public Pull getPull()
Specified by:
getPull in interface HasPull

setVisibleOn

public void setVisibleOn(DeviceSize deviceSize)
Description copied from interface: HasResponsiveness
Sets the devices that the element is visible on

Specified by:
setVisibleOn in interface HasResponsiveness
Overrides:
setVisibleOn in class FlowPanel
Parameters:
deviceSize - device size
See Also:
DeviceSize

setHiddenOn

public void setHiddenOn(DeviceSize deviceSize)
Description copied from interface: HasResponsiveness
Sets the devices that the element is hidden on

Specified by:
setHiddenOn in interface HasResponsiveness
Overrides:
setHiddenOn in class FlowPanel
Parameters:
deviceSize - device sizes
See Also:
DeviceSize

setDropUp

public void setDropUp(boolean dropUp)
Makes this a "drop up" container for dropdown menus where the menu opens upwards.

Parameters:
dropUp - display up or not

add

public void add(Widget w)
Specified by:
add in interface HasWidgets
Specified by:
add in interface InsertPanel
Overrides:
add in class FlowPanel


Copyright © 2015. All rights reserved.