TypefiElementAnchor

Typefi element anchor

Methods:

addEventListener, associatedPageItems, createAssociation, extractLabel, getElements, getFieldValue, insertLabel, removeAssociation, removeEventListener, setField, toSource, toSpecifier

Objects:

Boolean, EventListeners, Events, Number, Object, PageItem, String, TypefiAnchorType, TypefiElementInstance,

Property Listing

Property

Type

Access

Description

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

externalId

String

readonly

An optional external id string

id

Number

readonly

The unique ID of the TypefiElementAnchor.

index

Number

readonly

The index of the TypefiElementAnchor within its containing object.

instance

TypefiElementInstance

readonly

A reference to a Typefi element instance

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

name

String

read/write

The name of the TypefiElementAnchor; this is an alias to the TypefiElementAnchor's label property.

pageItem

PageItem

readonly

A reference to the anchor page item

parent

Cell

Character

Column

EndnoteTextFrame

Footnote

InsertionPoint

Line

Page

Paragraph

Row

Spread

Story

Table

Text

TextColumn

TextFrame

TextStyleRange

Word

XmlStory

Document

HiddenText

readonly

The parent of the TypefiElementAnchor (a Document, TextFrame, EndnoteTextFrame, Story, XmlStory, Page, Spread, InsertionPoint, Text, TextStyleRange, Paragraph, TextColumn, Line, Word, Character, Cell, Table, Column, Row, Footnote or HiddenText).

properties

Object

read/write

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

type

TypefiAnchorType

TypefiAnchorType.ELEMENT

TypefiAnchorType.NONE

readonly

The anchor type

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)

PageItem associatedPageItems (includeHidden:Boolean)

Get the page items associated with the Typefi anchor object

Parameter

Type

Description

includeHidden

Boolean

Optionally include page items on hidden layers (Optional)

undefined createAssociation (element:Varies PageItem TypefiElementPageItem, [anchorPoint:AnchorPoint=AnchorPoint])

Create an association between this Typefi element anchor object and a Typefi element page item

Parameter

Type

Description

element

PageItem

TypefiElementPageItem

A page item or the Typefi element page item representation. Can accept: PageItem or TypefiElementPageItem.

anchorPoint

AnchorPoint

AnchorPoint.BOTTOM_CENTER_ANCHOR

AnchorPoint.BOTTOM_LEFT_ANCHOR

AnchorPoint.BOTTOM_RIGHT_ANCHOR

AnchorPoint.CENTER_ANCHOR

AnchorPoint.LEFT_CENTER_ANCHOR

AnchorPoint.RIGHT_CENTER_ANCHOR

AnchorPoint.TOP_CENTER_ANCHOR

AnchorPoint.TOP_LEFT_ANCHOR

AnchorPoint.TOP_RIGHT_ANCHOR

The optional anchor point to use in the element for the display of the line to the element anchor (Optional)

(default: AnchorPoint.CENTER_ANCHOR)

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

TypefiElementAnchor getElements ()

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

String getFieldValue (name:String)

Get the value of a field of TypefiElementAnchor

Parameter

Type

Description

name

String

The name of the field

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

undefined removeAssociation (element:Varies PageItem TypefiElementPageItem)

Remove the association between this Typefi element anchor object and a Typefi element page item

Parameter

Type

Description

element

PageItem

TypefiElementPageItem

A page item or the Typefi element page item representation. Can accept: PageItem or TypefiElementPageItem.

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)

undefined setField (name:String, [value:Varies String LongInteger=Varies String LongInteger])

Set the value of a field of TypefiElementAnchor

Parameter

Type

Description

name

String

The name of the field

value

String

LongInteger

The value of the field as string or as integer. The empty string will recompute the value of a counter field! If not specified, the field value will be reset. Can accept: String or Long Integer. (Optional)

(default: )

String toSource ()

Generates a string which, if executed, will return the TypefiElementAnchor.

String toSpecifier ()

Retrieves the object specifier.

Object of

TypefiPageItemSettings.anchor

TypefiElementPageItem.anchor

Event.parent

EventListener.parent

MutationEvent.parent

Return

TypefiPageItemSettings.createAnchor()

TypefiElementPageItem.createAnchor()

TypefiElementInstance.createAnchor()

TypefiDocumentSettings.createAnchor()

TypefiElementAnchor.getElements()

TypefiElementAnchors.anyItem()

TypefiElementAnchors.everyItem()

TypefiElementAnchors.nextItem()

TypefiElementAnchors.previousItem()

TypefiElementAnchors.itemByID()

TypefiElementAnchors.item()

TypefiElementAnchors.[]()

TypefiElementAnchors.itemByName()

TypefiElementAnchors.itemByRange()

TypefiElementAnchors.firstItem()

TypefiElementAnchors.lastItem()

TypefiElementAnchors.middleItem()