public class PositionDiscriminator extends java.lang.Object implements DiscriminatorXML
DataView item
is in a particular location.
For example, you could use this Discriminator to specify
that a DiscriminatorRule should apply to the first row in
a crosstab or table.
This Discriminator compares an internal
ComponentInfo class to a ComponentInfo class that
is in the RuleContext that describes the item to be painted.
DiscriminatorRule,
RuleContext,
ComponentInfo,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
a_column |
protected static java.lang.String |
a_depth |
protected static java.lang.String |
a_edge |
protected static java.lang.String |
a_group |
protected static java.lang.String |
a_index |
protected static java.lang.String |
a_row |
protected static int |
column |
protected static int |
dataColumn |
protected static int |
dataRow |
protected static int |
depth |
protected static int |
edge |
protected static int |
group |
protected static int |
index |
protected ComponentInfo |
m_componentInfo |
protected static java.lang.String |
NAME_COLCOMPINFO |
protected static java.lang.String |
NAME_DATACOMPINFO |
protected static java.lang.String |
NAME_EDGECOMPINFO |
protected static java.lang.String |
NAME_GROUPCOMPINFO |
protected static java.lang.String |
NAME_PAGEITEMCOMPINFO |
static java.lang.String |
NAME_POS_DISC |
protected static java.lang.String |
NAME_ROWCOMPINFO |
protected static java.lang.String |
NAME_SERIESCOMPINFO |
protected static int |
pageItem |
protected static int |
row |
protected static int |
series |
| Constructor and Description |
|---|
PositionDiscriminator()
Constructor that does not take a
ComponentInfo. |
PositionDiscriminator(ComponentInfo componentInfo)
Constructor that specifies a
ComponentInfo. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applies(RuleContext context)
Specifies whether the position in the specified
RuleContext
matches that of the position for this PositionDiscriminator. |
java.lang.Object |
clone()
Clones this
PositionDiscriminator. |
ComponentInfo |
getComponentInfo()
Retrieves the
ComponentInfo object of this
PositionDiscriminator. |
oracle.dss.util.xml.ObjectNode |
getXML(boolean allProperties,
ComponentTypeConverter converter,
boolean emptyElement)
Retrieves XML that represents properties and their values in the form
of and
ObjectNode. |
void |
setComponentInfo(ComponentInfo componentInfo)
Specifies the
ComponentInfo object for this
PositionDiscriminator. |
boolean |
setXML(oracle.dss.util.xml.ObjectNode node,
ComponentTypeConverter converter,
java.lang.String version,
int reset)
Specifies XML that represents properties and values.
|
protected ComponentInfo m_componentInfo
public static final java.lang.String NAME_POS_DISC
protected static final int column
protected static final int dataRow
protected static final int dataColumn
protected static final int edge
protected static final int depth
protected static final int index
protected static final int group
protected static final int pageItem
protected static final int row
protected static final int series
protected static final java.lang.String NAME_COLCOMPINFO
protected static final java.lang.String NAME_DATACOMPINFO
protected static final java.lang.String NAME_EDGECOMPINFO
protected static final java.lang.String NAME_GROUPCOMPINFO
protected static final java.lang.String NAME_PAGEITEMCOMPINFO
protected static final java.lang.String NAME_ROWCOMPINFO
protected static final java.lang.String NAME_SERIESCOMPINFO
protected static final java.lang.String a_column
protected static final java.lang.String a_row
protected static final java.lang.String a_edge
protected static final java.lang.String a_depth
protected static final java.lang.String a_index
protected static final java.lang.String a_group
public PositionDiscriminator()
ComponentInfo.
If you use this constructor, call the setComponentInfo
method to specify the position.public PositionDiscriminator(ComponentInfo componentInfo)
ComponentInfo.componentInfo - The ComponentInfo object that specifies
the position that a DataView item must occupy in
order for this PositionDiscriminator to apply.public java.lang.Object clone()
PositionDiscriminator.clone in interface Discriminatorclone in class java.lang.ObjectPositionDiscriminator.public ComponentInfo getComponentInfo()
ComponentInfo object of this
PositionDiscriminator.ComponentInfo object that specifies
the position that a DataView item must occupy in
order for this PositionDiscriminator to apply.public void setComponentInfo(ComponentInfo componentInfo)
ComponentInfo object for this
PositionDiscriminator.componentInfo - The ComponentInfo object that specifies
the position that a DataView item must occupy in
order for this PositionDiscriminator to apply.public boolean applies(RuleContext context)
RuleContext
matches that of the position for this PositionDiscriminator.
This method compares ComponentInfo objects.applies in interface Discriminatorcontext - The context of the item to be painted.true if the ComponentInfo of the
specified RuleContext is equivalent to the
ComponentInfo for this
PositionDiscriminator,
false if not.public boolean setXML(oracle.dss.util.xml.ObjectNode node,
ComponentTypeConverter converter,
java.lang.String version,
int reset)
DiscriminatorXMLDiscriminatorXML.setXML in interface DiscriminatorXMLnode - ObjectNode that has the properties and their values.converter - A converter that converts component strings to integers
and vice versa.version - The XML version.reset - A constant that indicates how much to reset when XML
is applied. Valid values are listed in the See Also section.true if XML is properly applied,
false if the XML cannot be applied.Rule.RESET_NONE,
Rule.RESET_XML_PROPERTIES,
Rule.RESET_EVERYTHINGpublic oracle.dss.util.xml.ObjectNode getXML(boolean allProperties,
ComponentTypeConverter converter,
boolean emptyElement)
DiscriminatorXMLObjectNode.getXML in interface DiscriminatorXMLallProperties - true to store all property values in XML,
false to store only values that are different
from default values.converter - A converter that converts component strings to integers
and integers to strings.emptyElement - true if an empty element needs to be returned
when none of the property values have changed from default.
false if null should should be returned when
none of the property values have changed from default.
This argument is considered only if
allProperties is false.