Adobe InDesign CS3 (5.0) Object Model JS: Gradients

InDesign CS3

Class

Gradients

 A collection of gradients.

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

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

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

Gradient anyItem ()
Returns any Gradient in the collection.

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

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

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

Gradient item (index: any)
Returns the Gradient with the specified index or name.

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

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

Array of Gradient itemByRange (from: any, to: any)
Returns the Gradients within the specified range.

ParameterTypeDescription
fromGradient
Long Integer
String
The Gradient, index, or name at the beginning of the range. Can accept: Gradient, Long Integer or String.
toGradient
Long Integer
String
The Gradient, index, or name at the end of the range. Can accept: Gradient, Long Integer or String.

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

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

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

ParameterTypeDescription
objGradientThe Gradient whose index comes before the desired Gradient.

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

ParameterTypeDescription
objGradientThe index of the Gradient that follows the desired Gradient.

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

Element of

Application.gradients

Document.gradients

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