Adobe InDesign CS5 (7.0) Object Model JS: NamedGrid

InDesign CS5

Class

NamedGrid

 A named grid.

QuickLinks

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

Hierarchy

Application | Document
NamedGrid
Event | EventListener | GridDataInformation | MutationEvent | Preference

Properties

PropertyTypeAccessDescription
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
gridDataGridDataInformation readonlyDefault grid properties. Note: Applies to named, layout, and frame (story) grids.
idnumber readonlyThe unique ID of the NamedGrid.
indexnumber readonlyThe index of the NamedGrid within its containing object.
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 NamedGrid.
parentApplicationDocument readonlyThe parent of the NamedGrid (a Document or Application).
preferencesPreferences readonlyA collection of preferences objects.
propertiesObject r/wA property that allows setting of several properties at the same time.

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 NamedGrid 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 ()
Deletes the NamedGrid.

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 NamedGrid.

string toSpecifier ()
Retrieves the object specifier.

Element of

GridDataInformation.parent

Story.appliedNamedGrid

TextDefault.appliedNamedGrid

XmlStory.appliedNamedGrid

Used in:

NamedGrid NamedGrids.nextItem (obj: NamedGrid)

NamedGrid NamedGrids.previousItem (obj: NamedGrid)

Return

Array of NamedGrid NamedGrid.getElements ()

NamedGrid NamedGrids.[] (index: number)

NamedGrid NamedGrids.add ([withProperties: Object])

NamedGrid NamedGrids.anyItem ()

Array of NamedGrid NamedGrids.everyItem ()

NamedGrid NamedGrids.firstItem ()

NamedGrid NamedGrids.item (index: varies)

NamedGrid NamedGrids.itemByID (id: number)

NamedGrid NamedGrids.itemByName (name: string)

Array of NamedGrid NamedGrids.itemByRange (from: varies, to: varies)

NamedGrid NamedGrids.lastItem ()

NamedGrid NamedGrids.middleItem ()

NamedGrid NamedGrids.nextItem (obj: NamedGrid)

NamedGrid NamedGrids.previousItem (obj: NamedGrid)

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