Interface ContentPanel.ContentPanelAppearance
-
- All Known Subinterfaces:
AccordionLayoutContainer.AccordionLayoutAppearance,FramedPanel.FramedPanelAppearance,Window.WindowAppearance
- All Known Implementing Classes:
AccordionLayoutBaseAppearance,BlueAccordionLayoutAppearance,BlueContentPanelAppearance,BlueFramedPanelAppearance,BlueMessageBoxAppearance,BlueWindowAppearance,ContentPanelBaseAppearance,FramedPanelBaseAppearance,GrayAccordionLayoutAppearance,GrayContentPanelAppearance,GrayFramedPanelAppearance,GrayMessageBoxAppearance,GrayWindowAppearance
- Enclosing class:
- ContentPanel
public static interface ContentPanel.ContentPanelAppearanceThe appearance of a content panel. A content panel has a header, body and footer. The header includes a button that can be used to collapse or expand the body. The button has an icon that changes to indicate whether a collapse or expand is possible. The body contains a single widget, added usingSimpleContainer.add(com.google.gwt.user.client.ui.Widget). The widget is resized to match the size of the container. The footer contains a button bar with optional buttons.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IconButton.IconConfigcollapseIcon()Returns the button icon that indicates a collapse is possible.IconButton.IconConfigexpandIcon()Returns the button icon that indicates an expand is possible.XElementgetBodyWrap(XElement parent)Returns the element that wraps the content panel body.XElementgetContentElem(XElement parent)Returns the content panel body element.XElementgetFooterElem(XElement parent)Returns the content panel footer element.intgetFrameHeight(XElement parent)Returns the total height of the content panel frame elements.intgetFrameWidth(XElement parent)Returns the total width of the content panel frame elements.Header.HeaderAppearancegetHeaderAppearance()Returns the content panel header's appearanceXElementgetHeaderElem(XElement parent)Returns the content panel header element.SizegetHeaderSize(XElement parent)Returns the header size excluding any framing.voidonBodyBorder(XElement parent, boolean border)Handles a change in the visibility of the body border.voidonHideHeader(XElement parent, boolean hide)Hides or shows the header.voidrender(com.google.gwt.safehtml.shared.SafeHtmlBuilder sb)Renders the appearance of a content panel as HTML into aSafeHtmlBuilder, suitable for passing toElement.setInnerSafeHtml(SafeHtml)on a container element.
-
-
-
Method Detail
-
collapseIcon
IconButton.IconConfig collapseIcon()
Returns the button icon that indicates a collapse is possible.- Returns:
- the collapse icon
-
expandIcon
IconButton.IconConfig expandIcon()
Returns the button icon that indicates an expand is possible.- Returns:
- the expand icon
-
getBodyWrap
XElement getBodyWrap(XElement parent)
Returns the element that wraps the content panel body. In the default implementation, this wraps the body widget and footer.- Parameters:
parent- the content panel root element- Returns:
- the element that wraps the body
-
getContentElem
XElement getContentElem(XElement parent)
Returns the content panel body element.- Parameters:
parent- the content panel root element- Returns:
- the body element
-
getFooterElem
XElement getFooterElem(XElement parent)
Returns the content panel footer element.- Parameters:
parent- the content panel root element- Returns:
- the body element
-
getFrameHeight
int getFrameHeight(XElement parent)
Returns the total height of the content panel frame elements.- Parameters:
parent- the content panel root element- Returns:
- the total height of the frame elements
-
getFrameWidth
int getFrameWidth(XElement parent)
Returns the total width of the content panel frame elements.- Parameters:
parent- the content panel root element- Returns:
- the total width of the frame elements
-
getHeaderAppearance
Header.HeaderAppearance getHeaderAppearance()
Returns the content panel header's appearance- Returns:
- the header appearance
-
getHeaderElem
XElement getHeaderElem(XElement parent)
Returns the content panel header element.- Parameters:
parent- the content panel root element- Returns:
- the content panel header element
-
getHeaderSize
Size getHeaderSize(XElement parent)
Returns the header size excluding any framing.- Parameters:
parent- the content panel root element- Returns:
- the header size
-
onBodyBorder
void onBodyBorder(XElement parent, boolean border)
Handles a change in the visibility of the body border.- Parameters:
parent- content panel root elementborder- true to display the border
-
onHideHeader
void onHideHeader(XElement parent, boolean hide)
Hides or shows the header.- Parameters:
parent- content panel root elementhide- true to hide the header
-
render
void render(com.google.gwt.safehtml.shared.SafeHtmlBuilder sb)
Renders the appearance of a content panel as HTML into aSafeHtmlBuilder, suitable for passing toElement.setInnerSafeHtml(SafeHtml)on a container element.- Parameters:
sb- receives the rendered appearance
-
-