Package org.zkoss.pivot.impl
Class SimplePivotField
- java.lang.Object
-
- org.zkoss.pivot.impl.SimplePivotField
-
- All Implemented Interfaces:
PivotField
- Direct Known Subclasses:
TabularPivotField
public class SimplePivotField extends 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
Fields Modifier and Type Field Description protected GroupHandler_groupHandlerprotected String_nameprotected Calculator[]_subtotalsprotected Calculator_summaryprotected String_titleprotected PivotField.Type_type
-
Constructor Summary
Constructors Constructor Description SimplePivotField()SimplePivotField(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFieldDataListener(FieldDataListener f)Adds a field data listener to the pivot field.protected voidfireEvent(String type, Object original, Object current)StringgetFieldName()Returns the field name which indicates the name within the data modelGroupHandlergetGroupHandler()Returns the group handler.CalculatorgetSubtotal(int index)Returns the ith subtotal calculator on the field.Calculator[]getSubtotals()Returns a set of subtotal calculator in order.CalculatorgetSummary()Returns the summary calculatorStringgetTitle()Returns the title of the field.PivotField.TypegetType()Returns the area type.voidremoveFieldDataListener(FieldDataListener f)Removes the specified field data listener from the pivot field.voidsetFieldName(String fieldName)Set field namevoidsetGroupHandler(GroupHandler groupHandler)Sets the group handler.protected voidsetSubtotals(Calculator[] subtotals)protected voidsetSummary(Calculator summary)voidsetTitle(String title)Sets the title of the field that is used to display on the UI, like Data area type.
-
-
-
Field Detail
-
_name
protected String _name
-
_title
protected 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(String name)
-
-
Method Detail
-
setTitle
public void setTitle(String title)
Sets the title of the field that is used to display on the UI, like Data area type.
-
getTitle
public String getTitle()
Description copied from interface:PivotFieldReturns the title of the field.- Specified by:
getTitlein interfacePivotField
-
getType
public PivotField.Type getType()
Description copied from interface:PivotFieldReturns the area type.- Specified by:
getTypein interfacePivotField- See Also:
PivotField.Type
-
getFieldName
public String getFieldName()
Description copied from interface:PivotFieldReturns the field name which indicates the name within the data model- Specified by:
getFieldNamein interfacePivotField
-
setFieldName
public void setFieldName(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:PivotFieldReturns the group handler.- Specified by:
getGroupHandlerin interfacePivotField
-
addFieldDataListener
public void addFieldDataListener(FieldDataListener f)
Description copied from interface:PivotFieldAdds a field data listener to the pivot field.- Specified by:
addFieldDataListenerin interfacePivotField
-
removeFieldDataListener
public void removeFieldDataListener(FieldDataListener f)
Description copied from interface:PivotFieldRemoves the specified field data listener from the pivot field.- Specified by:
removeFieldDataListenerin interfacePivotField
-
setSubtotals
protected void setSubtotals(Calculator[] subtotals)
-
getSubtotals
public Calculator[] getSubtotals()
Description copied from interface:PivotFieldReturns a set of subtotal calculator in order.- Specified by:
getSubtotalsin interfacePivotField
-
getSubtotal
public Calculator getSubtotal(int index)
Description copied from interface:PivotFieldReturns the ith subtotal calculator on the field.- Specified by:
getSubtotalin interfacePivotField
-
setSummary
protected void setSummary(Calculator summary)
-
getSummary
public Calculator getSummary()
Description copied from interface:PivotFieldReturns the summary calculator- Specified by:
getSummaryin interfacePivotField
-
-