Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-04

oracle.dss.rules.discriminator
Class ComponentTypeDiscriminator

java.lang.Object
  extended by oracle.dss.rules.discriminator.ComponentTypeDiscriminator
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Discriminator, DiscriminatorXML

public class ComponentTypeDiscriminator
extends java.lang.Object
implements DiscriminatorXML

Discriminator for a rule that applies when a 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.

See Also:
Serialized Form

Field Summary
protected  int m_componentType
           
static java.lang.String NAME_COMP_TYPE_DISC
           
 
Constructor Summary
ComponentTypeDiscriminator()
          Constructor that does not specify a component type.
ComponentTypeDiscriminator(int componentType)
          Constructor that specifies a component type.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_componentType

protected int m_componentType

NAME_COMP_TYPE_DISC

public static final java.lang.String NAME_COMP_TYPE_DISC
See Also:
Constant Field Values
Constructor Detail

ComponentTypeDiscriminator

public ComponentTypeDiscriminator()
Constructor that does not specify a component type. If you use this constructor, call the setComponentType method to specify the component.


ComponentTypeDiscriminator

public ComponentTypeDiscriminator(int componentType)
Constructor that specifies a component type.

Parameters:
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.
See Also:
oracle.dss.crosstab.Crosstab, Graph, oracle.dss.gridView.GridView
Method Detail

clone

public java.lang.Object clone()
Clones this ComponentTypeDiscriminator.

Specified by:
clone in interface Discriminator
Overrides:
clone in class java.lang.Object
Returns:
The clone of this ComponentTypeDiscriminator.

getComponentType

public int getComponentType()
Retrieves the component type of this ComponentTypeDiscriminator.

Returns:
A constant that represents the type of component a DataView item must be in order for this ComponentTypeDiscriminator to apply. Constants are defined in the sublasses of the DataView class.
See Also:
oracle.dss.crosstab.Crosstab, Graph, oracle.dss.gridView.GridView

setComponentType

public void setComponentType(int componentType)
Specifies the type of component for this ComponentTypeDiscriminator.

Parameters:
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.
See Also:
oracle.dss.crosstab.Crosstab, Graph, oracle.dss.gridView.GridView

applies

public boolean applies(RuleContext context)
Indicates whether the ComponentType from the specified RuleContext matches the ComponentType for this ComponentTypeDiscriminator.

Specified by:
applies in interface Discriminator
Parameters:
context - The context of the item being painted.
Returns:
true if the component type in context is the same as the component type of this ComponentTypeDiscriminator, false if not.

setXML

public boolean setXML(oracle.dss.util.xml.ObjectNode node,
                      ComponentTypeConverter converter,
                      java.lang.String version,
                      int reset)
Description copied from interface: DiscriminatorXML
Specifies XML that represents properties and values. This method applies the values of the properties in the XML to the DiscriminatorXML.

Specified by:
setXML in interface DiscriminatorXML
Parameters:
node - 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.
Returns:
true if XML is properly applied, false if the XML cannot be applied.
See Also:
Rule.RESET_NONE, Rule.RESET_XML_PROPERTIES, Rule.RESET_EVERYTHING

getXML

public oracle.dss.util.xml.ObjectNode getXML(boolean allProperties,
                                             ComponentTypeConverter converter,
                                             boolean emptyNode)
Description copied from interface: DiscriminatorXML
Retrieves XML that represents properties and their values in the form of and ObjectNode.

Specified by:
getXML in interface DiscriminatorXML
Parameters:
allProperties - 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.
Returns:
XML for the properties and values.

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-04

Copyright © 1997, 2010, Oracle. All rights reserved.