Class ControlRef

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

public class ControlRef extends Object implements Element
A control
  • Field Details

    • _id

      protected String _id
      The id of the control
    • _colspan

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

      Logger
  • Constructor Details

    • ControlRef

      public ControlRef(Configuration controlConfiguration, RibbonManager ribbonManager, Logger logger) throws ConfigurationException
      Creates a control reference
      Parameters:
      controlConfiguration - The configuration for the control
      ribbonManager - The ribbon manager
      logger - The logger
      Throws:
      ConfigurationException - if an error occurred
    • ControlRef

      public ControlRef(String id, int colspan, Logger logger)
      Creates a control reference
      Parameters:
      id - The id referenced by this control
      colspan - The colspan of this control
      logger - The logger
  • Method Details

    • getId

      public String getId()
      Get the id of the ControlRef
      Returns:
      The id
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object