Layer

A layer.

Methods:

addEventListener, duplicate, extractLabel, getElements, insertLabel, merge, move, remove, removeEventListener, toSource, toSpecifier

Objects:

Boolean, Buttons, CheckBoxes, ComboBoxes, EPSTexts, EndnoteTextFrames, EventListeners, Events, FormFields, Graphic, GraphicLines, Groups, Guides, ListBoxes, MultiStateObjects, Number, Object, Ovals, PageItem, PageItems, Polygons, RadioButtons, Rectangles, SignatureFields, SplineItems, String, TextBoxes, TextFrames, UIColors,

Property Listing

Property

Type

Access

Description

allGraphics

Array of Graphic

readonly

Lists all graphics contained by the Layer.

allPageItems

Array of PageItem

readonly

Lists all page items contained by the Layer.

buttons

Buttons Button

readonly

A collection of buttons.

checkBoxes

CheckBoxes

readonly

A collection of checkboxes.

comboBoxes

ComboBoxes

readonly

A collection of comboboxes.

endnoteTextFrames

EndnoteTextFrames EndnoteTextFrame

readonly

A collection of endnote text frames.

epstexts

EPSTexts EPSText

readonly

EPSTexts

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

formFields

FormFields FormField

readonly

A collection of form fields.

graphicLines

GraphicLines GraphicLine

readonly

A collection of graphic lines.

groups

Groups Group

readonly

A collection of groups.

guides

Guides Guide

readonly

A collection of guides.

id

Number

readonly

The unique ID of the Layer.

ignoreWrap

Boolean

read/write

If true, text wrap settings applied to objects on the layer will not affect text on other layers when the layer is hidden.

index

Number

readonly

The index of the Layer within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

layerColor

Array of 3 Reals (0 - 255)

UIColors

read/write

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

listBoxes

ListBoxes

readonly

A collection of listboxes.

lockGuides

Boolean

read/write

If true, the guide positions on the layer are locked.

locked

Boolean

read/write

If true, the Layer is locked.

multiStateObjects

MultiStateObjects MultiStateObject

readonly

A collection of multi-state objects.

name

String

read/write

The name of the Layer.

ovals

Ovals Oval

readonly

A collection of ellipses.

pageItems

PageItems PageItem

readonly

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

parent

Document

readonly

The parent of the Layer (a Document).

polygons

Polygons Polygon

readonly

A collection of polygons.

printable

Boolean

read/write

If true, the layer will print.

properties

Object

read/write

A property that allows setting of several properties at the same time.

radioButtons

RadioButtons RadioButton

readonly

A collection of radio buttons.

rectangles

Rectangles Rectangle

readonly

A collection of rectangles.

showGuides

Boolean

read/write

If true, guides are visible on the layer.

signatureFields

SignatureFields SignatureField

readonly

A collection of signature fields.

splineItems

SplineItems SplineItem

readonly

The spline items collection.

textBoxes

TextBoxes

readonly

A collection of text boxes.

textFrames

TextFrames TextFrame

readonly

A collection of text frames.

visible

Boolean

read/write

If true, the Layer is visible.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

Layer duplicate ()

Duplicates the Layer.

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

Layer getElements ()

Resolves the object specifier, creating an array of object references.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

Layer merge (with:Array of Layer)

Merges the layer with other layer(s).

Parameter

Type

Description

with

Array of Layer

The layer(s) with which to merge.

Layer move (to:LocationOptions, reference:Layer)

Moves the Layer to the specified location.

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

The location relative to the reference object or within the containing object.

reference

Layer

The reference object. Note: Required when the to value specifies before or after. (Optional)

undefined remove ()

Deletes the Layer.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String toSource ()

Generates a string which, if executed, will return the Layer.

String toSpecifier ()

Retrieves the object specifier.

Object of

TypefiElementVariantDefinition.floatingLayer

Document.activeLayer

LayoutWindow.activeLayer

Button.itemLayer

CheckBox.itemLayer

ComboBox.itemLayer

EPS.itemLayer

EPSText.itemLayer

EndnoteTextFrame.itemLayer

FormField.itemLayer

Graphic.itemLayer

GraphicLine.itemLayer

Group.itemLayer

Guide.itemLayer

HtmlItem.itemLayer

Image.itemLayer

ImportedPage.itemLayer

ListBox.itemLayer

MediaItem.itemLayer

Movie.itemLayer

MultiStateObject.itemLayer

Oval.itemLayer

PDF.itemLayer

PICT.itemLayer

PageItem.itemLayer

Polygon.itemLayer

RadioButton.itemLayer

Rectangle.itemLayer

SignatureField.itemLayer

Sound.itemLayer

SplineItem.itemLayer

TextBox.itemLayer

TextFrame.itemLayer

WMF.itemLayer

Event.parent

EventListener.parent

MutationEvent.parent

Return

Layers.add()

Layer.duplicate()

Layer.merge()

Layer.move()

Layer.getElements()

Layers.anyItem()

Layers.everyItem()

Layers.nextItem()

Layers.previousItem()

Layers.itemByID()

Layers.item()

Layers.[]()

Layers.itemByName()

Layers.itemByRange()

Layers.firstItem()

Layers.lastItem()

Layers.middleItem()