com.extjs.gxt.ui.client.widget
クラス ContentPanel

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.Container<T>
                      extended by com.extjs.gxt.ui.client.widget.ScrollContainer<Component>
                          extended by com.extjs.gxt.ui.client.widget.LayoutContainer
                              extended by com.extjs.gxt.ui.client.widget.ContentPanel
すべての実装インターフェース:
Observable, com.google.gwt.user.client.EventListener
Direct Known Subclasses:
CollapsePanel, FormPanel, Info, Tip, Window

public class ContentPanel
extends LayoutContainer

ContentPanel is a component container that has specific functionality and structural components that make it the perfect building block for application-oriented user interfaces. The Panel contains bottom and top toolbars, along with separate header, footer and body sections. It also provides built-in expandable and collapsible behavior, along with a variety of prebuilt tool buttons that can be wired up to provide other customized behavior.

Events:
BeforeExpand : ComponentEvent(component)
Fires before the panel is expanded. Listeners can set the doit field to false to cancel the expand.
Expand : ComponentEvent(component)
Fires after the panel is expanded
BeforeCollapse : ComponentEvent(component)
Fires before the panel is collpased. Listeners can set the doit field false to cancel the collapse.
Collapse : ComponentEvent(component)
Fires after the panel is collapsed.
BeforeClose : ComponentEvent(component)
Fires before a content panel is closed. Listeners can set the doit field to false to cancel the operation.
Close : ComponentEvent(component)
Fires after a content panel is closed.


入れ子クラス 概要
 
クラス com.google.gwt.user.client.ui.UIObject から継承された入れ子クラス/インタフェース
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field 概要
 
クラス com.google.gwt.user.client.ui.UIObject から継承されたフィールド(Fields)
DEBUG_ID_PREFIX
 
コンストラクタ 概要
ContentPanel()
          Creates a new panel instance.
ContentPanel(Layout layout)
          Creates a new content panel.
 
メソッド 概要
 void addButton(Button button)
          Adds a button the the panel.
 void collapse()
          Collapses the panel body so that it becomes hidden.
 void expand()
          Expands the panel body so that it becomes visible.
 boolean getAnimCollapse()
          Returns true if animation is enabled for expand / collapse.
 boolean getBodyBorder()
          Returns true if the body border is enabled.
 java.lang.String getBodyStyle()
          Returns the body style.
 Component getBottomComponent()
          Returns the panel's bottom component.
 Style.HorizontalAlignment getButtonAlign()
          Returns the panel's button alignment.
 ButtonBar getButtonBar()
          Returns the panel's button bar.
 boolean getCollapsible()
          Returns true if the panel is collapsible.
 com.google.gwt.user.client.Element getElement(java.lang.String name)
          Provides access to internal elements.
 boolean getFooter()
           
 boolean getFrame()
          Returns true if framing is enabled.
 int getFrameHeight()
          Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and header and footer elements, but not including the body height).
 int getFrameWidth()
          Returns the width in pixels of the framing elements of this panel (not including the body width).
 Header getHeader()
          Returns the panel's header.
 int getInnerHeight()
          Returns the height in pixels of the body element (not including the height of any framing elements).
 int getInnerWidth()
          Returns the width in pixels of the body element (not including the width of any framing elements).
 El getLayoutTarget()
          Override this method to specify the element to be used by the layout as the container.
 boolean getTitleCollapse()
           
 java.lang.String getTitleText()
          Returns the panel's title text.
 Component getTopComponent()
          Returns the panels top component.
 com.google.gwt.user.client.ui.Widget getWidget(java.lang.String field)
           
 boolean isExpanded()
          Returns true if the panel is expanded.
 boolean isHeaderVisible()
          Returns true if the header is visible.
 boolean isHideCollapseTool()
          Returns true if the collapse tool is hidden.
 void onComponentEvent(ComponentEvent ce)
          Any events a component receives will be forwarded to this method.
 void setAnimCollapse(boolean animCollapse)
          Sets whether exand and collapse is animating (defaults to true, pre-render).
 void setBodyBorder(boolean bodyBorder)
          True to display the borders of the panel's body element, false to hide them (defaults to true, pre-render).
 void setBodyStyle(java.lang.String bodyStyle)
          Custom CSS styles to be applied to the body element in the format expected by El.applyStyles(java.lang.String) (pre-render).
 void setBodyStyleName(java.lang.String style)
          A style name that is added to the panel's body element (pre-render).
 void setBottomComponent(Component bottomComponent)
          Sets the panel's bottom component (pre-render).
 void setButtonAlign(Style.HorizontalAlignment buttonAlign)
          Sets the button alignment of any buttons added to this panel (defaults to RIGHT, pre-render).
 void setButtonBar(ButtonBar buttonBar)
           
 void setCollapsible(boolean collapsible)
          True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into the header tool button area, false to keep the panel statically sized with no button (defaults to false, pre-render).
 void setExpanded(boolean expanded)
          Sets the panel's expand state.
 void setFooter(boolean footer)
          True to create the footer element explicitly, false to skip creating it (pre-render).
 void setFrame(boolean frame)
          True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false, pre-render).
 void setHeaderVisible(boolean headerVisible)
          True to create the header element explicitly, false to skip creating it (defaults to true, pre-render).
 void setHeading(java.lang.String text)
          Sets the title text for the panel.
 void setHideCollapseTool(boolean hideCollapseTool)
          Sets whether the collapse tool should be displayed when the panel is collapsible.
 void setIconStyle(java.lang.String iconStyle)
          Sets the header's icon style.
 void setInsetBorder(boolean insetBorder)
          True to display an interior border on the body element of the panel, false to hide it (defaults to true, pre-render).
 void setTitleCollapse(boolean titleCollapse)
          True to allow expanding and collapsing the panel (when collapsible = true) by clicking anywhere in the header bar, false to allow it only by clicking to tool button (defaults to false, pre-render).
 void setTopComponent(Component topComponent)
          Sets the panel's top component (pre-render).
 com.google.gwt.user.client.ui.Frame setUrl(java.lang.String url)
          Adds the content from the given url.
 
クラス com.extjs.gxt.ui.client.widget.LayoutContainer から継承されたメソッド
add, add, addText, findComponent, getLayout, getLayoutOnChange, insert, insert, isMonitorResize, isMonitorWindowResize, layout, remove, removeAll, setLayout, setLayoutData, setLayoutOnChange, setMonitorWindowResize
 
クラス com.extjs.gxt.ui.client.widget.ScrollContainer から継承されたメソッド
addScrollListener, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition
 
クラス com.extjs.gxt.ui.client.widget.Container から継承されたメソッド
findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, iterator, scrollIntoView
 
クラス com.extjs.gxt.ui.client.widget.BoxComponent から継承されたメソッド
getBounds, getHeight, getHeight, getPosition, getShadow, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShim, setSize, setSize, setWidth, setWidth
 
クラス com.extjs.gxt.ui.client.widget.Component から継承されたメソッド
addListener, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hide, hideToolTip, isEnabled, isRendered, isVisible, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setId, setIntStyleAttribute, setItemId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, show, toString
 
クラス com.google.gwt.user.client.ui.Widget から継承されたメソッド
getParent, isAttached
 
クラス com.google.gwt.user.client.ui.UIObject から継承されたメソッド
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタ 詳細

ContentPanel

public ContentPanel()
Creates a new panel instance.


ContentPanel

public ContentPanel(Layout layout)
Creates a new content panel.

パラメータ:
layout - the panel's layout
メソッド 詳細

setButtonBar

public void setButtonBar(ButtonBar buttonBar)

addButton

public void addButton(Button button)
Adds a button the the panel.

パラメータ:
button - the button to add

collapse

public void collapse()
Collapses the panel body so that it becomes hidden. Fires the BeforeCollapse before collapsing, then the Collapse event after collapsing.


expand

public void expand()
Expands the panel body so that it becomes visible. Fires the BeforeExpand before expanding, then the Expand event after expanding.


getAnimCollapse

public boolean getAnimCollapse()
Returns true if animation is enabled for expand / collapse.

戻り値
the animCollapse true for animations

getBodyBorder

public boolean getBodyBorder()
Returns true if the body border is enabled.

戻り値
the body border state

getBodyStyle

public java.lang.String getBodyStyle()
Returns the body style.

戻り値
the body style

getBottomComponent

public Component getBottomComponent()
Returns the panel's bottom component.

戻り値:
the bottom component

getButtonAlign

public Style.HorizontalAlignment getButtonAlign()
Returns the panel's button alignment.

戻り値:
the button alignment

getButtonBar

public ButtonBar getButtonBar()
Returns the panel's button bar.

戻り値:
the button bar

getCollapsible

public boolean getCollapsible()
Returns true if the panel is collapsible.

戻り値:
the collapsible state

getElement

public com.google.gwt.user.client.Element getElement(java.lang.String name)
Provides access to internal elements.

Valid values are:

パラメータ:
name - the element name
戻り値:
the element

getFooter

public boolean getFooter()
戻り値:
the footer

getFrame

public boolean getFrame()
Returns true if framing is enabled.

戻り値:
the frame state

getFrameHeight

public int getFrameHeight()
Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and header and footer elements, but not including the body height). To retrieve the body height see getInnerHeight().

戻り値:
the frame height

getFrameWidth

public int getFrameWidth()
Returns the width in pixels of the framing elements of this panel (not including the body width). To retrieve the body width see getInnerWidth().

戻り値:
The frame width

getHeader

public Header getHeader()
Returns the panel's header.

戻り値:
the header

getInnerHeight

public int getInnerHeight()
Returns the height in pixels of the body element (not including the height of any framing elements). For the frame height see getFrameHeight().

戻り値:
the inner height

getInnerWidth

public int getInnerWidth()
Returns the width in pixels of the body element (not including the width of any framing elements). For the frame width see getFrameWidth().

戻り値:
the body width

getLayoutTarget

public El getLayoutTarget()
Description copied from class: LayoutContainer
Override this method to specify the element to be used by the layout as the container. Allows the container to be decorated.

オーバーライド:
getLayoutTarget in class LayoutContainer
戻り値:
the element to be used as the panel's container

getTitleCollapse

public boolean getTitleCollapse()
戻り値:
the titleCollapse

getTitleText

public java.lang.String getTitleText()
Returns the panel's title text.

戻り値:
the title text

getTopComponent

public Component getTopComponent()
Returns the panels top component.

戻り値:
the top component

getWidget

public com.google.gwt.user.client.ui.Widget getWidget(java.lang.String field)

isExpanded

public boolean isExpanded()
Returns true if the panel is expanded.

戻り値:
the expand state

isHeaderVisible

public boolean isHeaderVisible()
Returns true if the header is visible.

戻り値:
the header visible state

isHideCollapseTool

public boolean isHideCollapseTool()
Returns true if the collapse tool is hidden.

戻り値:
the hide collapse tool state

onComponentEvent

public void onComponentEvent(ComponentEvent ce)
Description copied from class: Component
Any events a component receives will be forwarded to this method. Subclasses should override as needed. The Component.onBrowserEvent(com.google.gwt.user.client.Event) method should not be overridden or modified.

オーバーライド:
onComponentEvent in class ScrollContainer<Component>
パラメータ:
ce - the base event

setAnimCollapse

public void setAnimCollapse(boolean animCollapse)
Sets whether exand and collapse is animating (defaults to true, pre-render).

パラメータ:
animCollapse - true to enable animations

setInsetBorder

public void setInsetBorder(boolean insetBorder)
True to display an interior border on the body element of the panel, false to hide it (defaults to true, pre-render). This only applies when setBodyBorder(boolean) == true.

パラメータ:
insetBorder - true to display the interior border

setBodyStyle

public void setBodyStyle(java.lang.String bodyStyle)
Custom CSS styles to be applied to the body element in the format expected by El.applyStyles(java.lang.String) (pre-render).

パラメータ:
bodyStyle - the body style

setBodyStyleName

public void setBodyStyleName(java.lang.String style)
A style name that is added to the panel's body element (pre-render).

パラメータ:
style - the style name

setBodyBorder

public void setBodyBorder(boolean bodyBorder)
True to display the borders of the panel's body element, false to hide them (defaults to true, pre-render). By default, the border is a 2px wide inset border, but this can be further altered by setting setBodyBorder(boolean) to false.

パラメータ:
bodyBorder - true for a body border

setBottomComponent

public void setBottomComponent(Component bottomComponent)
Sets the panel's bottom component (pre-render). The component's natural height will be used and will not be changed by the panel.

パラメータ:
bottomComponent - the bottom component

setButtonAlign

public void setButtonAlign(Style.HorizontalAlignment buttonAlign)
Sets the button alignment of any buttons added to this panel (defaults to RIGHT, pre-render).

パラメータ:
buttonAlign - the button alignment

setCollapsible

public void setCollapsible(boolean collapsible)
True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into the header tool button area, false to keep the panel statically sized with no button (defaults to false, pre-render).

パラメータ:
collapsible - the collapsible to set

setExpanded

public void setExpanded(boolean expanded)
Sets the panel's expand state.

パラメータ:
expanded - true true to expand

setFooter

public void setFooter(boolean footer)
True to create the footer element explicitly, false to skip creating it (pre-render). By default, when footer is not specified, if one or more buttons have been added to the panel the footer will be created automatically, otherwise it will not.

パラメータ:
footer - the footer state

setFrame

public void setFrame(boolean frame)
True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false, pre-render).

パラメータ:
frame - true to use the frame style

setHeaderVisible

public void setHeaderVisible(boolean headerVisible)
True to create the header element explicitly, false to skip creating it (defaults to true, pre-render). By default, when header is not specified, if a setHeading(String) is set the header will be created automatically, otherwise it will not. If a title is set but header is explicitly set to false, the header will not be rendered.

パラメータ:
headerVisible - true to show the header

setHeading

public void setHeading(java.lang.String text)
Sets the title text for the panel.

パラメータ:
text - the title text

setHideCollapseTool

public void setHideCollapseTool(boolean hideCollapseTool)
Sets whether the collapse tool should be displayed when the panel is collapsible.

パラメータ:
hideCollapseTool - true if the tool is hidden

setIconStyle

public void setIconStyle(java.lang.String iconStyle)
Sets the header's icon style.

パラメータ:
iconStyle - the icon style

setTitleCollapse

public void setTitleCollapse(boolean titleCollapse)
True to allow expanding and collapsing the panel (when collapsible = true) by clicking anywhere in the header bar, false to allow it only by clicking to tool button (defaults to false, pre-render).

パラメータ:
titleCollapse - the titleCollapse to set

setTopComponent

public void setTopComponent(Component topComponent)
Sets the panel's top component (pre-render).

パラメータ:
topComponent - the component

setUrl

public com.google.gwt.user.client.ui.Frame setUrl(java.lang.String url)
Adds the content from the given url.

パラメータ:
url - the url
戻り値
the new frame instance