Class Layout
java.lang.Object
org.ametys.core.ui.ribbonconfiguration.Layout
- All Implemented Interfaces:
Element
A layout of controls
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intNumber of columns used by the control upon some layouts.The elements in the layout.protected RibbonConfigurationManager.LAYOUTALIGNThe layout alignmentprotected org.slf4j.LoggerLoggerprotected RibbonConfigurationManager.CONTROLSIZEThe size of the control -
Constructor Summary
ConstructorsConstructorDescriptionLayout(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
Modifier and TypeMethodDescriptiongetAlign()Get the alignment of the layoutRetrieve the list of children elements in this element.intGet the size taken by this element, in columnsgetSize()Get the size of the layoutbooleanTest if an element is equal to another elementvoidsetColumns(int cols) Set the size to take by this elementvoidtoSAX(ContentHandler handler) Sax the the configuration of the element.
-
Field Details
-
_layoutAlign
The layout alignment -
_size
The size of the control -
_cols
Number of columns used by the control upon some layouts. 1 is the common and default value -
_elements
The elements in the layout. Can be controls or toolbars -
_layoutLogger
Logger
-
-
Constructor Details
-
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
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 Details
-
getSize
Get the size of the layout- Returns:
- The size
-
getAlign
Get the alignment of the layout- Returns:
- The alignment
-
getColumns
Description copied from interface:ElementGet the size taken by this element, in columns- Specified by:
getColumnsin interfaceElement- Returns:
- The size
-
setColumns
Description copied from interface:ElementSet the size to take by this element- Specified by:
setColumnsin interfaceElement- Parameters:
cols- The size in number of columns
-
getChildren
Description copied from interface:ElementRetrieve the list of children elements in this element.- Specified by:
getChildrenin interfaceElement- Returns:
- The list of elements.
-
toSAX
Description copied from interface:ElementSax the the configuration of the element.- Specified by:
toSAXin interfaceElement- Parameters:
handler- The content handler where to sax- Throws:
SAXException- if an error occurs
-
isSame
Description copied from interface:ElementTest if an element is equal to another element
-