Class InstanceEasyGridConfiguration

java.lang.Object
com.flowingcode.vaadin.addons.easygrid.config.InstanceEasyGridConfiguration
All Implemented Interfaces:
Serializable

public final class InstanceEasyGridConfiguration extends Object implements Serializable
Instance-level EasyGrid configuration. Configurations registered here apply only to the specific EasyGrid instance that holds this object and take precedence over GlobalEasyGridConfiguration.

See resolve(Class) for the full resolution order.

Author:
Javier Godoy / Flowing Code
See Also:
  • Constructor Details

    • InstanceEasyGridConfiguration

      public InstanceEasyGridConfiguration()
  • Method Details

    • forType

      public <V> ColumnConfiguration<V> forType(Class<V> type)
      Returns the ColumnConfiguration for the given type at the instance level, creating it if it does not yet exist. Modifications to the returned configuration take effect immediately.
      Parameters:
      type - the column value type
      Returns:
      the ColumnConfiguration for the given type
    • resolve

      public <V> ColumnConfiguration<V> resolve(Class<V> type)
      Returns the effective ColumnConfiguration for the given type, chaining configurations across all levels of the tree. The resolution order, from most to least specific, is:
      1. The isolated column-level layer on top of the chain (the node that an EasyColumn's own setters write into).
      2. Type-level configuration registered on this instance via forType(Class), walking the class hierarchy from type up to Object.
      3. Type-level configuration registered on GlobalEasyGridConfiguration (including the built-in defaults), walking the class hierarchy from type up to Object.
      The first non-null value found wins, scope-first: a more specific scope is fully consulted before falling through to the next.
      Parameters:
      type - the column value type
      Returns:
      the resolved configuration, never null