java.lang.Object
org.ametys.core.ui.ribbonconfiguration.Toolbar
All Implemented Interfaces:
Element

public class Toolbar extends Object implements Element
A toolbar of controls
  • Field Details

    • _colspan

      protected int _colspan
      Number of columns used by the control upon some layouts. 1 is the common and default value
    • _elements

      protected List<Element> _elements
      The elements in the layout. Can be controls
    • _toolbarLogger

      Logger
  • Constructor Details

    • Toolbar

      public Toolbar(Configuration toolbarConfiguration, RibbonManager ribbonManager, Logger logger) throws ConfigurationException
      Creates a toolbar of controls
      Parameters:
      toolbarConfiguration - The configuration for the layout
      ribbonManager - The ribbon manager
      logger - The logger
      Throws:
      ConfigurationException - if an error occurred
    • Toolbar

      public Toolbar(Logger logger, int colspan)
      Creates an empty toolbar of controls
      Parameters:
      logger - The logger
      colspan - The toolbar colspan
  • Method Details

    • getColumns

      public int getColumns()
      Description copied from interface: Element
      Get the size taken by this element, in columns
      Specified by:
      getColumns in interface Element
      Returns:
      The size
    • setColumns

      public void setColumns(int size)
      Description copied from interface: Element
      Set the size to take by this element
      Specified by:
      setColumns in interface Element
      Parameters:
      size - The size in number of columns
    • getChildren

      Description copied from interface: Element
      Retrieve the list of children elements in this element.
      Specified by:
      getChildren in interface Element
      Returns:
      The list of elements.
    • toSAX

      public void toSAX(ContentHandler handler) throws SAXException
      Description copied from interface: Element
      Sax the the configuration of the element.
      Specified by:
      toSAX in interface Element
      Parameters:
      handler - The content handler where to sax
      Throws:
      SAXException - if an error occurs
    • isSame

      public boolean isSame(Element element)
      Description copied from interface: Element
      Test if an element is equal to another element
      Specified by:
      isSame in interface Element
      Parameters:
      element - The element to compare to
      Returns:
      True if equals