Adobe InDesign CS6 Server (8.0) Object Model JS: State

InDesign Server CS6

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 | CheckBox | MultiStateObject | RadioButton
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 EPS readonlyA collection of EPS files.
epstextsEPSTexts EPSText readonlyEPSTexts
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
graphicLinesGraphicLines GraphicLine readonlyA collection of graphic lines.
graphicsGraphics Graphic readonlyA collection of imported graphics in any graphic file format (vector, metafile, or bitmap).
groupsGroups Group readonlyA collection of groups.
idnumber readonlyThe unique ID of the State.
imagesImages Image 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 Oval readonlyA collection of ellipses.
pageItemsPageItems PageItem 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.
parentButtonCheckBox
MultiStateObject
RadioButton
readonlyThe parent of the State (a Button, MultiStateObject, CheckBox or RadioButton).
pdfsPDFs PDF readonlyA collection of PDF files.
pictsPICTs PICT readonlyA collection of PICT graphics.
polygonsPolygons Polygon readonlyA collection of polygons.
propertiesObject r/wA property that allows setting of several properties at the same time.
rectanglesRectangles Rectangle readonlyA collection of rectangles.
splineItemsSplineItems SplineItem 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 TextFrame readonlyA collection of text frames.
wmfsWMFs WMF 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
pageitemsArray 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, 28-Apr-2012 v3.0.3iContents :: Index