|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tonbeller.jpivot.table.span.SpanCalc
public class SpanCalc
Calculates table spans for an axis. An axis is seen as a matrix of positions and hierarchies. For a row-axis, the positions are the rows, the hierarchies are the columns, for a column-axis its vice versa.
The cells of the matrix are Span
instances.
Constructor Summary | |
---|---|
SpanCalc(Axis axis)
creates an instance from an axis |
|
SpanCalc(Span[][] spans)
creates an instance |
Method Summary | |
---|---|
void |
addHierarchyHeader(SpanHeaderFactory shf,
boolean removeDuplicates)
|
static SpanCalc |
appendBelow(SpanCalc above,
SpanCalc below)
|
SpanCalc |
createPositionHeader(SpanHeaderFactory shf)
creates a SpanCalc for row axis headers. |
SpanConfig |
getConfig()
Returns the config. |
int |
getHierarchyCount()
Returns the hierarchyCount. |
int |
getPositionCount()
Returns the positionCount. |
Span |
getSpan(int positionIndex,
int hierarchyIndex)
return span info for the element at positionIndex, hierarchyIndex. |
Span[][] |
getSpans()
returns a matrix of spans[positionIndex][hierarchyIndex] for faster access. |
void |
setConfig(SpanConfig config)
Sets the config. |
void |
setSpans(Span[][] spans)
set the matrix of spans[positionIndex][hierarchyIndex] for faster access. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpanCalc(Span[][] spans)
public SpanCalc(Axis axis)
Method Detail |
---|
public SpanCalc createPositionHeader(SpanHeaderFactory shf)
shf
. Example: the row axis
a a a bwill get the header (upper case letters)
A B --- a a a bbecause the second
a
is not significant. Here A
is created by shf.create(a)
, and B = shf.create(b)
.
public void addHierarchyHeader(SpanHeaderFactory shf, boolean removeDuplicates)
public Span getSpan(int positionIndex, int hierarchyIndex)
positionIndex
- - index for axis.getPositions()hierarchyIndex
- - index for axis.getPositions().getMembers()
public int getHierarchyCount()
public int getPositionCount()
public SpanConfig getConfig()
public void setConfig(SpanConfig config)
config
- The config to setpublic Span[][] getSpans()
public void setSpans(Span[][] spans)
public static SpanCalc appendBelow(SpanCalc above, SpanCalc below)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |