Class: ShapeAttributeGroupHandler

Oracle® JavaScript Extension Toolkit (JET)
3.2.0

E87541-01

QuickNav

oj. ShapeAttributeGroupHandler extends oj.AttributeGroupHandler

Version:
  • 3.2.0

Constructor

new ShapeAttributeGroupHandler(matchRules)

Creates a shape attribute group handler that will generate shape attribute values.
Parameters:
Name Type Argument Description
matchRules Object <optional>
A map of key value pairs for categories and the matching attribute value e.g. {"soda" : "square", "water" : "circle", "iced tea" : "triangleUp"}. Attribute values listed in the matchRules object will be reserved only for the matching categories when getAttributeValue is called.
Source:

Methods

addMatchRule(category, attributeValue)

Reserves an attribute value for the given category. All match rules should be added before any category assignments are done with the getValue API.
Parameters:
Name Type Description
category string Used for checking inputs to getAttributeValue against when assigning an attribute value
attributeValue string The attribute value to assign for inputs matching the given category e.g. "square" or "circle"
Inherited From:
Source:

getCategoryAssignments() → {Array}

Returns the current map of key value pairs for categories and the assigned attribute values. Note that match rules are not reflected in category assignments.
Inherited From:
Source:
Returns:
The current list of category and value pairing
Type
Array

getValue(category) → {Object}

Assigns the given category an attribute value. Will consistently return the same attribute value for equal categories.
Parameters:
Name Type Description
category Object The category to assign
Inherited From:
Source:
Returns:
The attribute value for the category
Type
Object

getValueRamp() → {Array}

Returns the array of possible shape values for this attribute group handler.
Source:
Returns:
The array of shape values
Type
Array