com.sencha.gxt.widget.core.client
Class CollapsePanel

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.CollapsePanel
All Implemented Interfaces:
HasAttachHandlers, HasResizeHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, BeforeHideEvent.HasBeforeHideHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, ExpandEvent.HasExpandHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MoveEvent.HasMoveHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasItemId

public class CollapsePanel
extends Component
implements ExpandEvent.HasExpandHandlers

Acts as a stand-in for a collapsed ContentPanel. Used by BorderLayoutContainer.


Nested Class Summary
static interface CollapsePanel.CollapsePanelAppearance
          Provides the appearance of a CollapsePanel.
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
CollapsePanel(ContentPanel panel, BorderLayoutContainer.BorderLayoutData data, Style.LayoutRegion region)
          Creates a CollapsePanel that acts as a stand-in for the given panel when it is collapsed.
 
Method Summary
 HandlerRegistration addExpandHandler(ExpandEvent.ExpandHandler handler)
          Adds a ExpandEvent.ExpandHandler handler for ExpandEvent events.
 void collapse()
          Collapses an expanded CollapsePanel, optionally animating it so that it appears to collapse toward the direction of its associated region.
 void collapseHidden()
          Collapses a CollapsePanel so that it is hidden.
 void expand()
          Expands a collapsed CollapsePanel, optionally animating it so that it appears to expand from the direction of its associated region.
 ContentPanel getContentPanel()
          Returns the ContentPanel associated with this CollapsePanel .
 Style.LayoutRegion getRegion()
          Returns the Style.LayoutRegion associated with this CollapsePanel .
 SplitBar getSplitBar()
          Returns the split bar, creating it if necessary.
 void onBrowserEvent(Event event)
           
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getStateId, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollapsePanel

public CollapsePanel(ContentPanel panel,
                     BorderLayoutContainer.BorderLayoutData data,
                     Style.LayoutRegion region)
Creates a CollapsePanel that acts as a stand-in for the given panel when it is collapsed.

Parameters:
panel - the content panel
data - layout data describing a region in a border panel
region - the region this panel occupies in the border panel
Method Detail

addExpandHandler

public HandlerRegistration addExpandHandler(ExpandEvent.ExpandHandler handler)
Description copied from interface: ExpandEvent.HasExpandHandlers
Adds a ExpandEvent.ExpandHandler handler for ExpandEvent events.

Specified by:
addExpandHandler in interface ExpandEvent.HasExpandHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

collapse

public void collapse()
Collapses an expanded CollapsePanel, optionally animating it so that it appears to collapse toward the direction of its associated region. Has no effect if the panel is not expanded.


getSplitBar

public SplitBar getSplitBar()
Returns the split bar, creating it if necessary. Shows a mini-collapse tool in the split bar if the collapse panel was created with BorderLayoutContainer.BorderLayoutData.isCollapseMini() true.

Returns:
the split bar

collapseHidden

public void collapseHidden()
Collapses a CollapsePanel so that it is hidden.


expand

public void expand()
Expands a collapsed CollapsePanel, optionally animating it so that it appears to expand from the direction of its associated region. Has no effect if the panel is not collapsed.


getContentPanel

public ContentPanel getContentPanel()
Returns the ContentPanel associated with this CollapsePanel .

Returns:
the content panel

getRegion

public Style.LayoutRegion getRegion()
Returns the Style.LayoutRegion associated with this CollapsePanel .

Returns:
the layout region

onBrowserEvent

public void onBrowserEvent(Event event)
Specified by:
onBrowserEvent in interface EventListener
Overrides:
onBrowserEvent in class Component


Copyright © 2012. All Rights Reserved.