Class Tab
java.lang.Object
org.ametys.core.ui.ribbonconfiguration.Tab
A tab of the ribbon
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The color (between 1 and 6) for a contextual tabprotected String
The id of the contextual group (can be null for single contextual tab)protected String
The optional id of the contextual client side element determining the state of the ribbonThe list of groups in the tabprotected I18nizableText
The label of the tabprotected Logger
Loggerprotected Object
The tab orderprotected Boolean
True to order before a tab specified by _orderprotected Boolean
True to override an existing tab instead of defining a new oneprotected RibbonElementsInjectionHelper<Group>
helper for group injection -
Constructor Summary
ConstructorDescriptionTab
(Configuration tabConfiguration, RibbonManager ribbonManager, Integer defaultOrder, Logger logger) Creates a tab -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_configureGroups
(Configuration tabConfiguration, RibbonManager ribbonManager) Configure tabs groupsprotected void
_configureId
(Configuration tabConfiguration) Configure tab optional idprotected void
_generateTabControl
(Configuration tabConfiguration, RibbonManager ribbonManager) Generate a new tab control on the flyRetrieve the list of configured groupsgetId()
Get the id of this tab;getLabel()
Get the tab labelGet the order attribute of the tabGet the order attribute of the tabvoid
injectGroups
(List<Group> groups) Inject a list of groups into this tabvoid
injectGroupsOverride
(List<Group> groups) Inject a list of overriding groups into this tabReturn true if the tab is contextualboolean
Return true if this tab overrides an existing tabboolean
True if the tab should be ordered before the tab referenced by the attribute ordervoid
saxGroups
(ContentHandler handler, List<Group> groups) Sax the configuration of the tab.void
Set the order attribute of the tabtoString()
-
Field Details
-
_label
The label of the tab -
_controlId
The optional id of the contextual client side element determining the state of the ribbon -
_contextualColor
The color (between 1 and 6) for a contextual tab -
_contextualGroup
The id of the contextual group (can be null for single contextual tab) -
_order
The tab order -
_orderBefore
True to order before a tab specified by _order -
_override
True to override an existing tab instead of defining a new one -
_groups
The list of groups in the tab -
_tabOverrideHelper
helper for group injection -
_log
Logger
-
-
Constructor Details
-
Tab
public Tab(Configuration tabConfiguration, RibbonManager ribbonManager, Integer defaultOrder, Logger logger) throws ConfigurationException Creates a tab- Parameters:
tabConfiguration
- The configuration of the tabribbonManager
- The ribbon managerdefaultOrder
- The default tab order, if not specified. Can be nulllogger
- The logger- Throws:
ConfigurationException
- if an error occurs in the configuration
-
-
Method Details
-
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
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 configurationribbonManager
- 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 configurationribbonManager
- The ribbon manager- Throws:
ConfigurationException
- if an error occurred
-
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
Set the order attribute of the tab- Parameters:
order
- The new order value, either a String or an Integer
-
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
Retrieve the list of configured groups- Returns:
- The list of groups
-
isOverride
Return true if this tab overrides an existing tab- Returns:
- True if overrides
-
injectGroups
Inject a list of groups into this tab- Parameters:
groups
- The list of groups to inject
-
injectGroupsOverride
Inject a list of overriding groups into this tab- Parameters:
groups
- The list of groups to inject
-
saxGroups
Sax the configuration of the tab.- Parameters:
handler
- The content handler where to saxgroups
- The list of groups to sax- Throws:
SAXException
- if an error occurs
-
toString
-