| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.nebula.widgets.nattable.layer.event.StructuralChangeEventHelper
public class StructuralChangeEventHelper
Helper class providing support for modifying cached index lists for IStructuralChangeEvents.
| Constructor Summary | |
|---|---|
StructuralChangeEventHelper()
 | 
|
| Method Summary | |
|---|---|
static void | 
handleColumnDelete(Collection<StructuralDiff> columnDiffs,
                   ILayer underlyingLayer,
                   Collection<Integer> cachedColumnIndexes,
                   boolean handleNotFound)
Will check for events that indicate that columns has been deleted.  | 
static void | 
handleColumnInsert(Collection<StructuralDiff> columnDiffs,
                   ILayer underlyingLayer,
                   Collection<Integer> cachedColumnIndexes,
                   boolean addToCache)
Will check for events that indicate that columns are added.  | 
static void | 
handleRowDelete(Collection<StructuralDiff> rowDiffs,
                ILayer underlyingLayer,
                Collection<Integer> cachedRowIndexes,
                boolean handleNotFound)
Will check for events that indicate that rows has been deleted.  | 
static void | 
handleRowInsert(Collection<StructuralDiff> rowDiffs,
                ILayer underlyingLayer,
                Collection<Integer> cachedRowIndexes,
                boolean addToCache)
Will check for events that indicate that rows are added.  | 
static boolean | 
isReorder(Collection<StructuralDiff> structuralDiffs)
Method to indicate if the collection of StructuralDiffs marks a reorder event.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public StructuralChangeEventHelper()
| Method Detail | 
|---|
public static void handleRowDelete(Collection<StructuralDiff> rowDiffs,
                                   ILayer underlyingLayer,
                                   Collection<Integer> cachedRowIndexes,
                                   boolean handleNotFound)
rowDiffs - The collection of StructuralDiffs to handleunderlyingLayer - The underlying layer of the layer who caches the indexes.
            Needed to translate the transported row positions to indexes,
            because the conversion to the layer who caches the index is
            done before it is fired further in the layer stackcachedRowIndexes - The collection of indexes that is cached by the layer that
            needs transformationhandleNotFound - flag to tell whether the not found row indexes should be taken
            into account or not. Needed for last row checks
public static void handleRowInsert(Collection<StructuralDiff> rowDiffs,
                                   ILayer underlyingLayer,
                                   Collection<Integer> cachedRowIndexes,
                                   boolean addToCache)
rowDiffs - The collection of StructuralDiffs to handleunderlyingLayer - The underlying layer of the layer who caches the indexes.
            Needed to translate the transported row positions to indexes,
            because the conversion to the layer who caches the index is
            done before it is fired further in the layer stackcachedRowIndexes - The collection of indexes that is cached by the layer that
            needs transformationaddToCache - Flag to configure if the added value should be added to the
            cache or not. This is necessary to differ whether
            cachedRowIndexes are a collection of all indexes that need to
            be updated (e.g. row reordering) or just a collection of
            indexes that are applied for a specific state (e.g. row hide
            state)
public static void handleColumnDelete(Collection<StructuralDiff> columnDiffs,
                                      ILayer underlyingLayer,
                                      Collection<Integer> cachedColumnIndexes,
                                      boolean handleNotFound)
columnDiffs - The collection of StructuralDiffs to handleunderlyingLayer - The underlying layer of the layer who caches the indexes.
            Needed to translate the transported column positions to
            indexes, because the conversion to the layer who caches the
            index is done before it is fired further in the layer stackcachedColumnIndexes - The collection of indexes that is cached by the layer that
            needs transformationhandleNotFound - flag to tell whether the not found column indexes should be
            taken into account or not. Needed for last column checks
public static void handleColumnInsert(Collection<StructuralDiff> columnDiffs,
                                      ILayer underlyingLayer,
                                      Collection<Integer> cachedColumnIndexes,
                                      boolean addToCache)
columnDiffs - The collection of StructuralDiffs to handleunderlyingLayer - The underlying layer of the layer who caches the indexes.
            Needed to translate the transported column positions to
            indexes, because the conversion to the layer who caches the
            index is done before it is fired further in the layer stackcachedColumnIndexes - The collection of indexes that is cached by the layer that
            needs transformationaddToCache - Flag to configure if the added value should be added to the
            cache or not. This is necessary to differ whether
            cachedColumnIndexes are a collection of all indexes that need
            to be updated (e.g. column reordering) or just a collection of
            indexes that are applied for a specific state (e.g. column
            hide state)public static boolean isReorder(Collection<StructuralDiff> structuralDiffs)
Here is a small example to explain the impact on handling:
structuralDiffs - The collection of StructuralDiffs to check for reordering
true if the diff indicates a reordering happened,
         false if if was not a reordering based on the
         explanation above.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||