Interface IConfigRegistry

All Known Implementing Classes:
ConfigRegistry

public interface IConfigRegistry
Holds all the settings, bindings and other configuration for NatTable.

See ConfigRegistryTest for a better understanding.

See Also:
  • Method Details

    • getConfigAttribute

      @Deprecated <T> T getConfigAttribute(ConfigAttribute<T> configAttribute, String targetDisplayMode, String... configLabels)
      If retrieving registered values

      Example 1:

      configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);

      1. It will look for an attribute registered using the EDIT display mode
      2. If it can't find that it will try and find an attribute under the NORMAL mode
      3. If it can't find one it will try and find one registered without a display mode registerConfigAttribute(ConfigAttribute, Object)
      Example 2:

      configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");

      1. It will look for an attribute registered by display mode NORMAL and "testLabel"
      2. It will look for an attribute registered by display mode NORMAL and "testLabel_1"
      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, null if no value for the specified parameters was found.
    • getConfigAttribute

      <T> T getConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode targetDisplayMode, String... configLabels)
      If retrieving registered values

      Example 1:

      configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);

      1. It will look for an attribute registered using the EDIT display mode
      2. If it can't find that it will try and find an attribute under the NORMAL mode
      3. If it can't find one it will try and find one registered without a display mode registerConfigAttribute(ConfigAttribute, Object)
      Example 2:

      configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");

      1. It will look for an attribute registered by display mode NORMAL and "testLabel"
      2. It will look for an attribute registered by display mode NORMAL and "testLabel_1"
      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, null if no value for the specified parameters was found.
      Since:
      2.0
    • getConfigAttribute

      @Deprecated <T> T getConfigAttribute(ConfigAttribute<T> configAttribute, String targetDisplayMode, List<String> configLabels)
      If retrieving registered values

      Example 1:

      configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);

      1. It will look for an attribute registered using the EDIT display mode
      2. If it can't find that it will try and find an attribute under the NORMAL mode
      3. If it can't find one it will try and find one registered without a display mode registerConfigAttribute(ConfigAttribute, Object)
      Example 2:

      configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");

      1. It will look for an attribute registered by display mode NORMAL and "testLabel"
      2. It will look for an attribute registered by display mode NORMAL and "testLabel_1"
      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, null if no value for the specified parameters was found.
    • getConfigAttribute

      <T> T getConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode targetDisplayMode, List<String> configLabels)
      If retrieving registered values

      Example 1:

      configRegistry.getConfigAttribute(attribute, DisplayMode.EDIT);

      1. It will look for an attribute registered using the EDIT display mode
      2. If it can't find that it will try and find an attribute under the NORMAL mode
      3. If it can't find one it will try and find one registered without a display mode registerConfigAttribute(ConfigAttribute, Object)
      Example 2:

      configRegistry.getConfigAttribute(attribute, DisplayMode.NORMAL, "testLabel", "testLabel_1");

      1. It will look for an attribute registered by display mode NORMAL and "testLabel"
      2. It will look for an attribute registered by display mode NORMAL and "testLabel_1"
      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, null if no value for the specified parameters was found.
      Since:
      2.0
    • getSpecificConfigAttribute

      @Deprecated <T> T getSpecificConfigAttribute(ConfigAttribute<T> configAttribute, String displayMode, String configLabel)
      Retrieve 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.
      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, null if no value for the specified parameters was found.
      See Also:
    • getSpecificConfigAttribute

      <T> T getSpecificConfigAttribute(ConfigAttribute<T> configAttribute, DisplayMode displayMode, String configLabel)
      Retrieve 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.
      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, null if no value for the specified parameters was found.
      Since:
      2.0
      See Also:
    • registerConfigAttribute

      <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue)
      Register a configuration attribute.
      Parameters:
      configAttribute - The ConfigAttribute for which a value should be registered.
      attributeValue - The value that should be set for the given The ConfigAttribute.
    • registerConfigAttribute

      @Deprecated <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, String targetDisplayMode)
      Register a configuration attribute against a DisplayMode.
      Parameters:
      configAttribute - The ConfigAttribute for which a value should be registered.
      attributeValue - The value that should be set for the given The ConfigAttribute.
      targetDisplayMode - The DisplayMode for which the ConfigAttribute should be registered.
    • registerConfigAttribute

      <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, DisplayMode targetDisplayMode)
      Register a configuration attribute against a DisplayMode.
      Parameters:
      configAttribute - The ConfigAttribute for which a value should be registered.
      attributeValue - The value that should be set for the given The ConfigAttribute.
      targetDisplayMode - The DisplayMode for which the ConfigAttribute should be registered.
      Since:
      2.0
    • registerConfigAttribute

      @Deprecated <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, String targetDisplayMode, String configLabel)
      Register an attribute against a DisplayMode and configuration label (applied to cells)
      Parameters:
      configAttribute - The ConfigAttribute for which a value should be registered.
      attributeValue - The value that should be set for the given The ConfigAttribute.
      targetDisplayMode - The DisplayMode for which the ConfigAttribute should be registered.
      configLabel - The configuration label against which the ConfigAttribute should be registered.
    • registerConfigAttribute

      <T> void registerConfigAttribute(ConfigAttribute<T> configAttribute, T attributeValue, DisplayMode targetDisplayMode, String configLabel)
      Register an attribute against a DisplayMode and configuration label (applied to cells)
      Parameters:
      configAttribute - The ConfigAttribute for which a value should be registered.
      attributeValue - The value that should be set for the given The ConfigAttribute.
      targetDisplayMode - The DisplayMode for which the ConfigAttribute should be registered.
      configLabel - The configuration label against which the ConfigAttribute should be registered.
      Since:
      2.0
    • unregisterConfigAttribute

      <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType)
      Unregister the given configuration attribute.
      Parameters:
      configAttributeType - The ConfigAttribute to unregister.
    • unregisterConfigAttribute

      @Deprecated <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType, String displayMode)
      Unregister the given configuration attribute for the given DisplayMode.
      Parameters:
      configAttributeType - The ConfigAttribute to unregister.
      displayMode - The DisplayMode for which the ConfigAttribute should be unregistered.
    • unregisterConfigAttribute

      <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType, DisplayMode displayMode)
      Unregister the given configuration attribute for the given DisplayMode.
      Parameters:
      configAttributeType - The ConfigAttribute to unregister.
      displayMode - The DisplayMode for which the ConfigAttribute should be unregistered.
      Since:
      2.0
    • unregisterConfigAttribute

      @Deprecated <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType, String displayMode, String configLabel)
      Unregister the given configuration attribute for the given DisplayMode that was registered against the given configuration label.
      Parameters:
      configAttributeType - The ConfigAttribute to unregister.
      displayMode - The DisplayMode for which the ConfigAttribute should be unregistered.
      configLabel - The configuration label against which the ConfigAttribute was registered.
    • unregisterConfigAttribute

      <T> void unregisterConfigAttribute(ConfigAttribute<T> configAttributeType, DisplayMode displayMode, String configLabel)
      Unregister the given configuration attribute for the given DisplayMode that was registered against the given configuration label.
      Parameters:
      configAttributeType - The ConfigAttribute to unregister.
      displayMode - The DisplayMode for which the ConfigAttribute should be unregistered.
      configLabel - The configuration label against which the ConfigAttribute was registered.
      Since:
      2.0
    • getDisplayModeOrdering

      IDisplayModeOrdering getDisplayModeOrdering()
      Returns:
      The IDisplayModeOrdering which is used to specify in which order to search through the IConfigRegistry for DisplayMode.