@Component(value="charts_pivotScreenBuilder")
@Scope(value="prototype")
public class PivotScreenBuilder
extends java.lang.Object
ShowPivotAction
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static java.lang.String |
SCREEN_ID |
Constructor and Description |
---|
PivotScreenBuilder(com.haulmont.cuba.gui.components.ListComponent target) |
Modifier and Type | Method and Description |
---|---|
com.haulmont.cuba.gui.screen.Screen |
build() |
java.util.List<java.lang.String> |
getAdditionalProperties() |
java.util.List<java.lang.String> |
getExcludedProperties() |
java.util.List<java.lang.String> |
getIncludedProperties() |
java.lang.String |
getNativeJson() |
PivotScreenBuilder |
withAdditionalProperties(java.util.List<java.lang.String> additionalProperties)
Set properties which should be additionally included.
|
PivotScreenBuilder |
withExcludedProperties(java.util.List<java.lang.String> excludedProperties)
Set excluded properties list using fluent API method.
|
PivotScreenBuilder |
withIncludedProperties(java.util.List<java.lang.String> includedProperties)
Set included properties list using fluent API method.
|
PivotScreenBuilder |
withItems(java.util.Collection<? extends com.haulmont.cuba.core.entity.Entity> items)
Sets items that should be shown in PivotTable.
|
PivotScreenBuilder |
withNativeJson(java.lang.String nativeJson)
Set native json using fluent API method.
|
public static final java.lang.String NAME
public static final java.lang.String SCREEN_ID
public PivotScreenBuilder(com.haulmont.cuba.gui.components.ListComponent target)
public java.util.List<java.lang.String> getIncludedProperties()
public PivotScreenBuilder withIncludedProperties(java.util.List<java.lang.String> includedProperties)
ShowPivotAction.withExcludedProperties(List)
is not set.includedProperties
- list of included propertiespublic java.util.List<java.lang.String> getExcludedProperties()
public PivotScreenBuilder withExcludedProperties(java.util.List<java.lang.String> excludedProperties)
ShowPivotAction.withIncludedProperties(List)
, excluded properties will be
applied for all properties in the view.excludedProperties
- list of excluded propertiespublic PivotScreenBuilder withAdditionalProperties(java.util.List<java.lang.String> additionalProperties)
additionalProperties
- list of additional propertiespublic java.util.List<java.lang.String> getAdditionalProperties()
public java.lang.String getNativeJson()
public PivotScreenBuilder withNativeJson(java.lang.String nativeJson)
{
"cols": ["localized property", "localized property"],
"rows": ["localized property"],
"editable": false,
"renderer": "heatmap",
"aggregation": {
"id": "d8fc3fdf-730d-c94f-a0c8-72a9ce3dcb3a",
"mode": "sumOverSum",
"properties": ["localized property", "localized property"]
}
}
for editable pivot table:
{
"cols": ["localized property"],
"rows": ["localized property"],
"editable": true,
"renderers": {
"selectedRenderer": "barChart"
},
"autoSortUnusedProperties": true,
"aggregationProperties": ["localized property", "localized property"],
"aggregations": {
"selectedAggregation": "count",
"aggregations": [{
"id": "647780f0-c6d0-6ade-a63a-542b5c8cdbd5",
"mode": "count",
"caption": "Count"
}, {
"id": "c2663238-2654-67f0-2dec-add6962d867c",
"mode": "sumOverSum"
}]
}
}
nativeJson
- configuration json of pivot tablepublic PivotScreenBuilder withItems(java.util.Collection<? extends com.haulmont.cuba.core.entity.Entity> items)
items
- collection of entitiespublic com.haulmont.cuba.gui.screen.Screen build()