ViewPreference

View preferences.

Methods:

addEventListener, getElements, removeEventListener, toSource, toSpecifier

Objects:

Boolean, EventListeners, Events, MeasurementUnits, Number, Object, RulerOrigin, String

Hierarchy:

Superclass: Preference

Class: ViewPreference

Property Listing

Property

Type

Access

Description

cursorKeyIncrement

Number

String

read/write

The distance to move a specified object when an arrow key is pressed. (Range depends on the measurement unit. For points: 0.001 to 100; picas: 0p0.001 to 8p4; mm: 0 to 35.278; cm: 0 to 3.5278; inches: 0 to 1.3889; ciceros: 0c0.001 to 7c9.839)

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

guideSnaptoZone

Number (range 1 - 36)

read/write

The range (in pixels) within which an object snaps to guides. (Range: 1 to 36) Note: Snapping occurs only when guides are shown.

horizontalCustomPoints

Number (range 4 - 256)

read/write

The distance (in points) between major tick marks on the horizontal ruler. (Range: 4 to 256) Valid only when horizontal measurement units is custom.

horizontalMeasurementUnits

MeasurementUnits

MeasurementUnits.AGATES

MeasurementUnits.AMERICAN_POINTS

MeasurementUnits.BAI

MeasurementUnits.CENTIMETERS

MeasurementUnits.CICEROS

MeasurementUnits.CUSTOM

MeasurementUnits.HA

MeasurementUnits.INCHES

MeasurementUnits.INCHES_DECIMAL

MeasurementUnits.MILLIMETERS

MeasurementUnits.MILS

MeasurementUnits.PICAS

MeasurementUnits.PIXELS

MeasurementUnits.POINTS

MeasurementUnits.Q

MeasurementUnits.U

read/write

The measurement unit for the horizontal ruler and other horizontally-measured spaces such as grid columns, horizontal offsets, column gutters, or others.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

parent

Application

Document

readonly

The parent of the ViewPreference (a Application or Document).

pointsPerInch

Number (range 60 - 80)

read/write

The number of points per inch, typically 72. (Range: 60 to 80)

printDialogMeasurementUnits

MeasurementUnits

MeasurementUnits.AGATES

MeasurementUnits.AMERICAN_POINTS

MeasurementUnits.BAI

MeasurementUnits.CENTIMETERS

MeasurementUnits.CICEROS

MeasurementUnits.CUSTOM

MeasurementUnits.HA

MeasurementUnits.INCHES

MeasurementUnits.INCHES_DECIMAL

MeasurementUnits.MILLIMETERS

MeasurementUnits.MILS

MeasurementUnits.PICAS

MeasurementUnits.PIXELS

MeasurementUnits.POINTS

MeasurementUnits.Q

MeasurementUnits.U

read/write

The measurement unit for the print dialog.

properties

Object

read/write

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

rulerOrigin

RulerOrigin

RulerOrigin.PAGE_ORIGIN

RulerOrigin.SPINE_ORIGIN

RulerOrigin.SPREAD_ORIGIN

read/write

The default zero point at the intersection of the vertical and horizontal rulers and the scope of the horizontal ruler.

showFrameEdges

Boolean

read/write

If true, displays borders of unselected frames and the diagonal lines in empty unselected frames.

showNotes

Boolean

read/write

If true, notes are displayed.

showRulers

Boolean

read/write

If true, displays the horizontal and vertical rulers.

strokeMeasurementUnits

MeasurementUnits

MeasurementUnits.AGATES

MeasurementUnits.AMERICAN_POINTS

MeasurementUnits.BAI

MeasurementUnits.CENTIMETERS

MeasurementUnits.CICEROS

MeasurementUnits.CUSTOM

MeasurementUnits.HA

MeasurementUnits.INCHES

MeasurementUnits.INCHES_DECIMAL

MeasurementUnits.MILLIMETERS

MeasurementUnits.MILS

MeasurementUnits.PICAS

MeasurementUnits.PIXELS

MeasurementUnits.POINTS

MeasurementUnits.Q

MeasurementUnits.U

read/write

The measurement unit for stroke measurements.

textSizeMeasurementUnits

MeasurementUnits

MeasurementUnits.AGATES

MeasurementUnits.AMERICAN_POINTS

MeasurementUnits.BAI

MeasurementUnits.CENTIMETERS

MeasurementUnits.CICEROS

MeasurementUnits.CUSTOM

MeasurementUnits.HA

MeasurementUnits.INCHES

MeasurementUnits.INCHES_DECIMAL

MeasurementUnits.MILLIMETERS

MeasurementUnits.MILS

MeasurementUnits.PICAS

MeasurementUnits.PIXELS

MeasurementUnits.POINTS

MeasurementUnits.Q

MeasurementUnits.U

read/write

The measurement unit for text size measurements.

typographicMeasurementUnits

MeasurementUnits

MeasurementUnits.AGATES

MeasurementUnits.AMERICAN_POINTS

MeasurementUnits.BAI

MeasurementUnits.CENTIMETERS

MeasurementUnits.CICEROS

MeasurementUnits.CUSTOM

MeasurementUnits.HA

MeasurementUnits.INCHES

MeasurementUnits.INCHES_DECIMAL

MeasurementUnits.MILLIMETERS

MeasurementUnits.MILS

MeasurementUnits.PICAS

MeasurementUnits.PIXELS

MeasurementUnits.POINTS

MeasurementUnits.Q

MeasurementUnits.U

read/write

The measurement units for typography.

verticalCustomPoints

Number (range 4 - 256)

read/write

The distance (in points) between major tick marks on the vertical ruler. (Range: 4 to 256) Valid only when vertical measurement units is custom.

verticalMeasurementUnits

MeasurementUnits

MeasurementUnits.AGATES

MeasurementUnits.AMERICAN_POINTS

MeasurementUnits.BAI

MeasurementUnits.CENTIMETERS

MeasurementUnits.CICEROS

MeasurementUnits.CUSTOM

MeasurementUnits.HA

MeasurementUnits.INCHES

MeasurementUnits.INCHES_DECIMAL

MeasurementUnits.MILLIMETERS

MeasurementUnits.MILS

MeasurementUnits.PICAS

MeasurementUnits.PIXELS

MeasurementUnits.POINTS

MeasurementUnits.Q

MeasurementUnits.U

read/write

The measurement unit for the vertical ruler and other vertically-measured spaces such as grid rows, vertical offsets, row heights, or others.

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)

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

String toSpecifier ()

Retrieves the object specifier.

Object of

Event.parent

EventListener.parent

MutationEvent.parent

Application.viewPreferences

Document.viewPreferences

Return

ViewPreference.getElements()