Adobe InCopy CS5 (7.0) Object Model JS: Layer

InCopy CS5

Class

Layer

 A layer.

QuickLinks

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

Hierarchy

Document
Layer
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
allGraphics Array of Graphic readonlyLists all graphics contained by the Layer.
allPageItems Array of PageItem readonlyLists all page items contained by the Layer.
buttonsButtons readonlyA collection of buttons.
epstextsEPSTexts readonlyEPSTexts
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
formFieldsFormFields readonlyA collection of form fields.
graphicLinesGraphicLines readonlyA collection of graphic lines.
groupsGroups readonlyA collection of groups.
guidesGuides readonlyA collection of guides.
idnumber readonlyThe unique ID of the Layer.
ignoreWrapbool readonlyIf true, text wrap settings applied to objects on the layer will not affect text on other layers when the layer is hidden.
indexnumber readonlyThe index of the Layer 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.
layerColor3 Reals (0 - 255)
UIColors
readonlyThe color of the layer, specified either as an array of three doubles, each in the range 0 to 255 and representing R, G, and B values, or as a UI color. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator.
lockGuidesbool readonlyIf true, the guide positions on the layer are locked.
lockedbool readonlyIf true, the Layer is locked.
multiStateObjectsMultiStateObjects readonlyA collection of multi-state objects.
namestring readonlyThe name of the Layer.
ovalsOvals readonlyA collection of ellipses.
pageItemsPageItems readonlyThe page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.
parentDocument readonlyThe parent of the Layer (a Document).
polygonsPolygons readonlyA collection of polygons.
printablebool readonlyIf true, the layer will print.
propertiesObject r/wA property that allows setting of several properties at the same time.
rectanglesRectangles readonlyA collection of rectangles.
showGuidesbool readonlyIf true, guides are visible on the layer.
splineItemsSplineItems readonlyThe spline items collection.
textFramesTextFrames readonlyA collection of text frames.
visiblebool r/wIf true, the Layer 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 Layer 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.

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

string toSpecifier ()
Retrieves the object specifier.

Element of

Button.itemLayer

EPS.itemLayer

EPSText.itemLayer

FormField.itemLayer

Graphic.itemLayer

GraphicLine.itemLayer

Group.itemLayer

Guide.itemLayer

Image.itemLayer

ImportedPage.itemLayer

MediaItem.itemLayer

Movie.itemLayer

MultiStateObject.itemLayer

Oval.itemLayer

PDF.itemLayer

PICT.itemLayer

PageItem.itemLayer

Polygon.itemLayer

Rectangle.itemLayer

Sound.itemLayer

SplineItem.itemLayer

TextFrame.itemLayer

WMF.itemLayer

Used in:

Button Buttons.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: varies][, withProperties: Object])

Layer Layers.nextItem (obj: Layer)

Layer Layers.previousItem (obj: Layer)

Movie Movies.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: varies][, withProperties: Object])

MultiStateObject MultiStateObjects.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: varies][, withProperties: Object])

Sound Sounds.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: varies][, withProperties: Object])

Return

Array of Layer Layer.getElements ()

Layer Layers.[] (index: number)

Layer Layers.anyItem ()

Array of Layer Layers.everyItem ()

Layer Layers.firstItem ()

Layer Layers.item (index: varies)

Layer Layers.itemByID (id: number)

Layer Layers.itemByName (name: string)

Array of Layer Layers.itemByRange (from: varies, to: varies)

Layer Layers.lastItem ()

Layer Layers.middleItem ()

Layer Layers.nextItem (obj: Layer)

Layer Layers.previousItem (obj: Layer)

Jongware, 23-Mar-2011 v3.0.3dContents :: Index