State

A state (states define the display of the field in an exported PDF).

Methods:

addEventListener, addItemsToState, getElements, move, releaseAsObject, remove, removeEventListener, toSource, toSpecifier

Objects:

Boolean, EPSTexts, EPSs, EndnoteTextFrames, EventListeners, Events, GraphicLines, Graphics, Groups, Images, Number, Object, Ovals, PDFs, PICTs, PageItems, Polygons, Rectangles, SVGs, SplineItems, StateTypes, String, TextFrames, WMFs

Property Listing

Property

Type

Access

Description

active

Boolean

read/write

If true, the state is active in the exported PDF.

enabled

Boolean

read/write

If true, the state is enabled in PDF documents.

endnoteTextFrames

EndnoteTextFrames EndnoteTextFrame

readonly

A collection of endnote text frames.

epss

EPSs EPS

readonly

A collection of EPS files.

epstexts

EPSTexts EPSText

readonly

EPSTexts

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

graphicLines

GraphicLines GraphicLine

readonly

A collection of graphic lines.

graphics

Graphics Graphic

readonly

A collection of imported graphics in any graphic file format (vector, metafile, or bitmap).

groups

Groups Group

readonly

A collection of groups.

id

Number

readonly

The unique ID of the State.

images

Images Image

readonly

A collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).

index

Number

readonly

The index of the State within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

name

String

read/write

The name of the State.

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

CheckBox

MultiStateObject

Button

RadioButton

readonly

The parent of the State (a Button, MultiStateObject, CheckBox or RadioButton).

pdfs

PDFs PDF

readonly

A collection of PDF files.

picts

PICTs PICT

readonly

A collection of PICT graphics.

polygons

Polygons Polygon

readonly

A collection of polygons.

properties

Object

read/write

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

rectangles

Rectangles Rectangle

readonly

A collection of rectangles.

splineItems

SplineItems SplineItem

readonly

The spline items collection.

statetype

StateTypes

StateTypes.DOWN

StateTypes.DOWN_OFF

StateTypes.DOWN_ON

StateTypes.ROLLOVER

StateTypes.ROLLOVER_OFF

StateTypes.ROLLOVER_ON

StateTypes.UP

StateTypes.UP_OFF

StateTypes.UP_ON

LongInteger

read/write

For a button, the type of user action that dictates the object's appearance. For a MultiStateObject, which has no user actions associated with states, this property is a numeric value uniquely identifying the state. Can return: StateTypes enumerator or Long Integer.

svgs

SVGs SVG

readonly

A collection of SVG files.

textFrames

TextFrames TextFrame

readonly

A collection of text frames.

wmfs

WMFs WMF

readonly

A collection of WMF graphics.

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)

undefined addItemsToState (pageitems:Array of PageItem)

Adds page items to this state.

Parameter

Type

Description

pageitems

Array of PageItem

One or more page items to add to this state.

State getElements ()

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

undefined move (newPosition:Number)

Moves the state to a new position in its parent collection.

Parameter

Type

Description

newPosition

Number

the index to move the state to in its parent collection

undefined releaseAsObject ()

Releases this state's appearance as a page item, removing the state from its parent object.

undefined remove ()

Deletes the State.

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

String toSpecifier ()

Retrieves the object specifier.

Object of

EPS.parent

EPSText.parent

EndnoteTextFrame.parent

Event.parent

EventListener.parent

Graphic.parent

GraphicLine.parent

Group.parent

Image.parent

MutationEvent.parent

Oval.parent

PDF.parent

PICT.parent

PageItem.parent

Polygon.parent

Rectangle.parent

SVG.parent

SplineItem.parent

TextFrame.parent

WMF.parent

Return

States.add()

State.getElements()

States.anyItem()

States.everyItem()

States.nextItem()

States.previousItem()

States.itemByID()

States.item()

States.[]()

States.itemByName()

States.itemByRange()

States.firstItem()

States.lastItem()

States.middleItem()