ObjectStyle

An object style.

Methods:

addEventListener, duplicate, extractLabel, getElements, insertLabel, move, remove, removeEventListener, setDimensionAttributeState, setPositionAttributeState, toSource, toSpecifier

Objects:

AnchoredObjectSetting, ArrowHead, ArrowHeadAlignmentEnum, BaselineFrameGridOption, Boolean, ContentTransparencySetting, CornerOptions, EndCap, EndJoin, EventListeners, Events, FillTransparencySetting, FrameFittingOption, Number, Object, ObjectExportOption, ObjectStyle, ObjectStyleContentEffectsCategorySettings, ObjectStyleExportTagMaps, ObjectStyleFillEffectsCategorySettings, ObjectStyleObjectEffectsCategorySettings, ObjectStyleStrokeEffectsCategorySettings, ParagraphStyle, Preferences, StoryPreference, String, StrokeAlignment, StrokeStyle, StrokeTransparencySetting, Swatch, TextFramePreference, TextWrapPreference, TransformAttributeOption, TransparencySetting,

Preferences:

BaselineFrameGridOption, Boolean, FrameFittingOption, ObjectExportOption, Preferences, StoryPreference, TextFramePreference, TextWrapPreference, TransformAttributeOption

Property Listing

Property

Type

Access

Description

anchoredObjectSettings

AnchoredObjectSetting

read/write

Anchored object settings.

appliedParagraphStyle

ParagraphStyle

String

read/write

The paragraph style applied to the text. Can also accept: String.

applyNextParagraphStyle

Boolean

read/write

If true, applies paragraph styles using Next Paragraph Style settings, beginning with the Next Paragraph Style defined in the paragraph style associated with the object style (if any).

arrowHeadAlignment

ArrowHeadAlignmentEnum

ArrowHeadAlignmentEnum.INSIDE_PATH

ArrowHeadAlignmentEnum.OUTSIDE_PATH

read/write

The arrowhead alignment applied to the ObjectStyle.

basedOn

ObjectStyle

String

read/write

The style that this style is based on. Can return: ObjectStyle or String.

baselineFrameGridOptions

BaselineFrameGridOption

read/write

Baseline frame grid option settings.

bottomLeftCornerOption

CornerOptions

CornerOptions.BEVEL_CORNER

CornerOptions.FANCY_CORNER

CornerOptions.INSET_CORNER

CornerOptions.INVERSE_ROUNDED_CORNER

CornerOptions.NONE

CornerOptions.ROUNDED_CORNER

read/write

The shape to apply to the bottom left corner of rectangular shapes.

bottomLeftCornerRadius

Number

String

read/write

The radius in measurement units of the corner effect applied to the bottom left corner of rectangular shapes

bottomRightCornerOption

CornerOptions

CornerOptions.BEVEL_CORNER

CornerOptions.FANCY_CORNER

CornerOptions.INSET_CORNER

CornerOptions.INVERSE_ROUNDED_CORNER

CornerOptions.NONE

CornerOptions.ROUNDED_CORNER

read/write

The shape to apply to the bottom right corner of rectangular shapes.

bottomRightCornerRadius

Number

String

read/write

The radius in measurement units of the corner effect applied to the bottom right corner of rectangular shapes

contentEffectsEnablingSettings

ObjectStyleContentEffectsCategorySettings

readonly

The content effects enabling settings.

contentTransparencySettings

ContentTransparencySetting

readonly

Transparency settings for the content of the ObjectStyle.

emitCss

Boolean

read/write

Emit CSS

enableAnchoredObjectOptions

Boolean

read/write

If true, the object style will apply an anchored object setting.

enableExportTagging

Boolean

read/write

If true, the object style will apply an epub tag and class.

enableFill

Boolean

read/write

If true, the object style will apply a fill.

enableFrameFittingOptions

Boolean

read/write

If true, the object style will apply frame fitting options.

enableObjectExportAltTextOptions

Boolean

read/write

If true, the object style will apply alt text export options.

enableObjectExportEpubOptions

Boolean

read/write

If true, the object style will apply epub export options.

enableObjectExportTaggedPdfOptions

Boolean

read/write

If true, the object style will apply tagged pdf export options.

enableParagraphStyle

Boolean

read/write

If true, the object style will apply a paragraph style.

enableStoryOptions

Boolean

read/write

If true, the object style will apply story options.

enableStroke

Boolean

read/write

If true, the object style will apply a stroke.

enableStrokeAndCornerOptions

Boolean

read/write

If true, the object style will apply stroke options and corner options.

enableTextFrameAutoSizingOptions

Boolean

read/write

If true, the object style will apply auto-sizing text frame options.

enableTextFrameBaselineOptions

Boolean

read/write

If true, the object style will apply baseline text frame options.

enableTextFrameColumnRuleOptions

Boolean

read/write

Enable the text frame column rule options category of object style

enableTextFrameFootnoteOptions

Boolean

read/write

Enable the text frame footnote options category of object style

enableTextFrameGeneralOptions

Boolean

read/write

If true, the object style will apply general text frame options.

enableTextWrapAndOthers

Boolean

read/write

If true, the object style will apply text wrap, contour, and non-printing settings.

enableTransformAttributes

Boolean

read/write

If true, enables the Dimension and Position attributes

endCap

EndCap

EndCap.BUTT_END_CAP

EndCap.PROJECTING_END_CAP

EndCap.ROUND_END_CAP

read/write

The end shape of an open path.

endJoin

EndJoin

EndJoin.BEVEL_END_JOIN

EndJoin.MITER_END_JOIN

EndJoin.ROUND_END_JOIN

read/write

The corner join applied to the ObjectStyle.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

fillColor

Swatch

String

read/write

The swatch (color, gradient, tint, or mixed ink) applied to the fill of the ObjectStyle. . Can also accept: String.

fillEffectsEnablingSettings

ObjectStyleFillEffectsCategorySettings

readonly

The fill effects enabling settings.

fillTint

Number (range 0 - 100)

read/write

The percent of tint to use in the ObjectStyle's fill color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.)

fillTransparencySettings

FillTransparencySetting

readonly

Transparency settings for the fill applied to the ObjectStyle.

frameFittingOptions

FrameFittingOption

read/write

The frame fitting option to apply to placed or pasted content. Can be applied to a frame, object style, or document or to the application.

gapColor

Swatch

read/write

The swatch (color, gradient, tint, or mixed ink) applied to the gap of a dashed, dotted, or striped stroke. For information, see stroke type.

gapTint

Number (range 0 - 100)

read/write

The tint as a percentage of the gap color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.)

gradientFillAngle

Number

read/write

The angle of a linear gradient applied to the fill of the ObjectStyle. (Range: -180 to 180)

gradientStrokeAngle

Number

read/write

The angle of a linear gradient applied to the stroke of the ObjectStyle. (Range: -180 to 180)

id

Number

readonly

The unique ID of the ObjectStyle.

includeClass

Boolean

read/write

If true, class attribute will be generated for the style

index

Number

readonly

The index of the ObjectStyle within its containing object.

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.

leftArrowHeadScale

Number (range 1 - 1000)

read/write

The scaling applied to the arrowhead at the start of the path. (Range: 1 to 1000)

leftLineEnd

ArrowHead

ArrowHead.BARBED_ARROW_HEAD

ArrowHead.BAR_ARROW_HEAD

ArrowHead.CIRCLE_ARROW_HEAD

ArrowHead.CIRCLE_SOLID_ARROW_HEAD

ArrowHead.CURVED_ARROW_HEAD

ArrowHead.NONE

ArrowHead.SIMPLE_ARROW_HEAD

ArrowHead.SIMPLE_WIDE_ARROW_HEAD

ArrowHead.SQUARE_ARROW_HEAD

ArrowHead.SQUARE_SOLID_ARROW_HEAD

ArrowHead.TRIANGLE_ARROW_HEAD

ArrowHead.TRIANGLE_WIDE_ARROW_HEAD

read/write

The arrowhead applied to the start of the path.

miterLimit

Number (range 1 - 500)

read/write

The limit of the ratio of stroke width to miter length before a miter (pointed) join becomes a bevel (squared-off) join.

name

String

read/write

The name of the ObjectStyle.

nonprinting

Boolean

read/write

If true, the ObjectStyle does not print.

objectEffectsEnablingSettings

ObjectStyleObjectEffectsCategorySettings

readonly

The object effects enabling settings.

objectExportOptions

ObjectExportOption

readonly

Export options for the object

objectStyleExportTagMaps

ObjectStyleExportTagMaps ObjectStyleExportTagMap

readonly

A collection of object style export tag maps.

overprintFill

Boolean

read/write

If true, the ObjectStyle's fill color overprints any underlying objects. If false, the fill color knocks out the underlying colors.

overprintGap

Boolean

read/write

If true, the gap color overprints any underlying colors. If false, the gap color knocks out the underlying colors.

overprintStroke

Boolean

read/write

If true, the ObjectStyle's stroke color overprints any underlying objects. If false, the stroke color knocks out the underlying colors.

parent

Application

Document

ObjectStyleGroup

readonly

The parent of the ObjectStyle (a Document, Application or ObjectStyleGroup).

preferences

Preferences Preference

readonly

A collection of preferences objects.

properties

Object

read/write

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

rightArrowHeadScale

Number (range 1 - 1000)

read/write

The scaling applied to the arrowhead at the end of the path. (Range: 1 to 1000)

rightLineEnd

ArrowHead

ArrowHead.BARBED_ARROW_HEAD

ArrowHead.BAR_ARROW_HEAD

ArrowHead.CIRCLE_ARROW_HEAD

ArrowHead.CIRCLE_SOLID_ARROW_HEAD

ArrowHead.CURVED_ARROW_HEAD

ArrowHead.NONE

ArrowHead.SIMPLE_ARROW_HEAD

ArrowHead.SIMPLE_WIDE_ARROW_HEAD

ArrowHead.SQUARE_ARROW_HEAD

ArrowHead.SQUARE_SOLID_ARROW_HEAD

ArrowHead.TRIANGLE_ARROW_HEAD

ArrowHead.TRIANGLE_WIDE_ARROW_HEAD

read/write

The arrowhead applied to the end of the path.

storyPreferences

StoryPreference

read/write

Story preference settings.

strokeAlignment

StrokeAlignment

StrokeAlignment.CENTER_ALIGNMENT

StrokeAlignment.INSIDE_ALIGNMENT

StrokeAlignment.OUTSIDE_ALIGNMENT

read/write

The stroke alignment applied to the ObjectStyle.

strokeColor

Swatch

String

read/write

The swatch (color, gradient, tint, or mixed ink) applied to the stroke of the ObjectStyle. Can also accept: String.

strokeEffectsEnablingSettings

ObjectStyleStrokeEffectsCategorySettings

readonly

The stroke effects enabling settings.

strokeTint

Number (range 0 - 100)

read/write

The percent of tint to use in object's stroke color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.)

strokeTransparencySettings

StrokeTransparencySetting

readonly

Transparency settings for the stroke.

strokeType

StrokeStyle

String

read/write

The name of the stroke style to apply. Can also accept: String.

strokeWeight

Number

String

read/write

The weight (in points) to apply to the ObjectStyle's stroke.

textFramePreferences

TextFramePreference

read/write

Text frame preference settings.

textWrapPreferences

TextWrapPreference

read/write

The text wrap preference properties that define the default formatting for wrapping text around objects.

topLeftCornerOption

CornerOptions

CornerOptions.BEVEL_CORNER

CornerOptions.FANCY_CORNER

CornerOptions.INSET_CORNER

CornerOptions.INVERSE_ROUNDED_CORNER

CornerOptions.NONE

CornerOptions.ROUNDED_CORNER

read/write

The shape to be applied to the top left corner of rectangular shapes and all corners of non-rectangular shapes.Note: corner option differs from end join in which you can set a radius for a corner option, whereas the rounded or beveled effect of an end join depends on the stroke weight.

topLeftCornerRadius

Number

String

read/write

The radius in measurement units of the corner effect applied to the top left corner of rectangular shapes and all corners of non-rectangular shapes

topRightCornerOption

CornerOptions

CornerOptions.BEVEL_CORNER

CornerOptions.FANCY_CORNER

CornerOptions.INSET_CORNER

CornerOptions.INVERSE_ROUNDED_CORNER

CornerOptions.NONE

CornerOptions.ROUNDED_CORNER

read/write

The shape to apply to the top right corner of rectangular shapes

topRightCornerRadius

Number

String

read/write

The radius in measurement units of the corner effect applied to the top right corner of rectangular shapes

transformAttributeOptions

TransformAttributeOption

read/write

The layout attribute options to apply to any page item.

transparencySettings

TransparencySetting

readonly

Transparency settings.

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)

ObjectStyle duplicate ()

Duplicates the ObjectStyle.

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

ObjectStyle getElements ()

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

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.

ObjectStyle move (to:LocationOptions, reference:Varies Document ObjectStyle ObjectStyleGroup Application)

Moves the ObjectStyle to the specified location.

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

The new location relative to the reference object or within the container object.

reference

Document

ObjectStyle

ObjectStyleGroup

Application

The reference object. Note: Required when the to parameter is before or after. Can accept: ObjectStyle, ObjectStyleGroup, Document or Application. (Optional)

undefined remove (replacingWith:ObjectStyle)

Deletes the style.

Parameter

Type

Description

replacingWith

ObjectStyle

The style to apply in place of the deleted style. (Optional)

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)

Boolean setDimensionAttributeState (whichAttributes:DimensionAttributes, attributeState:Boolean)

Sets the given dimension attribute state to enabled or disabled state

Parameter

Type

Description

whichAttributes

DimensionAttributes

DimensionAttributes.BOTH_HEIGHT_WIDTH_ATTRIBUTE

DimensionAttributes.HEIGHT_ATTRIBUTE

DimensionAttributes.WIDTH_ATTRIBUTE

Which dimension attributes do you want to enable or disable.

attributeState

Boolean

Attribute state to be set, set true to enable and false to disable the attributes

Boolean setPositionAttributeState (whichAttributes:PositionAttributes, attributeState:Boolean)

Sets the given position attribute state to enabled or disabled state

Parameter

Type

Description

whichAttributes

PositionAttributes

PositionAttributes.BOTH_X_Y_ATTRIBUTE

PositionAttributes.X_ATTRIBUTE

PositionAttributes.Y_ATTRIBUTE

Which position attributes do you want to enable or disable.

attributeState

Boolean

Attribute state to be set, set true to enable and false to disable the attributes

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.