Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot.olap
Class DefaultOlapStyleModel

java.lang.Object
  extended by com.citra.pivot.DefaultPivotStyleModel
      extended by com.citra.pivot.olap.DefaultOlapStyleModel
All Implemented Interfaces:
PivotStyleModel

public class DefaultOlapStyleModel
extends DefaultPivotStyleModel

DefaultOlapStyleModel is a PivotStyleModel that allows different styles depending on OlapCells.


Field Summary
protected  Map dataStyleMap
          a map holding olap cells vs styles
 
Fields inherited from class com.citra.pivot.DefaultPivotStyleModel
defaultColumnHeaderStyle, defaultDataStyle, defaultRowHeaderStyle
 
Constructor Summary
DefaultOlapStyleModel()
          Constructs a DefaultOlapStyleModel.
 
Method Summary
 void applyDataStyle(Component c, PivotTable table, PivotRowAdapter[] rowAdapters, TreePath[] rowPaths, PivotColumnAdapter[] columnAdapters, TreePath[] columnPaths, int row, int column, Object value)
          Visually modifies a given component, that appears in the data area of a pivot table.
 void clearDataStyles()
          Clears any custom data styles that were based on a specific OlapCell.
 PivotStyle getDataStyle(OlapCell cell)
          Retrieves the style for the given olap cell.
 void setDataStyle(OlapCell cell, PivotStyle style)
          Assigns the style to use for the given olap cell.
 
Methods inherited from class com.citra.pivot.DefaultPivotStyleModel
applyColumnHeaderStyle, applyRowHeaderStyle, applyStyle, getDefaultColumnHeaderStyle, getDefaultDataStyle, getDefaultRowHeaderStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataStyleMap

protected Map dataStyleMap
a map holding olap cells vs styles

Constructor Detail

DefaultOlapStyleModel

public DefaultOlapStyleModel()
Constructs a DefaultOlapStyleModel.

Method Detail

applyDataStyle

public void applyDataStyle(Component c,
                           PivotTable table,
                           PivotRowAdapter[] rowAdapters,
                           TreePath[] rowPaths,
                           PivotColumnAdapter[] columnAdapters,
                           TreePath[] columnPaths,
                           int row,
                           int column,
                           Object value)
Visually modifies a given component, that appears in the data area of a pivot table.

Specified by:
applyDataStyle in interface PivotStyleModel
Overrides:
applyDataStyle in class DefaultPivotStyleModel
Parameters:
c - the component to modify
table - the pivot table
rowAdapters - the row header models from left to right that define the cell
rowPaths - the row paths of the row header models from left to right, that define the cell
columnAdapters - the column header models from top to bottom that define the cell
columnPaths - the column paths of the column header models from top to bottom, that define the cell
row - the component's row in the pivot table
column - the component's column in the pivot table
value - the data value

clearDataStyles

public void clearDataStyles()
Clears any custom data styles that were based on a specific OlapCell.


getDataStyle

public PivotStyle getDataStyle(OlapCell cell)
Retrieves the style for the given olap cell.

Parameters:
cell - the olap cell whose style is returned
Returns:
the cell's style

setDataStyle

public void setDataStyle(OlapCell cell,
                         PivotStyle style)
Assigns the style to use for the given olap cell.

Parameters:
cell - the olap cell whose style is assigned
style - the cell's style to assign

Copyright © 2011 Citra Technologies. All Rights Reserved.