Class HierarchicalWrapper

java.lang.Object
org.eclipse.nebula.widgets.nattable.hierarchical.HierarchicalWrapper

public class HierarchicalWrapper extends Object
Wrapper class to support an object model of hierarchical classes in NatTable. Via HierarchicalHelper a collection of nested classes can be de-normalized into a simple collection that can then be used inside a NatTable e.g. via HierarchicalTreeLayer.
Since:
1.6
See Also:
  • Constructor Details

  • Method Details

    • getObject

      public Object getObject(int level)
      Get the model object for the given level out of this wrapper.
      Parameters:
      level - The level for which the model object is requested.
      Returns:
      The object for the given level.
      Throws:
      IllegalArgumentException - if an object is requested for a deeper level than this wrapper supports.
    • setObject

      public void setObject(int level, Object object)
      Set the given model object for the given level.
      Parameters:
      level - The level on which the object should be set.
      object - The object to set to the given level in this wrapper.
      Throws:
      IllegalArgumentException - if it is tried to set an object to a level that is not supported by this wrapper.
    • getLevels

      public int getLevels()
      Returns:
      The number of levels provided by this wrapper.