public class SliceSizingRuleImpl extends SliceSizingRule
SliceSizingRule
. It is recommended that a Serializable
subclass be used
instead of this class, such as SerializableSliceSizingRuleImpl
, and that only Serializable
subclasses of Member
be used, such as SerializableMember
.
If an instance of this class is used in conjunction with session change management, it is subject to being replaced by
an equivalent instance of SerializableSliceSizingRuleImpl
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_SLICE_SIZING_RULE_TYPE |
static org.apache.myfaces.trinidad.bean.PropertyKey |
EXACT_MATCH_REQUIRED_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
MEMBERS_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
REMOVED_AFTER_LAYOUT_CHANGE_KEY |
static org.apache.myfaces.trinidad.bean.FacesBean.Type |
TYPE |
SIZE_KEY
ID_KEY, m_parent, TRANSIENT_KEY
Constructor and Description |
---|
SliceSizingRuleImpl()
Constructs an empty
SliceSizingRuleImpl . |
SliceSizingRuleImpl(java.util.List<Member> members,
int size)
Constructs a new
SliceSizingRuleImpl . |
Modifier and Type | Method and Description |
---|---|
protected QDR |
generateMemberQDR()
Generates a member
QDR for the header cell (member) associated with
this rule; that is, the header cell that indicates to which slice(s) this rule applies. |
protected org.apache.myfaces.trinidad.bean.FacesBean.Type |
getBeanType()
Gets the bean type.
|
protected QDR |
getMemberQDR()
Gets the member
QDR for the header cell (member) associated with
this rule; that is, the header cell that indicates to which slice(s) this rule applies. |
java.util.List<Member> |
getMembers()
Returns the header cells indicating to which slice(s) this rule applies.
|
java.lang.String |
getRuleType()
Returns the rule type.
|
void |
initBeforeRun()
Called after configuring rules, but before running rules.
|
boolean |
isExactMatchRequired()
Indicates whether the
QDR must match exactly for this rule to apply. |
boolean |
isRemovedAfterLayoutChange()
Indicates whether this rule is removed when the layout changes.
|
boolean |
overridesRule(SliceSizingRuleImpl rule)
Indicates whether the rule is overridden.
|
boolean |
runRule(QDR sliceQDR)
Indicates whether this rule applies to the specified slice.
|
void |
setExactMatchRequired(boolean exactMatchRequired)
Sets whether the
QDR must match exactly for this rule to apply. |
void |
setMembers(java.util.List<Member> members)
Sets the header cells indicating to which slice(s) this rule applies.
|
void |
setRemovedAfterLayoutChange(boolean removed)
Sets whether this rule should be removed when the layout changes.
|
getSize, setSize
applyProperties, getBooleanProperty, getFacesBean, getId, getParent, getProperty, getPropertyKey, getSetAttributeIndex, isTransient, isUpdated, processSetAttribute, processSetAttributeAndAdd, registerAttachedObjectKey, restoreState, saveState, setBooleanProperty, setId, setParent, setProperty, setTransient, setUpdated
public static final java.lang.String DEFAULT_SLICE_SIZING_RULE_TYPE
public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
public static final org.apache.myfaces.trinidad.bean.PropertyKey MEMBERS_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey REMOVED_AFTER_LAYOUT_CHANGE_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey EXACT_MATCH_REQUIRED_KEY
public SliceSizingRuleImpl()
SliceSizingRuleImpl
.public SliceSizingRuleImpl(java.util.List<Member> members, int size)
SliceSizingRuleImpl
.
The members
param specifies the slice or slices to which this
rule applies. For example, say that the row edge has three layers:
City, Year, and Measure. If the members
param is "Boston, 2010, Sales",
then this rule applies to the one and only row having those three header cells.
If the members
param is "Boston, 2010", and isExactMatchRequired
returns false, then this rule applies to all rows spanned by those two header cells.
So if there are two measures, "Sales" and "Units", under "Boston, 2010" then
this rule applies to both of those rows.members
- the header cells indicating to which slice(s) this rule appliessize
- the size in pixelspublic void initBeforeRun()
SizingRule
initBeforeRun
in class SizingRule
public java.util.List<Member> getMembers()
public void setMembers(java.util.List<Member> members)
members
- the header cells indicating to which slice(s) this rule appliespublic boolean isRemovedAfterLayoutChange()
true
if this rule is removed when the layout changes, false
otherwisepublic void setRemovedAfterLayoutChange(boolean removed)
removed
- true
if this rule should be removed when the layout changes, false
otherwisepublic boolean isExactMatchRequired()
QDR
must match exactly for this rule to apply.
The default is false
.true
if this rule requires an exact match, false
otherwisepublic void setExactMatchRequired(boolean exactMatchRequired)
QDR
must match exactly for this rule to apply.exactMatchRequired
- true
if this rule should require an exact match, false
otherwisepublic boolean runRule(QDR sliceQDR)
SliceSizingRule
runRule
in class SliceSizingRule
sliceQDR
- the QDR
of the slice to be checked for applicabilitytrue
if this rule applies to the specified slice, false
otherwisepublic boolean overridesRule(SliceSizingRuleImpl rule)
rule
- another SliceSizingRuleImpl
true
if the rule is overridden, false
otherwisepublic java.lang.String getRuleType()
SizingRule
getRuleType
in class SizingRule
protected org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
SizingRule
getBeanType
in class SizingRule
protected QDR getMemberQDR()
QDR
for the header cell (member) associated with
this rule; that is, the header cell that indicates to which slice(s) this rule applies.QDR
of this rule's header cellprotected QDR generateMemberQDR()
QDR
for the header cell (member) associated with
this rule; that is, the header cell that indicates to which slice(s) this rule applies.QDR
of this rule's header cell