Adobe InCopy CS5.5 (7.5) Object Model JS: Layer

InCopy CS5.5

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 Button readonlyA collection of buttons.
epstextsEPSTexts EPSText readonlyEPSTexts
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
formFieldsFormFields FormField readonlyA collection of form fields.
graphicLinesGraphicLines GraphicLine readonlyA collection of graphic lines.
groupsGroups Group readonlyA collection of groups.
guidesGuides Guide 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 MultiStateObject readonlyA collection of multi-state objects.
namestring readonlyThe name of the Layer.
ovalsOvals Oval readonlyA collection of ellipses.
pageItemsPageItems PageItem 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 Polygon 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 Rectangle readonlyA collection of rectangles.
showGuidesbool readonlyIf true, guides are visible on the layer.
splineItemsSplineItems SplineItem readonlyThe spline items collection.
textFramesTextFrames TextFrame 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, 29-Apr-2012 v3.0.3iContents :: Index