Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot
Class PivotUtils

java.lang.Object
  extended by com.citra.pivot.PivotUtils

public class PivotUtils
extends Object

PivotUtils is a collection of utility methods for PivotRowAdapters and PivotColumnAdapters.


Method Summary
static PivotColumnAdapter[] getAdaptersForColumn(int column, PivotColumnAdapter adapter)
          Retrieves the paths at each adapter, bounded by the specified column.
static PivotColumnAdapter getColumnAdapterAt(int column, int groupLevel, PivotColumnAdapter adapter)
          Returns the adapter at the specified column and group level index.
static TreePath[] getParents(TreePath[] paths)
          Retrieves the parent paths of paths.
static TreePath getPathForColumn(int column, int groupLevel, PivotColumnAdapter adapter)
          Retrieves the column path at the specified column and group level index.
static TreePath getPathForRow(int row, int column, PivotRowAdapter adapter)
          Retrieves the row path at the specified row and column index.
static TreePath[] getPathsForColumn(int column, PivotColumnAdapter adapter)
          Retrieves the column paths at the specified column index.
static TreePath[] getPathsForRow(int row, PivotRowAdapter adapter)
          Retrieves the row paths at the specified row index.
static PivotRowAdapter getRowAdapterAt(int row, int column, PivotRowAdapter adapter)
          Returns the adapter at the specified row and column index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAdaptersForColumn

public static PivotColumnAdapter[] getAdaptersForColumn(int column,
                                                        PivotColumnAdapter adapter)
Retrieves the paths at each adapter, bounded by the specified column.

Parameters:
column - the column for which the paths are returned
adapter - the adapter to use
Returns:
the paths at the specified column

getColumnAdapterAt

public static PivotColumnAdapter getColumnAdapterAt(int column,
                                                    int groupLevel,
                                                    PivotColumnAdapter adapter)
Returns the adapter at the specified column and group level index.

Parameters:
column - the column index
groupLevel - the group level index
adapter - the pivot column adapter
Returns:
the column adapter at the specified indeces

getParents

public static TreePath[] getParents(TreePath[] paths)
Retrieves the parent paths of paths.

Parameters:
paths - the paths whose parents are returned
Returns:
the path parents

getPathForColumn

public static TreePath getPathForColumn(int column,
                                        int groupLevel,
                                        PivotColumnAdapter adapter)
Retrieves the column path at the specified column and group level index.

Parameters:
column - the column index
groupLevel - the group level index
adapter - the pivot column adapter
Returns:
the column path at the specified indeces

getPathForRow

public static TreePath getPathForRow(int row,
                                     int column,
                                     PivotRowAdapter adapter)
Retrieves the row path at the specified row and column index.

Parameters:
row - the row index
column - the column index
adapter - the pivot row adapter
Returns:
the row path at the specified indeces

getPathsForColumn

public static TreePath[] getPathsForColumn(int column,
                                           PivotColumnAdapter adapter)
Retrieves the column paths at the specified column index.

Parameters:
column - the column index
adapter - the pivot column adapter
Returns:
the column paths at the specified index

getPathsForRow

public static TreePath[] getPathsForRow(int row,
                                        PivotRowAdapter adapter)
Retrieves the row paths at the specified row index.

Parameters:
row - the row index
adapter - the pivot row adapter
Returns:
the row paths at the specified index

getRowAdapterAt

public static PivotRowAdapter getRowAdapterAt(int row,
                                              int column,
                                              PivotRowAdapter adapter)
Returns the adapter at the specified row and column index.

Parameters:
row - the row index
column - the column index
adapter - the pivot row adapter
Returns:
the row adapter at the specified indeces

Copyright © 2011 Citra Technologies. All Rights Reserved.