GraphicLayer

A layer in a PSD image or PDF file.

Methods:

addEventListener, getElements, removeEventListener, toSource, toSpecifier

Objects:

Boolean, EventListeners, Events, GraphicLayers, Number, Object, String

Property Listing

Property

Type

Access

Description

adjustmentLayer

Boolean

readonly

If true, the layer is an adjustment layer. Note: Must occur in the script before overriding the visibility state of the layer with a current visibility statement.

currentVisibility

Boolean

read/write

If true, the layer is visible in the document.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

exportState

Boolean

readonly

If true, the export state is on.

fxLayer

Boolean

readonly

If true, layer effects have been applied to the layer. Note: Must occur in the script before overriding the visibility state of the layer with a current visibility statement.

graphicLayers

GraphicLayers GraphicLayer

readonly

A collection of graphic layers.

hasExportState

Boolean

readonly

If true, the layer has an export state.

hasPrintState

Boolean

readonly

If true, the layer has a print state.

hasViewState

Boolean

readonly

If true, the layer has a view state.

id

Number

readonly

The unique ID of the GraphicLayer.

index

Number

readonly

The index of the GraphicLayer within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

locked

Boolean

readonly

If true, the GraphicLayer is locked.

name

String

readonly

The name of the GraphicLayer.

originalVisibility

Boolean

readonly

Returns the visibility setting set for the layer before the graphic file was imported. Note: Must occur in the script before overriding the visibility state with a current visibility statement.

parent

GraphicLayer

GraphicLayerOption

readonly

The parent of the GraphicLayer (a GraphicLayerOption or GraphicLayer).

printState

Boolean

readonly

If true, the print state is on.

properties

Object

read/write

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

sectionDividerLayer

Boolean

readonly

If true, the layer is a section divider layer.

separatorLayer

Boolean

readonly

If true, the layer is a separator layer.

viewState

Boolean

readonly

If true, the view state is on.

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)

GraphicLayer getElements ()

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

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

String toSpecifier ()

Retrieves the object specifier.

Object of

Event.parent

EventListener.parent

GraphicLayer.parent

MutationEvent.parent

Return

GraphicLayer.getElements()

GraphicLayers.anyItem()

GraphicLayers.everyItem()

GraphicLayers.nextItem()

GraphicLayers.previousItem()

GraphicLayers.itemByID()

GraphicLayers.item()

GraphicLayers.[]()

GraphicLayers.itemByName()

GraphicLayers.itemByRange()

GraphicLayers.firstItem()

GraphicLayers.lastItem()

GraphicLayers.middleItem()