Class ContentPanel

    • Constructor Detail

      • ContentPanel

        public ContentPanel()
        Creates a content panel with default appearance.
      • ContentPanel

        public ContentPanel​(ContentPanel.ContentPanelAppearance appearance)
        Creates a content panel with the specified appearance.
        Parameters:
        appearance - the appearance of the content panel.
    • Method Detail

      • addButton

        @UiChild
        public void addButton​(com.google.gwt.user.client.ui.Widget widget)
        Adds a widget the the button bar.
        Parameters:
        widget - the widget to add
      • addTool

        @UiChild
        public void addTool​(com.google.gwt.user.client.ui.Widget tool)
        Adds a Tool to Header
        Parameters:
        tool - the tool to add
      • collapse

        public void collapse()
        Description copied from interface: Collapsible
        Collapses the widget.
        Specified by:
        collapse in interface Collapsible
      • expand

        public void expand()
        Description copied from interface: Collapsible
        Expands the widget.
        Specified by:
        expand in interface Collapsible
      • getAnimationDuration

        public int getAnimationDuration()
        Gets the duration for the expand/collapse animations
        Returns:
        the duration for the expand/collapse animations in milliseconds.
      • setAnimationDuration

        public void setAnimationDuration​(int animationDuration)
        Sets the duration for the expand/collapse animations.
        Parameters:
        animationDuration - the duration of the expand/collapse animations in milliseconds
      • getAppearance

        public ContentPanel.ContentPanelAppearance getAppearance()
        Gets a reference to the appearance this object was instantiated with
        Returns:
        the appearance impl used by this component
      • getBody

        public XElement getBody()
        Returns the panel's body element.
        Returns:
        the body
      • getBodyWrap

        public XElement getBodyWrap()
        Returns the panel's body wrap element.
        Returns:
        the body wrap
        Since:
        4.0.3
      • setButtonAlign

        public void setButtonAlign​(BoxLayoutContainer.BoxLayoutPack buttonAlign)
        Sets the button alignment of any buttons added to this panel (defaults to RIGHT, pre-render).
        Parameters:
        buttonAlign - the button alignment
      • getButtonBar

        public ButtonBar getButtonBar()
        Returns the content panel button bar. In the default implementation, the button bar is displayed in the content panel's footer.
        Returns:
        the button bar
      • getMinButtonWidth

        public int getMinButtonWidth()
        Returns the minimum button width.
        Returns:
        the minimum button width
      • setMinButtonWidth

        public void setMinButtonWidth​(int width)
        Sets the minimum button width.
        Parameters:
        width - the button width
      • isAnimCollapse

        public boolean isAnimCollapse()
        Returns true if animated collapsing is enabled.
        Returns:
        true if animating
      • setAnimCollapse

        public void setAnimCollapse​(boolean animCollapse)
        Sets whether expand and collapse is animating (defaults to true).
        Parameters:
        animCollapse - true to enable animations
      • isCollapsed

        public boolean isCollapsed()
        Returns true if the panel is collapsed.
        Returns:
        the collapsed state
      • isCollapsible

        public boolean isCollapsible()
        Returns true if the panel is collapsible.
        Returns:
        the collapsible state
      • 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.
        Parameters:
        collapsible - the collapsible state
      • isExpanded

        public boolean isExpanded()
        Description copied from interface: Collapsible
        Returns true if the widget is expanded.
        Specified by:
        isExpanded in interface Collapsible
        Returns:
        true for expanded
      • isHeaderVisible

        public boolean isHeaderVisible()
        Returns true if the header is visible.
        Returns:
        header visibility
        Since:
        4.0.3
      • setExpanded

        public void setExpanded​(boolean expanded)
        Sets the panel's expand state.
        Parameters:
        expanded - true to expand
      • isHideCollapseTool

        public boolean isHideCollapseTool()
        Returns true if the collapse tool is hidden.
        Returns:
        the hide collapse tool state
      • setHideCollapseTool

        public void setHideCollapseTool​(boolean hideCollapseTool)
        Sets whether the collapse tool should be displayed (when setCollapsible(boolean) = true)
        Parameters:
        hideCollapseTool - true if the tool is hidden
      • isTitleCollapse

        public boolean isTitleCollapse()
        Returns true if title collapsing has been enabled.
        Returns:
        true for title collapse
      • setTitleCollapse

        public void setTitleCollapse​(boolean titleCollapse)
        True to allow expanding and collapsing the panel (when setCollapsible(boolean) = true) by clicking anywhere in the header bar, false to allow it only by clicking to tool button (defaults to false).
        Parameters:
        titleCollapse - the titleCollapse to set
      • onBrowserEvent

        public void onBrowserEvent​(com.google.gwt.user.client.Event event)
        Specified by:
        onBrowserEvent in interface com.google.gwt.user.client.EventListener
        Overrides:
        onBrowserEvent in class Component
      • setBodyBorder

        public void setBodyBorder​(boolean border)
        Displays or hides the body border.
        Parameters:
        border - true to display the border
      • setBodyStyle

        public void setBodyStyle​(String style)
        Sets multiple style properties on the body element. Style attribute names must be in lower camel case, e.g. "backgroundColor:white; color:red;"
        Parameters:
        style - the style(s) to set
      • setBodyStyleName

        public void setBodyStyleName​(String style)
        Adds a style class name to the body element.
        Parameters:
        style - the style class name
      • getHeader

        public Header getHeader()
        Returns the content panel header.
        Returns:
        the header
      • setHeaderVisible

        public void setHeaderVisible​(boolean visible)
        Shows or hides the content panel header.
        Parameters:
        visible - true to show the header.
      • getHeading

        public com.google.gwt.safehtml.shared.SafeHtml getHeading()
        Returns the heading html.
        Returns:
        the heading html
      • setHeading

        public void setHeading​(com.google.gwt.safehtml.shared.SafeHtml html)
        Sets the heading html.
        Parameters:
        html - the heading html
      • setHeading

        public void setHeading​(String text)
        Sets the heading text. Text that contains reserved html characters will be escaped.
        Parameters:
        text - the text
      • initTools

        public void initTools()