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 Summary
Fields Modifier and Type Field Description protected int
_colspan
Number of columns used by the control upon some layouts.protected org.slf4j.Logger
_controlLogger
Loggerprotected String
_id
The id of the control
-
Constructor Summary
Constructors Constructor Description ControlRef(String id, int colspan, org.slf4j.Logger logger)
Creates a control referenceControlRef(Configuration controlConfiguration, RibbonManager ribbonManager, org.slf4j.Logger logger)
Creates a control reference
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Element>
getChildren()
Retrieve the list of children elements in this element.int
getColumns()
Get the size taken by this element, in columnsString
getId()
Get the id of the ControlRefboolean
isSame(Element element)
Test if an element is equal to another elementvoid
setColumns(int size)
Set the size to take by this elementvoid
toSAX(ContentHandler handler)
Sax the the configuration of the element.String
toString()
-
-
-
Field Detail
-
_colspan
protected int _colspan
Number of columns used by the control upon some layouts. 1 is the common and defaul value
-
_controlLogger
protected org.slf4j.Logger _controlLogger
Logger
-
-
Constructor Detail
-
ControlRef
public ControlRef(Configuration controlConfiguration, RibbonManager ribbonManager, org.slf4j.Logger logger) throws ConfigurationException
Creates a control reference- Parameters:
controlConfiguration
- The configuration for the controlribbonManager
- The ribbon managerlogger
- The logger- Throws:
ConfigurationException
- if an error occurred
-
ControlRef
public ControlRef(String id, int colspan, org.slf4j.Logger logger)
Creates a control reference- Parameters:
id
- The id referenced by this controlcolspan
- The colspan of this controllogger
- The logger
-
-
Method Detail
-
getColumns
public int getColumns()
Description copied from interface:Element
Get the size taken by this element, in columns- Specified by:
getColumns
in interfaceElement
- 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 interfaceElement
- Parameters:
size
- The size in number of columns
-
getChildren
public List<Element> getChildren()
Description copied from interface:Element
Retrieve the list of children elements in this element.- Specified by:
getChildren
in interfaceElement
- 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 interfaceElement
- 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
-
-