java.lang.Object
org.ametys.core.ui.ribbonconfiguration.Tab

public class Tab extends Object
A tab of the ribbon
  • Field Details

  • Constructor Details

    • Tab

      public Tab(Configuration tabConfiguration, RibbonManager ribbonManager, Integer defaultOrder, org.slf4j.Logger logger) throws ConfigurationException
      Creates a tab
      Parameters:
      tabConfiguration - The configuration of the tab
      ribbonManager - The ribbon manager
      defaultOrder - The default tab order, if not specified. Can be null
      logger - The logger
      Throws:
      ConfigurationException - if an error occurs in the configuration
  • Method Details

    • getId

      public String getId()
      Get the id of this tab;
      Returns:
      the id
    • isContextual

      Return true if the tab is contextual
      Returns:
      true if the tab is contextual
    • _configureId

      protected void _configureId(Configuration tabConfiguration) throws ConfigurationException
      Configure tab optional id
      Parameters:
      tabConfiguration - One tab configuration
      Throws:
      ConfigurationException - if an error occurred
    • _generateTabControl

      protected void _generateTabControl(Configuration tabConfiguration, RibbonManager ribbonManager) throws ConfigurationException
      Generate a new tab control on the fly
      Parameters:
      tabConfiguration - The tab configuration
      ribbonManager - The ribbon manager
      Throws:
      ConfigurationException - If an error occurs
    • _configureGroups

      protected void _configureGroups(Configuration tabConfiguration, RibbonManager ribbonManager) throws ConfigurationException
      Configure tabs groups
      Parameters:
      tabConfiguration - One tab configuration
      ribbonManager - The ribbon manager
      Throws:
      ConfigurationException - if an error occurred
    • getLabel

      public String getLabel()
      Get the tab label
      Returns:
      Return the tab label
    • getOrderAsString

      Get the order attribute of the tab
      Returns:
      Return the order as a String, or null
    • getOrderAsInteger

      Get the order attribute of the tab
      Returns:
      Return the order as an Integer, or null
    • setOrder

      public void setOrder(Object order)
      Set the order attribute of the tab
      Parameters:
      order - The new order value, either a String or an Integer
    • orderBefore

      public boolean orderBefore()
      True if the tab should be ordered before the tab referenced by the attribute order
      Returns:
      True if the tab should be ordered before the tab referenced by the attribute order
    • getGroups

      public List<Group> getGroups()
      Retrieve the list of configured groups
      Returns:
      The list of groups
    • isOverride

      public boolean isOverride()
      Return true if this tab overrides an existing tab
      Returns:
      True if overrides
    • injectGroups

      public void injectGroups(List<Group> groups)
      Inject a list of groups into this tab
      Parameters:
      groups - The list of groups to inject
    • injectGroupsOverride

      public void injectGroupsOverride(List<Group> groups)
      Inject a list of overriding groups into this tab
      Parameters:
      groups - The list of groups to inject
    • saxGroups

      public void saxGroups(ContentHandler handler, List<Group> groups) throws SAXException
      Sax the configuration of the tab.
      Parameters:
      handler - The content handler where to sax
      groups - The list of groups to sax
      Throws:
      SAXException - if an error occurs
    • toString

      public String toString()
      Overrides:
      toString in class Object