org.zkoss.pivot.impl
Class SimplePivotField

java.lang.Object
  extended by org.zkoss.pivot.impl.SimplePivotField
All Implemented Interfaces:
PivotField
Direct Known Subclasses:
TabularPivotField

public class SimplePivotField
extends java.lang.Object
implements PivotField

A simple pivot field implementation.

Author:
jumperchen, dennischen

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.zkoss.pivot.PivotField
PivotField.Type
 
Field Summary
protected  GroupHandler _groupHandler
           
protected  java.lang.String _name
           
protected  Calculator[] _subtotals
           
protected  Calculator _summary
           
protected  java.lang.String _title
           
protected  PivotField.Type _type
           
 
Constructor Summary
SimplePivotField()
           
SimplePivotField(java.lang.String name)
           
 
Method Summary
 void addFieldDataListener(FieldDataListener f)
          Adds a field data listener to the pivot field.
protected  void fireEvent(java.lang.String type, java.lang.Object original, java.lang.Object current)
           
 java.lang.String getFieldName()
          Returns the field name which indicates the name within the data model
 GroupHandler getGroupHandler()
          Returns the group handler.
 Calculator getSubtotal(int index)
          Returns the ith subtotal calculator on the field.
 Calculator[] getSubtotals()
          Returns a set of subtotal calculator in order.
 Calculator getSummary()
          Returns the summary calculator
 java.lang.String getTitle()
          Returns the title of the field.
 PivotField.Type getType()
          Returns the area type.
 void removeFieldDataListener(FieldDataListener f)
          Removes the specified field data listener from the pivot field.
 void setFieldName(java.lang.String fieldName)
          Set field name
 void setGroupHandler(GroupHandler groupHandler)
          Sets the group handler.
protected  void setSubtotals(Calculator[] subtotals)
           
protected  void setSummary(Calculator summary)
           
 void setTitle(java.lang.String title)
          Sets the title of the field that is used to display on the UI, like Data area type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

protected java.lang.String _name

_title

protected java.lang.String _title

_type

protected PivotField.Type _type

_groupHandler

protected GroupHandler _groupHandler

_subtotals

protected Calculator[] _subtotals

_summary

protected Calculator _summary
Constructor Detail

SimplePivotField

public SimplePivotField()

SimplePivotField

public SimplePivotField(java.lang.String name)
Method Detail

setTitle

public void setTitle(java.lang.String title)
Sets the title of the field that is used to display on the UI, like Data area type.


getTitle

public java.lang.String getTitle()
Description copied from interface: PivotField
Returns the title of the field.

Specified by:
getTitle in interface PivotField

getType

public PivotField.Type getType()
Description copied from interface: PivotField
Returns the area type.

Specified by:
getType in interface PivotField
See Also:
PivotField.Type

getFieldName

public java.lang.String getFieldName()
Description copied from interface: PivotField
Returns the field name which indicates the name within the data model

Specified by:
getFieldName in interface PivotField

setFieldName

public void setFieldName(java.lang.String fieldName)
Set field name


setGroupHandler

public void setGroupHandler(GroupHandler groupHandler)
Sets the group handler.

See Also:
GroupHandler

getGroupHandler

public GroupHandler getGroupHandler()
Description copied from interface: PivotField
Returns the group handler.

Specified by:
getGroupHandler in interface PivotField

addFieldDataListener

public void addFieldDataListener(FieldDataListener f)
Description copied from interface: PivotField
Adds a field data listener to the pivot field.

Specified by:
addFieldDataListener in interface PivotField

removeFieldDataListener

public void removeFieldDataListener(FieldDataListener f)
Description copied from interface: PivotField
Removes the specified field data listener from the pivot field.

Specified by:
removeFieldDataListener in interface PivotField

fireEvent

protected void fireEvent(java.lang.String type,
                         java.lang.Object original,
                         java.lang.Object current)

setSubtotals

protected void setSubtotals(Calculator[] subtotals)

getSubtotals

public Calculator[] getSubtotals()
Description copied from interface: PivotField
Returns a set of subtotal calculator in order.

Specified by:
getSubtotals in interface PivotField

getSubtotal

public Calculator getSubtotal(int index)
Description copied from interface: PivotField
Returns the ith subtotal calculator on the field.

Specified by:
getSubtotal in interface PivotField

setSummary

protected void setSummary(Calculator summary)

getSummary

public Calculator getSummary()
Description copied from interface: PivotField
Returns the summary calculator

Specified by:
getSummary in interface PivotField


Copyright © 2013. All Rights Reserved.