Adobe InDesign CS5 (7.0) Object Model JS: ObjectStyles

InDesign CS5

Class

ObjectStyles

 A collection of object styles.

QuickLinks

[], add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

ObjectStyle [] (index: number)
Returns the ObjectStyle with the specified index.

ParameterTypeDescription
indexnumberThe index.

ObjectStyle add ([withProperties: Object])
Creates a new ObjectStyle.

ParameterTypeDescription
withPropertiesObjectInitial values for properties of the new ObjectStyle (Optional)

ObjectStyle anyItem ()
Returns any ObjectStyle in the collection.

number count ()
Displays the number of elements in the ObjectStyle.

Array of ObjectStyle everyItem ()
Returns every ObjectStyle in the collection.

ObjectStyle firstItem ()
Returns the first ObjectStyle in the collection.

ObjectStyle item (index: varies)
Returns the ObjectStyle with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer or String.

ObjectStyle itemByID (id: number)
Returns the ObjectStyle with the specified ID.

ParameterTypeDescription
idnumberThe ID.

ObjectStyle itemByName (name: string)
Returns the ObjectStyle with the specified name.

ParameterTypeDescription
namestringThe name.

Array of ObjectStyle itemByRange (from: varies, to: varies)
Returns the ObjectStyles within the specified range.

ParameterTypeDescription
fromLong Integer
ObjectStyle
String
The ObjectStyle, index, or name at the beginning of the range. Can accept: ObjectStyle, Long Integer or String.
toLong Integer
ObjectStyle
String
The ObjectStyle, index, or name at the end of the range. Can accept: ObjectStyle, Long Integer or String.

ObjectStyle lastItem ()
Returns the last ObjectStyle in the collection.

ObjectStyle middleItem ()
Returns the middle ObjectStyle in the collection.

ObjectStyle nextItem (obj: ObjectStyle)
Returns the ObjectStyle whose index follows the specified ObjectStyle in the collection.

ParameterTypeDescription
objObjectStyleThe ObjectStyle whose index comes before the desired ObjectStyle.

ObjectStyle previousItem (obj: ObjectStyle)
Returns the ObjectStyle with the index previous to the specified index.

ParameterTypeDescription
objObjectStyleThe index of the ObjectStyle that follows the desired ObjectStyle.

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

Element of

Application.objectStyles

Document.objectStyles

ObjectStyleGroup.objectStyles

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