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  Calculator DEFAULT_SUMMARY
           
 
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[] 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.
 void setSubtotals(Calculator[] subtotals)
          Sets a set of subtotals in order.
 void setSummary(Calculator summary)
          Sets the summary calculator, null to use the default calculator.
 void setTitle(java.lang.String title)
          Sets the title of the field that is used to display on the UI, like Data area type.
 void setType(PivotField.Type area)
          Sets the area type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SUMMARY

protected final Calculator DEFAULT_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

setType

public void setType(PivotField.Type area)
Sets the area type.

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

public void setSubtotals(Calculator[] subtotals)
Sets a set of subtotals in order.

See Also:
Calculator

getSubtotals

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

Specified by:
getSubtotals in interface PivotField

setSummary

public void setSummary(Calculator summary)
Sets the summary calculator, null to use the default calculator.

See Also:
Calculator

getSummary

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

Specified by:
getSummary in interface PivotField


Copyright © 2012. All Rights Reserved.