|
||||||||||
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.Composite
com.google.gwt.widgetideas.client.CollapsiblePanel
public class CollapsiblePanel
CollapsiblePanel
makes its contained contents collapsible. By
default, the contents are fully expanded. When collapsed, the contents of the
panel will be displayed only when the user mouse hovers over the hover bar,
otherwise is will stay collapsed to the left. A change event is fired
whenever the CollapsiblePanel
switched between its expanded and
collapsed states.
The default style name is gwt-CollapsiblePanel.
Planned enhancements: Allow panel to be collapsed in arbitrary direction.
Nested Class Summary | |
---|---|
protected static class |
CollapsiblePanel.State
Current CollapsiblePanel state. |
static class |
CollapsiblePanel.Styles
CollapsiblePanel styles. |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
CollapsiblePanel()
Constructor. |
|
CollapsiblePanel(com.google.gwt.user.client.ui.Widget widget)
|
Method Summary | |
---|---|
void |
add(com.google.gwt.user.client.ui.Widget w)
|
void |
addChangeListener(com.google.gwt.user.client.ui.ChangeListener listener)
|
protected void |
becomeCollapsed()
Display this panel in its collapsed state. |
protected void |
becomeExpanded()
Display this panel in its expanded state. |
void |
clear()
|
com.google.gwt.user.client.ui.Widget |
getContents()
|
protected void |
hide()
|
void |
hookupControlToggle(com.google.gwt.user.client.ui.ToggleButton button)
Uses the given toggle button to control whether the panel is collapsed or not. |
void |
initContents(com.google.gwt.user.client.ui.Widget contents)
Initialize the panel's contents. |
boolean |
isCollapsed()
Is the panel currently in its collapsed state. |
java.util.Iterator<com.google.gwt.user.client.ui.Widget> |
iterator()
|
protected void |
onLoad()
This method is called immediately after a widget becomes attached to the browser's document. |
boolean |
remove(com.google.gwt.user.client.ui.Widget w)
|
void |
removeChangeListener(com.google.gwt.user.client.ui.ChangeListener listener)
|
void |
setHoverBarContents(com.google.gwt.user.client.ui.Widget bar)
Sets the contents of the hover bar. |
protected void |
setPanelPos(int pos)
|
void |
setWidth(java.lang.String width)
|
protected void |
show()
|
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getElement, getWidget, initWidget, isAttached, onAttach, onDetach, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, onBrowserEvent, onUnload, removeFromParent, setElement |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CollapsiblePanel()
public CollapsiblePanel(com.google.gwt.user.client.ui.Widget widget)
Method Detail |
---|
public void add(com.google.gwt.user.client.ui.Widget w)
add
in interface com.google.gwt.user.client.ui.HasWidgets
public void addChangeListener(com.google.gwt.user.client.ui.ChangeListener listener)
addChangeListener
in interface com.google.gwt.user.client.ui.SourcesChangeEvents
public void clear()
clear
in interface com.google.gwt.user.client.ui.HasWidgets
public com.google.gwt.user.client.ui.Widget getContents()
public void hookupControlToggle(com.google.gwt.user.client.ui.ToggleButton button)
public void initContents(com.google.gwt.user.client.ui.Widget contents)
contents
- contentspublic boolean isCollapsed()
public java.util.Iterator<com.google.gwt.user.client.ui.Widget> iterator()
iterator
in interface com.google.gwt.user.client.ui.HasWidgets
public boolean remove(com.google.gwt.user.client.ui.Widget w)
remove
in interface com.google.gwt.user.client.ui.HasWidgets
public void removeChangeListener(com.google.gwt.user.client.ui.ChangeListener listener)
removeChangeListener
in interface com.google.gwt.user.client.ui.SourcesChangeEvents
public void setHoverBarContents(com.google.gwt.user.client.ui.Widget bar)
public void setWidth(java.lang.String width)
setWidth
in class com.google.gwt.user.client.ui.UIObject
protected void becomeCollapsed()
protected void becomeExpanded()
protected void hide()
protected void onLoad()
onLoad
in class com.google.gwt.user.client.ui.Widget
protected void setPanelPos(int pos)
protected void show()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |