com.tonbeller.jpivot.table.span
Class Span

java.lang.Object
  extended by com.tonbeller.jpivot.table.span.Span
All Implemented Interfaces:
java.lang.Cloneable

public class Span
extends java.lang.Object
implements java.lang.Cloneable

contains info about one cell of an table axis.


Constructor Summary
Span(Axis axis, Position position, Displayable object)
           
Span(Displayable object)
           
 
Method Summary
 java.lang.Object clone()
           
 Axis getAxis()
          Returns the axis.
 int getHierarchyIndex()
          Returns the hierarchyIndex.
 int getHierarchySpan()
          Returns the hierarchySpan.
 int getIndent()
           
 Member getMember()
          shorthand for (Member)span.getObject()
 Displayable getObject()
          Returns the data of this axis cell.
 Position getPosition()
          Returns the position.
 int getPositionIndex()
          Returns the positionIndex.
 int getPositionSpan()
          Returns the positionSpan.
 boolean isMember()
          true if this span denotes a member.
 boolean isSignificant()
          true, if this introduces a new span, i.e. is positioned on the upper left of a multi column or multi row field.
 void setAxis(Axis axis)
          Sets the axis.
 void setIndent(int i)
           
 void setObject(Displayable object)
          Sets the object.
 void setPosition(Position position)
          Sets the position.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Span

public Span(Axis axis,
            Position position,
            Displayable object)

Span

public Span(Displayable object)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getHierarchySpan

public int getHierarchySpan()
Returns the hierarchySpan.

Returns:
int

getObject

public Displayable getObject()
Returns the data of this axis cell. Common types are Member, Level or Hierarchy but other objects are possible too.

Returns:
Object

setObject

public void setObject(Displayable object)
Sets the object.

Parameters:
object - The object to set

getPositionSpan

public int getPositionSpan()
Returns the positionSpan.

Returns:
int

getAxis

public Axis getAxis()
Returns the axis.

Returns:
Axis

getPosition

public Position getPosition()
Returns the position.

Returns:
Position

getMember

public Member getMember()
shorthand for (Member)span.getObject()


getHierarchyIndex

public int getHierarchyIndex()
Returns the hierarchyIndex.

Returns:
int

getPositionIndex

public int getPositionIndex()
Returns the positionIndex.

Returns:
int

isMember

public boolean isMember()
true if this span denotes a member. I.e. getObject() instanceof Member


clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object
See Also:
Object.clone()

isSignificant

public boolean isSignificant()
true, if this introduces a new span, i.e. is positioned on the upper left of a multi column or multi row field.

Returns:
boolean

setAxis

public void setAxis(Axis axis)
Sets the axis.

Parameters:
axis - The axis to set

setPosition

public void setPosition(Position position)
Sets the position.

Parameters:
position - The position to set

getIndent

public int getIndent()
Returns:

setIndent

public void setIndent(int i)
Parameters:
i -