public class SizingManagerImpl extends SizingManager
SizingManager implementation.AUTOSIZE, COLUMN_HEADER_ROW_HEIGHT_RULES_KEY, COLUMN_WIDTH_RULES_KEY, DEFAULT_COLUMN_HEADER_ROW_HEIGHT_KEY, DEFAULT_COLUMN_WIDTH_KEY, DEFAULT_ROW_HEADER_COLUMN_WIDTH_KEY, DEFAULT_ROW_HEIGHT_KEY, ROW_HEADER_COLUMN_WIDTH_RULES_KEY, ROW_HEIGHT_RULES_KEY, SCROLL_SIZE, TYPEID_KEY, m_parent, TRANSIENT_KEY| Constructor and Description |
|---|
SizingManagerImpl()
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeColumnHeaderRowHeight(java.lang.String layer)
Returns the height in pixels of a layer on the pivot table's column header.
|
int |
computeColumnWidth(QDR sliceQDR)
Returns the width in pixels of the specified pivot table column.
|
protected int |
computeLayerSize(java.util.List sizingRules,
int defaultSize,
java.lang.String layer)
Returns the size in pixels of the specified layer.
|
int |
computeRowHeaderColumnWidth(java.lang.String layer)
Returns the width in pixels of a layer on the pivot table's row header.
|
int |
computeRowHeight(QDR sliceQDR)
Returns the height in pixels of the specified pivot table row.
|
protected int |
computeSliceSize(java.util.List sizingRules,
int defaultSize,
QDR sliceQDR)
Returns the size in pixels of the specified slice.
|
protected SizingRule |
findLayerRule(java.util.List sizingRules,
java.lang.String layer)
Returns the last rule in the specified list that applies to the
specified layer, or
null if the list contains no such rule. |
protected SizingRule |
findSliceRule(java.util.List sizingRules,
QDR sliceQDR)
Returns the last rule in the specified list that applies to the
specified slice, or
null if the list contains no such rule. |
java.util.List<SizingRule> |
getOverriddenRules(java.util.List<SizingRule> rules,
SizingRule rule)
Retrieves a
List of SizingRules that are overridden by the specified rule. |
void |
initRules()
This method is called by the Pivot Table, before asking the
SizingManager to compute sizes. |
protected void |
initRules(java.util.List sizingRules)
Initializes all of the rules in the provided list.
|
void |
removeOverriddenRules(java.util.List<SizingRule> rules,
SizingRule rule)
Removes
SizingRules, from a List of SizingRules,
that are overridden by the specified rule. |
getBeanType, getColumnHeaderRowHeightRules, getColumnWidthRules, getDefaultColumnHeaderRowHeight, getDefaultColumnWidth, getDefaultRowHeaderColumnWidth, getDefaultRowHeight, getRowHeaderColumnWidthRules, getRowHeightRules, removeRules, restoreState, setColumnHeaderRowHeightRules, setColumnWidthRules, setDefaultColumnHeaderRowHeight, setDefaultColumnWidth, setDefaultRowHeaderColumnWidth, setDefaultRowHeight, setRowHeaderColumnWidthRules, setRowHeightRulesapplyProperties, getBooleanProperty, getFacesBean, getId, getParent, getProperty, getPropertyKey, getSetAttributeIndex, isTransient, isUpdated, processSetAttribute, processSetAttributeAndAdd, registerAttachedObjectKey, saveState, setBooleanProperty, setId, setParent, setProperty, setTransient, setUpdatedpublic int computeColumnWidth(QDR sliceQDR)
SizingManagercomputeColumnWidth in class SizingManagersliceQDR - the QDR of the desired column, containing a key/value pair for each header cell in the columnpublic int computeRowHeight(QDR sliceQDR)
SizingManagercomputeRowHeight in class SizingManagersliceQDR - the QDR of the desired row, containing a key/value pair for each header cell in the rowpublic int computeRowHeaderColumnWidth(java.lang.String layer)
SizingManagercomputeRowHeaderColumnWidth in class SizingManagerlayer - the layer on the row headerpublic int computeColumnHeaderRowHeight(java.lang.String layer)
SizingManagercomputeColumnHeaderRowHeight in class SizingManagerlayer - the layer on the column headerpublic void initRules()
SizingManagerSizingManager to compute sizes.initRules in class SizingManagerprotected void initRules(java.util.List sizingRules)
sizingRules - the rules to initializeprotected SizingRule findSliceRule(java.util.List sizingRules, QDR sliceQDR)
null if the list contains no such rule.sizingRules - the list of sizing rulessliceQDR - the QDR of the slicenullprotected SizingRule findLayerRule(java.util.List sizingRules, java.lang.String layer)
null if the list contains no such rule.sizingRules - the list of sizing ruleslayer - the layer of interestnullprotected int computeSliceSize(java.util.List sizingRules,
int defaultSize,
QDR sliceQDR)
sizingRules - the sizing rules that might indicate a size for the slicedefaultSize - the size to use if none of the sizing rules apply to the slicesliceQDR - the QDR of the slice of interestprotected int computeLayerSize(java.util.List sizingRules,
int defaultSize,
java.lang.String layer)
sizingRules - the sizing rules that might indicate a size for the layerdefaultSize - the size to use if none of the sizing rules apply to the layerlayer - the layer of interestpublic java.util.List<SizingRule> getOverriddenRules(java.util.List<SizingRule> rules, SizingRule rule)
List of SizingRules that are overridden by the specified rule.
By default, SizingManagerImpl only removes:
- SliceSizingRuleImpls that override other SliceSizingRuleImpls.
- LayerSizingRuleImpls that override other LayerSizingRuleImpls.
Therefore, if an application creates custom SliceSizingRules or LayerSizingRules,
then it will also need to extend SizingManagerImpl and override this method, if it wants:
- its custom rules to be overridden by SliceSizingRuleImpl/LayerSizingRuleImpl
- SliceSizingRuleImpl/LayerSizingRuleImpl to be able to override its custom rules.
If the rule passed into an application's implmentation of getOverriddenRules is a SliceSizingRuleImpl/
LayerSizingRuleImpl, then it should call SizingManagerImpl.getOverriddenRules first,
to collect a list of default rules that
are overridden by the rule, and then it should perform a custom check to see if the rule
overrides any custom rules in the list of rules.
If the rule passed into an application's implmentation of getOverriddenRules is a custom
rule, then it should perform a custom check to see if any rules in the list are overridden by
the custom rule.getOverriddenRules in class SizingManagerrules - a List of SizingRulesrule - a SizingRule instance that is used to determine the overridden rulesList of overridden SizingRulespublic void removeOverriddenRules(java.util.List<SizingRule> rules, SizingRule rule)
SizingManagerSizingRules, from a List of SizingRules,
that are overridden by the specified rule.removeOverriddenRules in class SizingManagerrules - a List of SizingRulesrule - a SizingRule instance that is used to determine the overridden rules