|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.github.gwtbootstrap.client.ui.base.ComplexWidget
com.github.gwtbootstrap.client.ui.base.HoverBase
public abstract class HoverBase
Base class for widgets that hover above other widgets.
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.HasWidgets |
---|
HasWidgets.ForIsWidget |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
---|
IndexedPanel.ForIsWidget |
Field Summary | |
---|---|
protected boolean |
animated
Whether the widget is animated or not. |
protected int |
hideDelayInMilliseconds
The delay until the widget is hidden. |
protected Placement |
placement
The placement of the widget relative to its trigger element. |
protected int |
showDelayInMilliseconds
The delay until the widget is shown. |
protected Trigger |
trigger
The action that triggers the widget. |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
HoverBase()
Creates a new widget based on the provided HTML tag. |
Method Summary | |
---|---|
void |
add(Widget w)
Adds a widget to this panel. |
protected abstract void |
changeVisibility(VisibilityChange visibilityChange)
Changes the visibility of the widget. |
boolean |
getAnimation()
Gets whether the widget is animated. |
protected Element |
getContainerElement()
Override this method to specify that an element other than the root element be the container for the panel's child widget. |
protected String |
getDataAttribute(String attribute)
Returns the data stored in one of the widget's HTML data attributes. |
protected abstract String |
getDataName()
Get data name of JS Data API. |
int |
getHideDelay()
Gets the time to wait until the widget is hidden. |
Placement |
getPlacement()
Gets the widget's placement. |
int |
getShowDelay()
Gets the time to wait until the widget is shown. |
Trigger |
getTrigger()
Gets the widget's Trigger. |
Widget |
getWidget()
Gets the panel's child widget. |
void |
hide()
Hides the widget if it was previously shown. |
Iterator<Widget> |
iterator()
|
protected void |
onLoad()
|
abstract void |
reconfigure()
Redraws the widget with the currently set options. |
boolean |
remove(Widget w)
|
protected void |
removeDataIfExists()
|
protected void |
removeDataIfExists(Element e,
String dataName)
|
void |
setAnimation(boolean animated)
Sets whether the Widget should be animated. |
protected void |
setDataAttribute(Element e,
String attribute,
String value)
Adds an HTML data attribute to the widget's tag. |
void |
setHideDelay(int delayInMilliseconds)
Sets the time to wait until the widget is hidden. |
void |
setPlacement(Placement placement)
Sets the widget's placement. |
void |
setShowDelay(int delayInMilliseconds)
Sets the time to wait until the widget is shown. |
void |
setTrigger(Trigger trigger)
Sets the trigger that activates the widget. |
void |
setWidget(IsWidget w)
|
void |
setWidget(Widget w)
Sets this panel's widget. |
void |
show()
Shows the widget if it was previously hidden. |
void |
toggle()
Toggles the view state of the widget. |
Methods inherited from class com.github.gwtbootstrap.client.ui.base.ComplexWidget |
---|
addStyle, insert, removeStyle, setHideOn, setShowOn, setStyle |
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
---|
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, remove |
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, onBrowserEvent, onDetach, 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.HasWidgets |
---|
clear |
Methods inherited from interface com.google.gwt.user.client.ui.HasText |
---|
getText, setText |
Field Detail |
---|
protected boolean animated
protected Placement placement
protected Trigger trigger
protected int showDelayInMilliseconds
protected int hideDelayInMilliseconds
Constructor Detail |
---|
public HoverBase()
Method Detail |
---|
protected void onLoad()
onLoad
in class Widget
protected void removeDataIfExists()
protected void removeDataIfExists(Element e, String dataName)
protected void setDataAttribute(Element e, String attribute, String value)
e
- target elementattribute
- the name of the attribute without leading "data-"
value
- the value to be storedprotected String getDataAttribute(String attribute)
attribute
- the name of the attribute without leading "data-"
public void setAnimation(boolean animated)
setAnimation
in interface IsAnimated
animated
- true
if the widget should be animated.public abstract void reconfigure()
public boolean getAnimation()
getAnimation
in interface IsAnimated
true
if the widget is animatedpublic void setPlacement(Placement placement)
setPlacement
in interface HasPlacement
placement
- the placementpublic Placement getPlacement()
getPlacement
in interface HasPlacement
public void setTrigger(Trigger trigger)
setTrigger
in interface HasTrigger
trigger
- the triggerpublic Trigger getTrigger()
getTrigger
in interface HasTrigger
public void setShowDelay(int delayInMilliseconds)
setShowDelay
in interface HasShowDelay
delayInMilliseconds
- the delay in millisecondspublic int getShowDelay()
getShowDelay
in interface HasShowDelay
public void setHideDelay(int delayInMilliseconds)
setHideDelay
in interface HasShowDelay
delayInMilliseconds
- the delay in millisecondspublic int getHideDelay()
getHideDelay
in interface HasShowDelay
public void show()
public void hide()
public void toggle()
It will be hidden if it was previously shown and shown if it was previously hidden.
protected abstract void changeVisibility(VisibilityChange visibilityChange)
visibilityChange
- the action to be performedpublic void add(Widget w)
add
in interface HasWidgets
add
in class ComplexWidget
w
- the child widget to be addedpublic Widget getWidget()
getWidget
in interface HasOneWidget
null
if none is presentpublic Iterator<Widget> iterator()
iterator
in interface HasWidgets
iterator
in interface Iterable<Widget>
iterator
in class ComplexPanel
public boolean remove(Widget w)
remove
in interface HasWidgets
remove
in class ComplexPanel
public void setWidget(IsWidget w)
setWidget
in interface AcceptsOneWidget
public void setWidget(Widget w)
setWidget
in interface HasOneWidget
w
- the panel's new widget, or null
to clear the
panelprotected Element getContainerElement()
Element
class defined in the
User
module to maintain backwards compatibility.
protected abstract String getDataName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |