Instance Properties
Name | Description | Access |
---|---|---|
allGraphics | Graphic Lists all graphics contained by the Layer. | read-only |
allPageItems | PageItem Lists all page items contained by the Layer. | read-only |
buttons | Buttons A collection of buttons. | read-only |
checkBoxes | CheckBoxes A collection of checkboxes. | read-only |
comboBoxes | ComboBoxes A collection of comboboxes. | read-only |
endnoteTextFrames | EndnoteTextFrames A collection of endnote text frames. | read-only |
epstexts | EPSTexts EPSTexts | read-only |
eventListeners | EventListeners A collection of event listeners. | read-only |
events | Events A collection of events. | read-only |
formFields | FormFields A collection of form fields. | read-only |
graphicLines | GraphicLines A collection of graphic lines. | read-only |
groups | Groups A collection of groups. | read-only |
guides | Guides A collection of guides. | read-only |
id | number The unique ID of the Layer. | read-only |
ignoreWrap | bool If true, text wrap settings applied to objects on the layer will not affect text on other layers when the layer is hidden. | read-write |
index | number The index of the Layer within its containing object. | read-only |
isValid | bool Returns true if the object specifier resolves to valid objects. | read-only |
label | string A property that can be set to any string. | read-write |
layerColor | 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. | read-write |
listBoxes | ListBoxes A collection of listboxes. | read-only |
lockGuides | bool If true, the guide positions on the layer are locked. | read-write |
locked | bool If true, the Layer is locked. | read-write |
multiStateObjects | MultiStateObjects A collection of multi-state objects. | read-only |
name | string The name of the Layer. | read-write |
ovals | Ovals A collection of ellipses. | read-only |
pageItems | PageItems 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. | read-only |
parent | Document The parent of the Layer (a Document). | read-only |
polygons | Polygons A collection of polygons. | read-only |
printable | bool If true, the layer will print. | read-write |
properties | Object A property that allows setting of several properties at the same time. | read-write |
radioButtons | RadioButtons A collection of radio buttons. | read-only |
rectangles | Rectangles A collection of rectangles. | read-only |
showGuides | bool If true, guides are visible on the layer. | read-write |
signatureFields | SignatureFields A collection of signature fields. | read-only |
splineItems | SplineItems The spline items collection. | read-only |
textBoxes | TextBoxes A collection of text boxes. | read-only |
textFrames | TextFrames A collection of text frames. | read-only |
visible | bool If true, the Layer is visible. | read-write |
Methods
addEventListener( | eventType, handler [, captures]) |
→ EventListener |
extractLabel( | key) |
→ string |
getElements( | ) |
→ Layer |
insertLabel( | key, value) |
remove( | ) |
removeEventListener( | eventType, handler [, captures]) |
→ bool |
toSource( | ) |
→ string |
toSpecifier( | ) |
→ string |
-
addEventListener( eventType, handler [, captures=false])→ EventListener -
Adds an event listener.
eventType
string The event type. handler
The event handler. Can accept: File or JavaScript Function. captures
bool This parameter is obsolete. (Optional) -
duplicate( )→ Layer -
Duplicates the Layer.
-
extractLabel( key)→ string -
Gets the label value associated with the specified key.
key
string The key. -
getElements( )→ Layer -
Resolves the object specifier, creating an array of object references.
-
insertLabel( key, value) -
Sets the label to the value associated with the specified key.
key
string The key. value
string The value. -
merge( with)→ Layer -
Merges the layer with other layer(s).
with
Array<Layer> The layer(s) with which to merge. -
move( to [, reference])→ Layer -
Moves the Layer to the specified location.
to
LocationOptions 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) -
remove( ) -
Deletes the Layer.
-
removeEventListener( eventType, handler [, captures=false])→ bool -
Removes the event listener.
eventType
string The registered event type. handler
The registered event handler. Can accept: File or JavaScript Function. captures
bool This parameter is obsolete. (Optional) -
toSource( )→ string -
Generates a string which, if executed, will return the Layer.
-
toSpecifier( )→ string -
Retrieves the object specifier.