public class ComponentTypeDiscriminator extends java.lang.Object implements DiscriminatorXML
DataView item
is a particular component.
For example, you could use this Discriminator to specify that
numbers should be abbreviated when they mark values along the Y2-axis of a
graph.
This Discriminator compares the component type integer from the
RuleContext that describes the DataView item, with
the internal component type integer in this Discriminator.
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_componentType |
static java.lang.String |
NAME_COMP_TYPE_DISC |
| Constructor and Description |
|---|
ComponentTypeDiscriminator()
Constructor that does not specify a component type.
|
ComponentTypeDiscriminator(int componentType)
Constructor that specifies a component type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
applies(RuleContext context)
Indicates whether the
ComponentType from the specified
RuleContext matches the ComponentType for this
ComponentTypeDiscriminator. |
java.lang.Object |
clone()
Clones this
ComponentTypeDiscriminator. |
int |
getComponentType()
Retrieves the component type of this
ComponentTypeDiscriminator. |
oracle.dss.util.xml.ObjectNode |
getXML(boolean allProperties,
ComponentTypeConverter converter,
boolean emptyNode)
Retrieves XML that represents properties and their values in the form
of and
ObjectNode. |
void |
setComponentType(int componentType)
Specifies the type of component for this
ComponentTypeDiscriminator. |
boolean |
setXML(oracle.dss.util.xml.ObjectNode node,
ComponentTypeConverter converter,
java.lang.String version,
int reset)
Specifies XML that represents properties and values.
|
protected int m_componentType
public static final java.lang.String NAME_COMP_TYPE_DISC
public ComponentTypeDiscriminator()
setComponentType
method to specify the component.public ComponentTypeDiscriminator(int componentType)
componentType - A constant that represents the type of component
that a DataView item is, such as
Y2AXIS. Constants are defined in the sublasses of the
DataView class.oracle.dss.crosstab.Crosstab,
Graph,
oracle.dss.gridView.GridViewpublic java.lang.Object clone()
ComponentTypeDiscriminator.clone in interface Discriminatorclone in class java.lang.ObjectComponentTypeDiscriminator.public int getComponentType()
ComponentTypeDiscriminator.DataView item must be in order for this
ComponentTypeDiscriminator to apply.
Constants are defined in the sublasses of the
DataView class.oracle.dss.crosstab.Crosstab,
Graph,
oracle.dss.gridView.GridViewpublic void setComponentType(int componentType)
ComponentTypeDiscriminator.componentType - A constant that represents the type of component
that a DataView item must be in order
for this ComponentTypeDiscriminator
to apply. Constants are defined in the sublasses of
the DataView class.oracle.dss.crosstab.Crosstab,
Graph,
oracle.dss.gridView.GridViewpublic boolean applies(RuleContext context)
ComponentType from the specified
RuleContext matches the ComponentType for this
ComponentTypeDiscriminator.applies in interface Discriminatorcontext - The context of the item being painted.true if the component type in context
is the same as the component type of this
ComponentTypeDiscriminator,
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 emptyNode)
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.emptyNode - 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.