Class Layout
- java.lang.Object
-
- org.ametys.core.ui.ribbonconfiguration.Layout
-
-
Field Summary
Fields Modifier and Type Field Description protected int
_cols
Number of columns used by the control upon some layouts.protected List<Element>
_elements
The elements in the layout.protected RibbonConfigurationManager.LAYOUTALIGN
_layoutAlign
The layout alignmentprotected org.slf4j.Logger
_layoutLogger
Loggerprotected RibbonConfigurationManager.CONTROLSIZE
_size
The size of the control
-
Constructor Summary
Constructors Constructor Description Layout(int cols, RibbonConfigurationManager.CONTROLSIZE size, RibbonConfigurationManager.LAYOUTALIGN align, org.slf4j.Logger logger)
Creates a layout of controlsLayout(Layout layout, RibbonConfigurationManager.CONTROLSIZE size)
Create a new layout by duplicating an existing layoutLayout(Configuration layoutConfiguration, RibbonManager ribbonManager, org.slf4j.Logger logger)
Creates a layout of controls
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RibbonConfigurationManager.LAYOUTALIGN
getAlign()
Get the alignment of the layoutList<Element>
getChildren()
Retrieve the list of children elements in this element.int
getColumns()
Get the size taken by this element, in columnsRibbonConfigurationManager.CONTROLSIZE
getSize()
Get the size of the layoutboolean
isSame(Element element)
Test if an element is equal to another elementvoid
setColumns(int cols)
Set the size to take by this elementvoid
toSAX(ContentHandler handler)
Sax the the configuration of the element.
-
-
-
Field Detail
-
_layoutAlign
protected RibbonConfigurationManager.LAYOUTALIGN _layoutAlign
The layout alignment
-
_size
protected RibbonConfigurationManager.CONTROLSIZE _size
The size of the control
-
_cols
protected int _cols
Number of columns used by the control upon some layouts. 1 is the common and default value
-
_layoutLogger
protected org.slf4j.Logger _layoutLogger
Logger
-
-
Constructor Detail
-
Layout
public Layout(Configuration layoutConfiguration, RibbonManager ribbonManager, org.slf4j.Logger logger) throws ConfigurationException
Creates a layout of controls- Parameters:
layoutConfiguration
- The configuration for the layoutribbonManager
- The ribbon managerlogger
- The logger- Throws:
ConfigurationException
- if an error occurred
-
Layout
public Layout(Layout layout, RibbonConfigurationManager.CONTROLSIZE size)
Create a new layout by duplicating an existing layout- Parameters:
layout
- The original layoutsize
- The new layout size
-
Layout
public Layout(int cols, RibbonConfigurationManager.CONTROLSIZE size, RibbonConfigurationManager.LAYOUTALIGN align, org.slf4j.Logger logger)
Creates a layout of controls- Parameters:
cols
- The number of columnssize
- The sizealign
- The alignmentlogger
- The logger
-
-
Method Detail
-
getSize
public RibbonConfigurationManager.CONTROLSIZE getSize()
Get the size of the layout- Returns:
- The size
-
getAlign
public RibbonConfigurationManager.LAYOUTALIGN getAlign()
Get the alignment of the layout- Returns:
- The alignment
-
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 cols)
Description copied from interface:Element
Set the size to take by this element- Specified by:
setColumns
in interfaceElement
- Parameters:
cols
- 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
-
-