public class Collapse extends MarkupWidget implements HasVisibility, HasVisibleHandlers
It's a markup widget (decorator widget).
it's can exchange child to Collapsible widget.
It's need trigger, You have 2 ways to create trigger.
CollapseTrigger. toggle().
<b:Collapse b:id="toggle1" defaultOpen="true">
<!-- it can be added any widget, but accept one wdiget.
<b:Label>aaa</b:Label>
</b:Collapse>
Accordion,
Collapse,
CollapseTrigger,
Twitter Bootstrap documentHasWidgets.ForIsWidgetwidget| Constructor and Description |
|---|
Collapse() |
| Modifier and Type | Method and Description |
|---|---|
HandlerRegistration |
addHiddenHandler(HiddenHandler handler)
Adds a
HiddenEvent handler. |
HandlerRegistration |
addHideHandler(HideHandler handler)
Adds a
HideEvent handler. |
HandlerRegistration |
addShowHandler(ShowHandler handler)
Adds a
ShowEvent handler. |
HandlerRegistration |
addShownHandler(ShownHandler handler)
Adds a
ShownEvent handler. |
Widget |
asWidget() |
protected void |
changeVisibility(Element e,
String c) |
protected void |
changeVisibility(Element e,
String visibility,
boolean autoTriggered) |
static void |
changeVisibility(String target,
String c) |
static void |
changeVisibility(String target,
String c,
boolean autoTriggered) |
protected void |
changeVisibility(VisibilityChange visibilityChange)
Change visibility
|
protected void |
changeVisibility(VisibilityChange visibilityChange,
boolean autoTriggered) |
void |
configure(Element e,
String parent,
boolean toggle)
Configure collapse settings.
|
static void |
configure(String selector,
String parent,
boolean toggle)
Configure collapse settings.
|
String |
getParent()
Get parent selector
|
void |
hide()
Hides the widget if it was previously shown.
|
void |
hide(boolean autoHidden) |
boolean |
isExistTrigger()
Is exist Trigger?
|
boolean |
isToggle()
is the collapsible element toggled on invocation
|
protected void |
onHidden(Event e)
This method is called once the widget is completely hidden.
|
protected void |
onHide(Event e)
This method is called immediately when the widget's
hide()
method is executed. |
protected void |
onShow(Event e)
This method is called immediately when the widget's
show()
method is executed. |
protected void |
onShown(Event e)
This method is called once the widget is completely shown.
|
void |
reconfigure()
re configure setting
|
protected void |
removeDataIfExists(Element e)
Remove data api.
|
void |
setDefaultOpen(boolean dafaultOpen) |
void |
setExistTrigger(boolean existTrigger)
Is there the trigger(Collapse Trigger)
|
protected void |
setHandlerFunctions(Element e)
Links the Java functions that fire the events.
|
void |
setParent(String parent)
Set parent selector.
|
void |
setToggle(boolean toggle)
Toggles the collapsible element on invocation
|
void |
setWidget(Widget w) |
void |
show()
Shows the widget if it was previously hidden.
|
void |
show(boolean autoShown) |
void |
toggle()
Toggles the view state of the widget.
|
public Collapse()
public void setParent(String parent)
AccordionGroup,
Please see this issue.parent - parent selectorpublic boolean isToggle()
public void setToggle(boolean toggle)
toggle - true: toggled on invocation , false : not-toggledpublic void setDefaultOpen(boolean dafaultOpen)
public Widget asWidget()
asWidget in interface IsWidgetasWidget in class MarkupWidgetpublic void setWidget(Widget w)
setWidget in interface HasOneWidgetsetWidget in class MarkupWidgetpublic HandlerRegistration addHideHandler(HideHandler handler)
HideEvent handler.addHideHandler in interface HasVisibleHandlershandler - the hide handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addHiddenHandler(HiddenHandler handler)
HiddenEvent handler.addHiddenHandler in interface HasVisibleHandlershandler - the hidden handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addShowHandler(ShowHandler handler)
ShowEvent handler.addShowHandler in interface HasVisibleHandlershandler - the show handlerHandlerRegistration used to remove this handlerpublic HandlerRegistration addShownHandler(ShownHandler handler)
ShownEvent handler.addShownHandler in interface HasVisibleHandlershandler - the shown handlerHandlerRegistration used to remove this handlerpublic void show(boolean autoShown)
public void show()
show in interface HasVisibilitypublic void hide()
hide in interface HasVisibilitypublic void hide(boolean autoHidden)
public void toggle()
It will be hidden if it was previously shown and shown if it was previously hidden.
toggle in interface HasVisibilityprotected void changeVisibility(VisibilityChange visibilityChange)
visibilityChange - call methodprotected void changeVisibility(VisibilityChange visibilityChange, boolean autoTriggered)
public boolean isExistTrigger()
public void setExistTrigger(boolean existTrigger)
existTrigger - exists:true, none:falsepublic void reconfigure()
public void configure(Element e, String parent, boolean toggle)
e - elementparent - parent selectortoggle - is toggled on added documentpublic static void configure(String selector, String parent, boolean toggle)
selector - selectorparent - parent selectortoggle - is toggled on added documentprotected void removeDataIfExists(Element e)
e - elementprotected void setHandlerFunctions(Element e)
protected void changeVisibility(Element e, String c)
protected void changeVisibility(Element e, String visibility, boolean autoTriggered)
public static void changeVisibility(String target, String c)
public static void changeVisibility(String target, String c, boolean autoTriggered)
protected void onHide(Event e)
hide()
method is executed.protected void onHidden(Event e)
protected void onShow(Event e)
show()
method is executed.Copyright © 2012-2014 gwtbootstrap. All Rights Reserved.