Adobe InDesign CS6 (8.0) Object Model JS: Condition

InDesign CS6

Class

Condition

 A condition for conditional text.

QuickLinks

addEventListener, extractLabel, getElements, insertLabel, remove, removeEventListener, toSource, toSpecifier

Hierarchy

Application | Document
Condition
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
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

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

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: varies])
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)

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

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])

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: varies)

Condition Conditions.itemByID (id: number)

Condition Conditions.itemByName (name: string)

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

Condition Conditions.lastItem ()

Condition Conditions.middleItem ()

Condition Conditions.nextItem (obj: Condition)

Condition Conditions.previousItem (obj: Condition)

Jongware, 28-Apr-2012 v3.0.3hContents :: Index