com.tonbeller.jpivot.table
Class AxisBuilderSupport

java.lang.Object
  extended by com.tonbeller.jpivot.table.PartBuilderSupport
      extended by com.tonbeller.jpivot.table.AxisBuilderSupport
All Implemented Interfaces:
AxisBuilder, AxisConfig, PartBuilder, SpanDirections, Available, com.tonbeller.wcf.bookmarks.Bookmarkable, java.beans.PropertyChangeListener, java.util.EventListener
Direct Known Subclasses:
ColumnAxisBuilderImpl, RowAxisBuilderImpl

public abstract class AxisBuilderSupport
extends PartBuilderSupport
implements AxisBuilder, AxisConfig, java.beans.PropertyChangeListener

Created on 24.10.2002

Author:
av

Field Summary
protected  AxisHeaderBuilder axisHeaderBuilder
           
protected  int headerSpan
           
protected  int hierarchyHeader
           
protected  boolean memberIndent
           
protected  int memberSpan
           
protected  PropertySpanBuilder propertySpanBuilder
           
protected  boolean showParentMembers
           
protected  SpanBuilder spanBuilder
           
protected  SpanCalc spanCalc
           
 
Fields inherited from class com.tonbeller.jpivot.table.PartBuilderSupport
table
 
Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
EXTENSIONAL, INTENSIONAL
 
Fields inherited from interface com.tonbeller.jpivot.table.AxisConfig
HIERARCHY_HEADER, HIERARCHY_LEVEL_HEADER, LEVEL_HEADER, NO_HEADER
 
Fields inherited from interface com.tonbeller.jpivot.table.span.SpanDirections
HIERARCHY_SPAN, HIERARCHY_THEN_POSITION_SPAN, NO_SPAN, POSITION_SPAN, POSITION_THEN_HIERARCHY_SPAN
 
Constructor Summary
protected AxisBuilderSupport(SpanBuilder spanBuilder)
           
 
Method Summary
protected  void buildHeading(org.w3c.dom.Element row, Span span, int rowspan, int colspan, boolean even)
          builds a single cell of the axis.
 void destroy(javax.servlet.http.HttpSession session)
          destructor, called once after session timeout
protected abstract  Axis getAxis()
          returns the row/column axis or null if result is 1- or 0-dimensional
 AxisConfig getAxisConfig()
           
 AxisHeaderBuilder getAxisHeaderBuilder()
           
 java.lang.Object getBookmarkState(int levelOfDetail)
          stores settings for Member Properties.
 int getHeaderSpan()
          Returns the headerSpan.
 int getHierarchyHeader()
          Returns the hierarchyHeader.
 int getMemberSpan()
          Returns the memberSpan.
 PropertyConfig getPropertyConfig()
           
 SpanBuilder getSpanBuilder()
          Returns the spanBuilder.
 SpanCalc getSpanCalc()
          only valid between startBuild() and stopBuild()
protected  void initialize(Axis axis)
          called from startBuild()
 void initialize(com.tonbeller.wcf.controller.RequestContext context, TableComponent table)
          deferred ctor, called once after creation
 boolean isMemberIndent()
          Returns the memberIndent.
 boolean isShowParentMembers()
          Returns the showParentMembers.
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void setAxisHeaderBuilder(AxisHeaderBuilder axisHeaderBuilder)
           
 void setBookmarkState(java.lang.Object state)
          restores settings for Member Properties.
 void setHeaderSpan(int headerSpan)
          Sets the headerSpan.
 void setHierarchyHeader(int hierarchyHeader)
          Sets the hierarchyHeader.
 void setMemberIndent(boolean memberIndent)
          Sets the memberIndent.
 void setMemberSpan(int memberSpan)
          Sets the memberSpan.
 void setShowParentMembers(boolean showParentMembers)
          Sets the showParentMembers.
 void setSpanBuilder(SpanBuilder spanBuilder)
          Sets the spanBuilder.
 void startBuild(com.tonbeller.wcf.controller.RequestContext context)
          called before the DOM is built after the TableRenderer has been fully initialized
 void stopBuild()
          called after the DOM has been built.
 
Methods inherited from class com.tonbeller.jpivot.table.PartBuilderSupport
isAvailable, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tonbeller.jpivot.table.AxisBuilder
buildRow, getColumnCount, getRowCount
 
Methods inherited from interface com.tonbeller.jpivot.table.PartBuilder
isAvailable
 

Field Detail

spanCalc

protected SpanCalc spanCalc

spanBuilder

protected SpanBuilder spanBuilder

propertySpanBuilder

protected PropertySpanBuilder propertySpanBuilder

axisHeaderBuilder

protected AxisHeaderBuilder axisHeaderBuilder

showParentMembers

protected boolean showParentMembers

memberIndent

protected boolean memberIndent

hierarchyHeader

protected int hierarchyHeader

memberSpan

protected int memberSpan

headerSpan

protected int headerSpan
Constructor Detail

AxisBuilderSupport

protected AxisBuilderSupport(SpanBuilder spanBuilder)
Method Detail

initialize

public void initialize(com.tonbeller.wcf.controller.RequestContext context,
                       TableComponent table)
                throws java.lang.Exception
Description copied from interface: PartBuilder
deferred ctor, called once after creation

Specified by:
initialize in interface PartBuilder
Overrides:
initialize in class PartBuilderSupport
Throws:
java.lang.Exception

destroy

public void destroy(javax.servlet.http.HttpSession session)
             throws java.lang.Exception
Description copied from interface: PartBuilder
destructor, called once after session timeout

Specified by:
destroy in interface PartBuilder
Overrides:
destroy in class PartBuilderSupport
Throws:
java.lang.Exception

initialize

protected void initialize(Axis axis)
called from startBuild()


isShowParentMembers

public boolean isShowParentMembers()
Returns the showParentMembers.

Specified by:
isShowParentMembers in interface AxisConfig
Returns:
boolean

setShowParentMembers

public void setShowParentMembers(boolean showParentMembers)
Sets the showParentMembers.

Specified by:
setShowParentMembers in interface AxisConfig
Parameters:
showParentMembers - The showParentMembers to set

getSpanBuilder

public SpanBuilder getSpanBuilder()
Returns the spanBuilder.

Specified by:
getSpanBuilder in interface AxisBuilder
Returns:
SpanBuilder
See Also:
SpanBuilder

setSpanBuilder

public void setSpanBuilder(SpanBuilder spanBuilder)
Sets the spanBuilder.

Specified by:
setSpanBuilder in interface AxisBuilder
Parameters:
spanBuilder - The spanBuilder to set
See Also:
SpanBuilder

isMemberIndent

public boolean isMemberIndent()
Returns the memberIndent.

Specified by:
isMemberIndent in interface AxisConfig
Returns:
boolean

setMemberIndent

public void setMemberIndent(boolean memberIndent)
Sets the memberIndent.

Specified by:
setMemberIndent in interface AxisConfig
Parameters:
memberIndent - The memberIndent to set

getAxisConfig

public AxisConfig getAxisConfig()
Specified by:
getAxisConfig in interface AxisBuilder
See Also:
com.tonbeller.jpivot.ui.table.AxisBuilder#getAxisConfig()

getHeaderSpan

public int getHeaderSpan()
Returns the headerSpan.

Specified by:
getHeaderSpan in interface AxisConfig
Returns:
int

getHierarchyHeader

public int getHierarchyHeader()
Returns the hierarchyHeader.

Specified by:
getHierarchyHeader in interface AxisConfig
Returns:
int

getMemberSpan

public int getMemberSpan()
Returns the memberSpan.

Specified by:
getMemberSpan in interface AxisConfig
Returns:
int

setHeaderSpan

public void setHeaderSpan(int headerSpan)
Sets the headerSpan.

Specified by:
setHeaderSpan in interface AxisConfig
Parameters:
headerSpan - The headerSpan to set

setHierarchyHeader

public void setHierarchyHeader(int hierarchyHeader)
Sets the hierarchyHeader.

Specified by:
setHierarchyHeader in interface AxisConfig
Parameters:
hierarchyHeader - The hierarchyHeader to set

setMemberSpan

public void setMemberSpan(int memberSpan)
Sets the memberSpan.

Specified by:
setMemberSpan in interface AxisConfig
Parameters:
memberSpan - The memberSpan to set

getAxis

protected abstract Axis getAxis()
returns the row/column axis or null if result is 1- or 0-dimensional


startBuild

public void startBuild(com.tonbeller.wcf.controller.RequestContext context)
Description copied from interface: PartBuilder
called before the DOM is built after the TableRenderer has been fully initialized

Specified by:
startBuild in interface PartBuilder
Overrides:
startBuild in class PartBuilderSupport

stopBuild

public void stopBuild()
Description copied from interface: PartBuilder
called after the DOM has been built.

Specified by:
stopBuild in interface PartBuilder
Overrides:
stopBuild in class PartBuilderSupport

getSpanCalc

public SpanCalc getSpanCalc()
only valid between startBuild() and stopBuild()

Specified by:
getSpanCalc in interface AxisBuilder

buildHeading

protected void buildHeading(org.w3c.dom.Element row,
                            Span span,
                            int rowspan,
                            int colspan,
                            boolean even)
builds a single cell of the axis.

Parameters:
row -

getPropertyConfig

public PropertyConfig getPropertyConfig()
Specified by:
getPropertyConfig in interface AxisConfig

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getBookmarkState

public java.lang.Object getBookmarkState(int levelOfDetail)
stores settings for Member Properties. The axis style is stored in the AxisStyleUI table extension

Specified by:
getBookmarkState in interface com.tonbeller.wcf.bookmarks.Bookmarkable
Overrides:
getBookmarkState in class PartBuilderSupport

setBookmarkState

public void setBookmarkState(java.lang.Object state)
restores settings for Member Properties. The axis style is stored in the AxisStyleUI table extension

Specified by:
setBookmarkState in interface com.tonbeller.wcf.bookmarks.Bookmarkable
Overrides:
setBookmarkState in class PartBuilderSupport

getAxisHeaderBuilder

public AxisHeaderBuilder getAxisHeaderBuilder()
Specified by:
getAxisHeaderBuilder in interface AxisBuilder

setAxisHeaderBuilder

public void setAxisHeaderBuilder(AxisHeaderBuilder axisHeaderBuilder)
Specified by:
setAxisHeaderBuilder in interface AxisBuilder