Adobe InDesign CS5 Server (7.0) Object Model JS: State

InDesign Server CS5

Class

State

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

QuickLinks

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

Hierarchy

Button | MultiStateObject
State
EPS | EPSText | Event | EventListener | Graphic | GraphicLine | Group | Image | MutationEvent | Oval | PDF | PICT | PageItem | Polygon | Rectangle | SplineItem | TextFrame | WMF

Properties

PropertyTypeAccessDescription
activebool r/wIf true, the state is active in the exported PDF.
enabledbool r/wIf true, the state is enabled in PDF documents.
epssEPSs readonlyA collection of EPS files.
epstextsEPSTexts readonlyEPSTexts
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
graphicLinesGraphicLines readonlyA collection of graphic lines.
graphicsGraphics readonlyA collection of imported graphics in any graphic file format (vector, metafile, or bitmap).
groupsGroups readonlyA collection of groups.
idnumber readonlyThe unique ID of the State.
imagesImages readonlyA collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).
indexnumber readonlyThe index of the State within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
namestring r/wThe name of the State.
ovalsOvals readonlyA collection of ellipses.
pageItemsPageItems 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.
parentButtonMultiStateObject readonlyThe parent of the State (a Button or MultiStateObject).
pdfsPDFs readonlyA collection of PDF files.
pictsPICTs readonlyA collection of PICT graphics.
polygonsPolygons readonlyA collection of polygons.
propertiesObject r/wA property that allows setting of several properties at the same time.
rectanglesRectangles readonlyA collection of rectangles.
splineItemsSplineItems readonlyThe spline items collection.
statetypeLong Integer
StateTypes
r/wFor 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.
textFramesTextFrames readonlyA collection of text frames.
wmfsWMFs readonlyA collection of WMF graphics.

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)

void addItemsToState (pageitems: Array of PageItem)
Adds page items to this state.

ParameterTypeDescription
pageitems Array of PageItemOne or more page items to add to this state.

Array of State getElements ()
Resolves the object specifier, creating an array of object references.

void move (newPosition: number)
Moves the state to a new position in its parent collection.

ParameterTypeDescription
newPositionnumberthe index to move the state to in its parent collection

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

void remove ()
Deletes the State.

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

string toSpecifier ()
Retrieves the object specifier.

Element of

EPS.parent

Graphic.parent

Image.parent

PDF.parent

PICT.parent

WMF.parent

Used in:

State States.nextItem (obj: State)

State States.previousItem (obj: State)

Return

Array of State State.getElements ()

State States.[] (index: number)

State States.add ([withProperties: Object])

State States.anyItem ()

Array of State States.everyItem ()

State States.firstItem ()

State States.item (index: varies)

State States.itemByID (id: number)

State States.itemByName (name: string)

Array of State States.itemByRange (from: varies, to: varies)

State States.lastItem ()

State States.middleItem ()

State States.nextItem (obj: State)

State States.previousItem (obj: State)

Jongware, 23-Mar-2011 v3.0.3dContents :: Index