Adobe InDesign CS4 (6.0) Object Model JS: Condition

InDesign CS4

Class

Condition

 A condition for conditional text.

QuickLinks

extractLabel, getElements, insertLabel, remove, toSource, toSpecifier

Hierarchy

Application | Document
Condition

Properties

PropertyTypeAccessDescription
idnumber readonlyThe unique ID of the Condition.
indexnumber readonlyThe index of the Condition within its containing object.
indicatorColor3 Reals (0 - 255)
UIColors
r/wThe color for the condition indicator; specified either as an array of three doubles representing RGB values in the range 0 to 255, or as a UI color. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator.
indicatorMethodConditionIndicatorMethod:
ConditionIndicatorMethod.USE_UNDERLINE
ConditionIndicatorMethod.USE_HIGHLIGHT
r/wThe condition indicator method.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the Condition.
parentApplication
Document
readonlyThe parent of the Condition (a Application or Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
underlineIndicatorAppearanceConditionUnderlineIndicatorAppearance:
ConditionUnderlineIndicatorAppearance.WAVY
ConditionUnderlineIndicatorAppearance.SOLID
ConditionUnderlineIndicatorAppearance.DASHED
r/wThe condition underline indicator appearance.
visiblebool r/wIf true, the Condition is visible.

Methods

Instances

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

Array of Condition getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove ([replacingWith: any])
Delete the condition.

ParameterTypeDescription
replacingWithCondition
String
The condition to apply to text in place of the deleted condition. By default, no condition is applied in place of the deleted condition. Can accept: Condition or String. (Optional)

string toSource ()
Generates a string which, if executed, will return the Condition.

string toSpecifier ()
Retrieves the object specifier.

Element of

Character.appliedConditions

InsertionPoint.appliedConditions

Line.appliedConditions

Paragraph.appliedConditions

Text.appliedConditions

TextColumn.appliedConditions

TextStyleRange.appliedConditions

Word.appliedConditions

Used in:

void Character.applyConditions (using: Array of Condition[, removeExisting: bool=false])

void Condition.remove ([replacingWith: any])

array of Condition Conditions.itemByRange (from: any, to: any)

Condition Conditions.nextItem (obj: Condition)

Condition Conditions.previousItem (obj: Condition)

void InsertionPoint.applyConditions (using: Array of Condition[, removeExisting: bool=false])

void Line.applyConditions (using: Array of Condition[, removeExisting: bool=false])

void Paragraph.applyConditions (using: Array of Condition[, removeExisting: bool=false])

void Text.applyConditions (using: Array of Condition[, removeExisting: bool=false])

void TextColumn.applyConditions (using: Array of Condition[, removeExisting: bool=false])

void TextStyleRange.applyConditions (using: Array of Condition[, removeExisting: bool=false])

void Word.applyConditions (using: Array of Condition[, removeExisting: bool=false])

Return

Array of Condition Condition.getElements ()

Condition Conditions.[] (index: number)

Condition Conditions.add ([withProperties: Object])

Condition Conditions.anyItem ()

Array of Condition Conditions.everyItem ()

Condition Conditions.firstItem ()

Condition Conditions.item (index: any)

Condition Conditions.itemByID (id: number)

Condition Conditions.itemByName (name: string)

Array of Condition Conditions.itemByRange (from: any, to: any)

Condition Conditions.lastItem ()

Condition Conditions.middleItem ()

Condition Conditions.nextItem (obj: Condition)

Condition Conditions.previousItem (obj: Condition)

Jongware, 20-Jun-2010 v3.0.3dContents :: Index