Package org.zkoss.zul

Class Toolbar

All Implemented Interfaces:
Serializable, Cloneable, Component, Scope, ComponentCtrl

public class Toolbar extends XulElement
A toolbar.

Mold:

  1. default
  2. panel: since 3.5.0, this mold is used for Panel component as its foot toolbar.

Default getZclass(): z-toolbar

Author:
tomyeh
See Also:
  • Constructor Details

    • Toolbar

      public Toolbar()
    • Toolbar

      public Toolbar(String orient)
      Parameters:
      orient - either "horizontal" or "vertical".
  • Method Details

    • getAlign

      public String getAlign()
      Returns the alignment of any children added to this toolbar. Valid values are "start", "end" and "center".

      Default: "start"

      Since:
      3.5.0
    • setAlign

      public void setAlign(String align)
      Sets the alignment of any children added to this toolbar. Valid values are "start", "end" and "center".

      Default: "start", if null, "start" is assumed.

      Since:
      3.5.0
    • getZclass

      public String getZclass()
      Description copied from class: HtmlBasedComponent
      Returns the ZK Cascading Style class for this component. It usually depends on the implementation of the mold (AbstractComponent.getMold()).

      Default: null (the default value depends on element).

      HtmlBasedComponent.setZclass(java.lang.String)) will completely replace the default style of a component. In other words, the default style of a component is associated with the default value of HtmlBasedComponent.getZclass(). Once it is changed, the default style won't be applied at all. If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String) instead.

      Overrides:
      getZclass in class HtmlBasedComponent
      See Also:
    • getOrient

      public String getOrient()
      Returns the orient.

      Default: "horizontal".

    • setOrient

      public void setOrient(String orient) throws WrongValueException
      Sets the orient.
      Parameters:
      orient - either "horizontal" or "vertical".
      Throws:
      WrongValueException
    • isOverflowPopup

      public boolean isOverflowPopup()
      Return whether toolbar has a button that shows a popup which contains those content weren't able to fit in the toolbar. If overflowPopup is false, toolbar will display multiple rows when content is wider than toolbar. Default: false.
      Returns:
      whether toolbar has a button that shows a popup
      Since:
      8.6.0
    • setOverflowPopup

      public void setOverflowPopup(boolean overflowPopup)
      Set whether toolbar has a button that shows a popup which contains those content weren't able to fit in the toolbar. If overflowPopup is false, toolbar will display multiple rows when content is wider than toolbar.
      Parameters:
      overflowPopup - whether toolbar has a button that shows a popup
      Since:
      8.6.0
    • renderProperties

      protected void renderProperties(ContentRenderer renderer) throws IOException
      Description copied from class: HtmlBasedComponent
      Renders the content of this component, excluding the enclosing tags and children.

      See also ZK Client-side Reference: Property Rendering

      Overrides:
      renderProperties in class XulElement
      Throws:
      IOException
    • getOverflowPopupIconSclass

      public String getOverflowPopupIconSclass()
      Returns the overflow sclass name of overflow popup icon of this toolbar. Default: z-icon-ellipsis-h.
      Returns:
      the overflow popup icon sclass name of this toolbar.
      Since:
      9.6.0
    • setOverflowPopupIconSclass

      public void setOverflowPopupIconSclass(String overflowPopupIconSclass)
      When isOverflowPopup() is true, toolbar has a button that shows a popup users can customize the overflow popup icon. Default: z-icon-ellipsis-h.
      Parameters:
      overflowPopupIconSclass - refer to FontAwesome Cheatsheet.
      Since:
      9.6.0