Class ConfigRegistry
java.lang.Object
org.eclipse.nebula.widgets.nattable.config.ConfigRegistry
- All Implemented Interfaces:
IConfigRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetConfigAttribute(ConfigAttribute<T> configAttribute, String targetDisplayMode, String... configLabels) If retrieving registered values<T> TgetConfigAttribute(ConfigAttribute<T> configAttribute, String targetDisplayMode, List<String> configLabels) If retrieving registered values<T> TgetConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode targetDisplayMode, String... configLabels) If retrieving registered values<T> TgetConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode targetDisplayMode, List<String> configLabels) If retrieving registered values<T> TgetSpecificConfigAttribute(ConfigAttribute<T> configAttribute, String displayMode, String configLabel) Retrieve a configuration value for the specified DisplayMode and config label.<T> TgetSpecificConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode displayMode, String configLabel) Retrieve a configuration value for the specified DisplayMode and config label.<T> voidregisterConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue) Register a configuration attribute.<T> voidregisterConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, String displayMode) Register a configuration attribute against aDisplayMode.<T> voidregisterConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, String displayMode, String configLabel) Register an attribute against aDisplayModeand configuration label (applied to cells)<T> voidregisterConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, DisplayMode targetDisplayMode) Register a configuration attribute against aDisplayMode.<T> voidregisterConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, DisplayMode targetDisplayMode, String configLabel) Register an attribute against aDisplayModeand configuration label (applied to cells)voidsetDisplayModeOrdering(IDisplayModeOrdering displayModeOrdering) <T> voidunregisterConfigAttribute(ConfigAttribute<T> configAttributeType) Unregister the given configuration attribute.<T> voidunregisterConfigAttribute(ConfigAttribute<T> configAttributeType, String displayMode) Unregister the given configuration attribute for the givenDisplayMode.<T> voidunregisterConfigAttribute(ConfigAttribute<T> configAttributeType, String displayMode, String configLabel) Unregister the given configuration attribute for the givenDisplayModethat was registered against the given configuration label.<T> voidunregisterConfigAttribute(ConfigAttribute<T> configAttributeType, DisplayMode displayMode) Unregister the given configuration attribute for the givenDisplayMode.<T> voidunregisterConfigAttribute(ConfigAttribute<T> configAttributeType, DisplayMode displayMode, String configLabel) Unregister the given configuration attribute for the givenDisplayModethat was registered against the given configuration label.
-
Constructor Details
-
ConfigRegistry
public ConfigRegistry()
-
-
Method Details
-
getConfigAttribute
public <T> T getConfigAttribute(ConfigAttribute<T> configAttribute, String targetDisplayMode, String... configLabels) Description copied from interface:IConfigRegistryIf retrieving registered valuesExample 1:
configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);
- It will look for an attribute registered using the EDIT display mode
- If it can't find that it will try and find an attribute under the NORMAL mode
- If it can't find one it will try and find one registered without a
display mode
IConfigRegistry.registerConfigAttribute(ConfigAttribute, Object)
configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");
- It will look for an attribute registered by display mode NORMAL and "testLabel"
- It will look for an attribute registered by display mode NORMAL and "testLabel_1"
- Specified by:
getConfigAttributein interfaceIConfigRegistry- Type Parameters:
T- The type of the configuration attribute.- Parameters:
configAttribute- The configuration attribute to be registered.targetDisplayMode- The display mode the cell needs to be in for this attribute to be returned.configLabels- The config labels the cell needs to have for this attribute to be returned.- Returns:
- The configuration attribute if the display mode and the
configLabels match,
nullif no value for the specified parameters was found.
-
getConfigAttribute
public <T> T getConfigAttribute(ConfigAttribute<T> configAttribute, String targetDisplayMode, List<String> configLabels) Description copied from interface:IConfigRegistryIf retrieving registered valuesExample 1:
configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);
- It will look for an attribute registered using the EDIT display mode
- If it can't find that it will try and find an attribute under the NORMAL mode
- If it can't find one it will try and find one registered without a
display mode
IConfigRegistry.registerConfigAttribute(ConfigAttribute, Object)
configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");
- It will look for an attribute registered by display mode NORMAL and "testLabel"
- It will look for an attribute registered by display mode NORMAL and "testLabel_1"
- Specified by:
getConfigAttributein interfaceIConfigRegistry- Type Parameters:
T- The type of the configuration attribute.- Parameters:
configAttribute- The configuration attribute to be registered.targetDisplayMode- The display mode the cell needs to be in for this attribute to be returned.configLabels- The config labels the cell needs to have for this attribute to be returned.- Returns:
- The configuration attribute if the display mode and the
configLabels match,
nullif no value for the specified parameters was found.
-
getConfigAttribute
public <T> T getConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode targetDisplayMode, String... configLabels) Description copied from interface:IConfigRegistryIf retrieving registered valuesExample 1:
configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);
- It will look for an attribute registered using the EDIT display mode
- If it can't find that it will try and find an attribute under the NORMAL mode
- If it can't find one it will try and find one registered without a
display mode
IConfigRegistry.registerConfigAttribute(ConfigAttribute, Object)
configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");
- It will look for an attribute registered by display mode NORMAL and "testLabel"
- It will look for an attribute registered by display mode NORMAL and "testLabel_1"
- Specified by:
getConfigAttributein interfaceIConfigRegistry- Type Parameters:
T- The type of the configuration attribute.- Parameters:
configAttribute- The configuration attribute to be registered.targetDisplayMode- The display mode the cell needs to be in for this attribute to be returned.configLabels- The config labels the cell needs to have for this attribute to be returned.- Returns:
- The configuration attribute if the display mode and the
configLabels match,
nullif no value for the specified parameters was found.
-
getConfigAttribute
public <T> T getConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode targetDisplayMode, List<String> configLabels) Description copied from interface:IConfigRegistryIf retrieving registered valuesExample 1:
configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);
- It will look for an attribute registered using the EDIT display mode
- If it can't find that it will try and find an attribute under the NORMAL mode
- If it can't find one it will try and find one registered without a
display mode
IConfigRegistry.registerConfigAttribute(ConfigAttribute, Object)
configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");
- It will look for an attribute registered by display mode NORMAL and "testLabel"
- It will look for an attribute registered by display mode NORMAL and "testLabel_1"
- Specified by:
getConfigAttributein interfaceIConfigRegistry- Type Parameters:
T- The type of the configuration attribute.- Parameters:
configAttribute- The configuration attribute to be registered.targetDisplayMode- The display mode the cell needs to be in for this attribute to be returned.configLabels- The config labels the cell needs to have for this attribute to be returned.- Returns:
- The configuration attribute if the display mode and the
configLabels match,
nullif no value for the specified parameters was found.
-
getSpecificConfigAttribute
public <T> T getSpecificConfigAttribute(ConfigAttribute<T> configAttribute, String displayMode, String configLabel) Description copied from interface:IConfigRegistryRetrieve a configuration value for the specified DisplayMode and config label. Only checks for the specified DisplayMode and config label. It does not search for more generic values by searching the display mode ordering, labels and default configurations.- Specified by:
getSpecificConfigAttributein interfaceIConfigRegistry- Type Parameters:
T- The type of the configuration attribute.- Parameters:
configAttribute- The configuration attribute to be registered.displayMode- The display mode the cell needs to be in for this attribute to be returned.configLabel- The config label the cell needs to have for this attribute to be returned.- Returns:
- The configuration attribute if the display mode and the
configLabel matches,
nullif no value for the specified parameters was found. - See Also:
-
getSpecificConfigAttribute
public <T> T getSpecificConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode displayMode, String configLabel) Description copied from interface:IConfigRegistryRetrieve a configuration value for the specified DisplayMode and config label. Only checks for the specified DisplayMode and config label. It does not search for more generic values by searching the display mode ordering, labels and default configurations.- Specified by:
getSpecificConfigAttributein interfaceIConfigRegistry- Type Parameters:
T- The type of the configuration attribute.- Parameters:
configAttribute- The configuration attribute to be registered.displayMode- The display mode the cell needs to be in for this attribute to be returned.configLabel- The config label the cell needs to have for this attribute to be returned.- Returns:
- The configuration attribute if the display mode and the
configLabel matches,
nullif no value for the specified parameters was found. - See Also:
-
registerConfigAttribute
Description copied from interface:IConfigRegistryRegister a configuration attribute.- Specified by:
registerConfigAttributein interfaceIConfigRegistry- Parameters:
configAttribute- TheConfigAttributefor which a value should be registered.attributeValue- The value that should be set for the given TheConfigAttribute.
-
registerConfigAttribute
public <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, String displayMode) Description copied from interface:IConfigRegistryRegister a configuration attribute against aDisplayMode.- Specified by:
registerConfigAttributein interfaceIConfigRegistry- Parameters:
configAttribute- TheConfigAttributefor which a value should be registered.attributeValue- The value that should be set for the given TheConfigAttribute.displayMode- TheDisplayModefor which theConfigAttributeshould be registered.
-
registerConfigAttribute
public <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, DisplayMode targetDisplayMode) Description copied from interface:IConfigRegistryRegister a configuration attribute against aDisplayMode.- Specified by:
registerConfigAttributein interfaceIConfigRegistry- Parameters:
configAttribute- TheConfigAttributefor which a value should be registered.attributeValue- The value that should be set for the given TheConfigAttribute.targetDisplayMode- TheDisplayModefor which theConfigAttributeshould be registered.
-
registerConfigAttribute
public <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, String displayMode, String configLabel) Description copied from interface:IConfigRegistryRegister an attribute against aDisplayModeand configuration label (applied to cells)- Specified by:
registerConfigAttributein interfaceIConfigRegistry- Parameters:
configAttribute- TheConfigAttributefor which a value should be registered.attributeValue- The value that should be set for the given TheConfigAttribute.displayMode- TheDisplayModefor which theConfigAttributeshould be registered.configLabel- The configuration label against which theConfigAttributeshould be registered.
-
registerConfigAttribute
public <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, DisplayMode targetDisplayMode, String configLabel) Description copied from interface:IConfigRegistryRegister an attribute against aDisplayModeand configuration label (applied to cells)- Specified by:
registerConfigAttributein interfaceIConfigRegistry- Parameters:
configAttribute- TheConfigAttributefor which a value should be registered.attributeValue- The value that should be set for the given TheConfigAttribute.targetDisplayMode- TheDisplayModefor which theConfigAttributeshould be registered.configLabel- The configuration label against which theConfigAttributeshould be registered.
-
unregisterConfigAttribute
Description copied from interface:IConfigRegistryUnregister the given configuration attribute.- Specified by:
unregisterConfigAttributein interfaceIConfigRegistry- Parameters:
configAttributeType- TheConfigAttributeto unregister.
-
unregisterConfigAttribute
public <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType, String displayMode) Description copied from interface:IConfigRegistryUnregister the given configuration attribute for the givenDisplayMode.- Specified by:
unregisterConfigAttributein interfaceIConfigRegistry- Parameters:
configAttributeType- TheConfigAttributeto unregister.displayMode- TheDisplayModefor which theConfigAttributeshould be unregistered.
-
unregisterConfigAttribute
public <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType, DisplayMode displayMode) Description copied from interface:IConfigRegistryUnregister the given configuration attribute for the givenDisplayMode.- Specified by:
unregisterConfigAttributein interfaceIConfigRegistry- Parameters:
configAttributeType- TheConfigAttributeto unregister.displayMode- TheDisplayModefor which theConfigAttributeshould be unregistered.
-
unregisterConfigAttribute
public <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType, String displayMode, String configLabel) Description copied from interface:IConfigRegistryUnregister the given configuration attribute for the givenDisplayModethat was registered against the given configuration label.- Specified by:
unregisterConfigAttributein interfaceIConfigRegistry- Parameters:
configAttributeType- TheConfigAttributeto unregister.displayMode- TheDisplayModefor which theConfigAttributeshould be unregistered.configLabel- The configuration label against which theConfigAttributewas registered.
-
unregisterConfigAttribute
public <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType, DisplayMode displayMode, String configLabel) Description copied from interface:IConfigRegistryUnregister the given configuration attribute for the givenDisplayModethat was registered against the given configuration label.- Specified by:
unregisterConfigAttributein interfaceIConfigRegistry- Parameters:
configAttributeType- TheConfigAttributeto unregister.displayMode- TheDisplayModefor which theConfigAttributeshould be unregistered.configLabel- The configuration label against which theConfigAttributewas registered.
-
getDisplayModeOrdering
- Specified by:
getDisplayModeOrderingin interfaceIConfigRegistry- Returns:
- The
IDisplayModeOrderingwhich is used to specify in which order to search through theIConfigRegistryforDisplayMode.
-
setDisplayModeOrdering
-