Adobe InDesign CS5.5 (7.5) Object Model JS: ObjectStyle

InDesign CS5.5

Class

ObjectStyle

 An object style.

QuickLinks

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

Hierarchy

Application | Document | ObjectStyleGroup
ObjectStyle
AnchoredObjectSetting | BaselineFrameGridOption | ContentTransparencySetting | Event | EventListener | FillTransparencySetting | FrameFittingOption | MutationEvent | ObjectStyleContentEffectsCategorySettings | ObjectStyleFillEffectsCategorySettings | ObjectStyleObjectEffectsCategorySettings | ObjectStyleStrokeEffectsCategorySettings | Preference | StoryPreference | StrokeTransparencySetting | TextFramePreference | TextWrapPreference | TransparencySetting

Properties

PropertyTypeAccessDescription
anchoredObjectSettingsAnchoredObjectSetting r/wAnchored object settings.
appliedParagraphStyleParagraphStyleString r/wThe paragraph style applied to the text. Can also accept: String.
applyNextParagraphStylebool r/wIf 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).
basedOnObjectStyle
String
r/wThe style that this style is based on. Can return: ObjectStyle or String.
baselineFrameGridOptionsBaselineFrameGridOption r/wBaseline frame grid option settings.
bottomLeftCornerOptionCornerOptions:
CornerOptions.NONE
CornerOptions.ROUNDED_CORNER
CornerOptions.INVERSE_ROUNDED_CORNER
CornerOptions.INSET_CORNER
CornerOptions.BEVEL_CORNER
CornerOptions.FANCY_CORNER
r/wThe shape to apply to the bottom left corner of rectangular shapes.
bottomLeftCornerRadiusMeasurement Unit (Number or String) r/wThe radius in measurement units of the corner effect applied to the bottom left corner of rectangular shapes
bottomRightCornerOptionCornerOptions:
CornerOptions.NONE
CornerOptions.ROUNDED_CORNER
CornerOptions.INVERSE_ROUNDED_CORNER
CornerOptions.INSET_CORNER
CornerOptions.BEVEL_CORNER
CornerOptions.FANCY_CORNER
r/wThe shape to apply to the bottom right corner of rectangular shapes.
bottomRightCornerRadiusMeasurement Unit (Number or String) r/wThe radius in measurement units of the corner effect applied to the bottom right corner of rectangular shapes
contentEffectsEnablingSettingsObjectStyleContentEffectsCategorySettings readonlyThe content effects enabling settings.
contentTransparencySettingsContentTransparencySetting readonlyTransparency settings for the content of the ObjectStyle.
enableAnchoredObjectOptionsbool r/wIf true, the object style will apply an anchored object setting.
enableFillbool r/wIf true, the object style will apply a fill.
enableFrameFittingOptionsbool r/wIf true, the object style will apply frame fitting options.
enableParagraphStylebool r/wIf true, the object style will apply a paragraph style.
enableStoryOptionsbool r/wIf true, the object style will apply story options.
enableStrokebool r/wIf true, the object style will apply a stroke.
enableStrokeAndCornerOptionsbool r/wIf true, the object style will apply stroke options and corner options.
enableTextFrameBaselineOptionsbool r/wIf true, the object style will apply baseline text frame options.
enableTextFrameGeneralOptionsbool r/wIf true, the object style will apply general text frame options.
enableTextWrapAndOthersbool r/wIf true, the object style will apply text wrap, contour, and non-printing settings.
endCapEndCap:
EndCap.BUTT_END_CAP
EndCap.ROUND_END_CAP
EndCap.PROJECTING_END_CAP
r/wThe end shape of an open path.
endJoinEndJoin:
EndJoin.MITER_END_JOIN
EndJoin.ROUND_END_JOIN
EndJoin.BEVEL_END_JOIN
r/wThe corner join applied to the ObjectStyle.
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
fillColorString
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the fill of the ObjectStyle. . Can also accept: String.
fillEffectsEnablingSettingsObjectStyleFillEffectsCategorySettings readonlyThe fill effects enabling settings.
fillTintnumber r/wThe 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.)
fillTransparencySettingsFillTransparencySetting readonlyTransparency settings for the fill applied to the ObjectStyle.
frameFittingOptionsFrameFittingOption r/wThe frame fitting option to apply to placed or pasted content. Can be applied to a frame, object style, or document or to the application.
gapColorSwatch r/wThe swatch (color, gradient, tint, or mixed ink) applied to the gap of a dashed, dotted, or striped stroke. For information, see stroke type.
gapTintnumber r/wThe 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.)
gradientFillAnglenumber r/wThe angle of a linear gradient applied to the fill of the ObjectStyle. (Range: -180 to 180)
gradientStrokeAnglenumber r/wThe angle of a linear gradient applied to the stroke of the ObjectStyle. (Range: -180 to 180)
idnumber readonlyThe unique ID of the ObjectStyle.
indexnumber readonlyThe index of the ObjectStyle within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
leftLineEndArrowHead:
ArrowHead.NONE
ArrowHead.SIMPLE_ARROW_HEAD
ArrowHead.SIMPLE_WIDE_ARROW_HEAD
ArrowHead.TRIANGLE_ARROW_HEAD
ArrowHead.TRIANGLE_WIDE_ARROW_HEAD
ArrowHead.BARBED_ARROW_HEAD
ArrowHead.CURVED_ARROW_HEAD
ArrowHead.CIRCLE_ARROW_HEAD
ArrowHead.CIRCLE_SOLID_ARROW_HEAD
ArrowHead.SQUARE_ARROW_HEAD
ArrowHead.SQUARE_SOLID_ARROW_HEAD
ArrowHead.BAR_ARROW_HEAD
r/wThe arrowhead applied to the start of the path.
miterLimitnumber (range: 1 - 500) r/wThe limit of the ratio of stroke width to miter length before a miter (pointed) join becomes a bevel (squared-off) join. (default: 4)
namestring r/wThe name of the ObjectStyle.
nonprintingbool r/wIf true, the ObjectStyle does not print.
objectEffectsEnablingSettingsObjectStyleObjectEffectsCategorySettings readonlyThe object effects enabling settings.
overprintFillbool r/wIf true, the ObjectStyle's fill color overprints any underlying objects. If false, the fill color knocks out the underlying colors.
overprintGapbool r/wIf true, the gap color overprints any underlying colors. If false, the gap color knocks out the underlying colors.
overprintStrokebool r/wIf true, the ObjectStyle's stroke color overprints any underlying objects. If false, the stroke color knocks out the underlying colors.
parentApplication
Document
ObjectStyleGroup
readonlyThe parent of the ObjectStyle (a Document, Application or ObjectStyleGroup).
preferencesPreferences Preference readonlyA collection of preferences objects.
propertiesObject r/wA property that allows setting of several properties at the same time.
rightLineEndArrowHead:
ArrowHead.NONE
ArrowHead.SIMPLE_ARROW_HEAD
ArrowHead.SIMPLE_WIDE_ARROW_HEAD
ArrowHead.TRIANGLE_ARROW_HEAD
ArrowHead.TRIANGLE_WIDE_ARROW_HEAD
ArrowHead.BARBED_ARROW_HEAD
ArrowHead.CURVED_ARROW_HEAD
ArrowHead.CIRCLE_ARROW_HEAD
ArrowHead.CIRCLE_SOLID_ARROW_HEAD
ArrowHead.SQUARE_ARROW_HEAD
ArrowHead.SQUARE_SOLID_ARROW_HEAD
ArrowHead.BAR_ARROW_HEAD
r/wThe arrowhead applied to the end of the path.
storyPreferencesStoryPreference r/wStory preference settings.
strokeAlignmentStrokeAlignment:
StrokeAlignment.CENTER_ALIGNMENT
StrokeAlignment.INSIDE_ALIGNMENT
StrokeAlignment.OUTSIDE_ALIGNMENT
r/wThe stroke alignment applied to the ObjectStyle.
strokeColorString
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the stroke of the ObjectStyle. Can also accept: String.
strokeEffectsEnablingSettingsObjectStyleStrokeEffectsCategorySettings readonlyThe stroke effects enabling settings.
strokeTintnumber r/wThe 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.)
strokeTransparencySettingsStrokeTransparencySetting readonlyTransparency settings for the stroke.
strokeTypeString
StrokeStyle
r/wThe name of the stroke style to apply. Can also accept: String.
strokeWeightMeasurement Unit (Number or String) r/wThe weight (in points) to apply to the ObjectStyle's stroke.
textFramePreferencesTextFramePreference r/wText frame preference settings.
textWrapPreferencesTextWrapPreference r/wThe text wrap preference properties that define the default formatting for wrapping text around objects.
topLeftCornerOptionCornerOptions:
CornerOptions.NONE
CornerOptions.ROUNDED_CORNER
CornerOptions.INVERSE_ROUNDED_CORNER
CornerOptions.INSET_CORNER
CornerOptions.BEVEL_CORNER
CornerOptions.FANCY_CORNER
r/wThe 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.
topLeftCornerRadiusMeasurement Unit (Number or String) r/wThe radius in measurement units of the corner effect applied to the top left corner of rectangular shapes and all corners of non-rectangular shapes
topRightCornerOptionCornerOptions:
CornerOptions.NONE
CornerOptions.ROUNDED_CORNER
CornerOptions.INVERSE_ROUNDED_CORNER
CornerOptions.INSET_CORNER
CornerOptions.BEVEL_CORNER
CornerOptions.FANCY_CORNER
r/wThe shape to apply to the top right corner of rectangular shapes
topRightCornerRadiusMeasurement Unit (Number or String) r/wThe radius in measurement units of the corner effect applied to the top right corner of rectangular shapes
transparencySettingsTransparencySetting readonlyTransparency settings.

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)

ObjectStyle duplicate ()
Duplicates the ObjectStyle.

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

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

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

ObjectStyle move (to: LocationOptions[, reference: varies])
Moves the ObjectStyle to the specified location.

ParameterTypeDescription
toLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The new location relative to the reference object or within the container object.
referenceApplication
Document
ObjectStyle
ObjectStyleGroup
The reference object. Note: Required when the to parameter is before or after. Can accept: ObjectStyle, ObjectStyleGroup, Document or Application. (Optional)

void remove ([replacingWith: ObjectStyle])
Deletes the style.

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

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

string toSpecifier ()
Retrieves the object specifier.

Element of

AnchoredObjectDefault.anchoredObjectStyle

AnchoredObjectSetting.parent

Application.allObjectStyles

BaselineFrameGridOption.parent

Button.appliedObjectStyle

ChangeObjectPreference.appliedObjectStyles

ContentTransparencySetting.parent

Document.allObjectStyles

EPS.appliedObjectStyle

EPSText.appliedObjectStyle

FillTransparencySetting.parent

FindObjectPreference.appliedObjectStyles

FormField.appliedObjectStyle

Graphic.appliedObjectStyle

GraphicLine.appliedObjectStyle

Group.appliedObjectStyle

Image.appliedObjectStyle

ImportedPage.appliedObjectStyle

MediaItem.appliedObjectStyle

Movie.appliedObjectStyle

MultiStateObject.appliedObjectStyle

ObjectStyle.basedOn

ObjectStyleContentEffectsCategorySettings.parent

ObjectStyleFillEffectsCategorySettings.parent

ObjectStyleGroup.allObjectStyles

ObjectStyleObjectEffectsCategorySettings.parent

ObjectStyleStrokeEffectsCategorySettings.parent

Oval.appliedObjectStyle

PDF.appliedObjectStyle

PICT.appliedObjectStyle

PageItem.appliedObjectStyle

PageItemDefault.appliedGraphicObjectStyle

PageItemDefault.appliedGridObjectStyle

PageItemDefault.appliedTextObjectStyle

Polygon.appliedObjectStyle

Rectangle.appliedObjectStyle

Sound.appliedObjectStyle

SplineItem.appliedObjectStyle

StoryPreference.parent

StrokeTransparencySetting.parent

TextFrame.appliedObjectStyle

TextFramePreference.parent

TextWrapPreference.parent

TransparencySetting.parent

WMF.appliedObjectStyle

Used in:

void Button.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void EPS.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void EPSText.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void FormField.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void Graphic.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void GraphicLine.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void Group.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void Image.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void ImportedPage.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void MediaItem.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void Movie.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void MultiStateObject.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void ObjectStyle.remove ([replacingWith: ObjectStyle])

void ObjectStyleGroup.remove ([replacingWith: ObjectStyle])

ObjectStyle ObjectStyles.nextItem (obj: ObjectStyle)

ObjectStyle ObjectStyles.previousItem (obj: ObjectStyle)

void Oval.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void PDF.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void PICT.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void PageItem.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void PageItemDefault.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void Polygon.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void Rectangle.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void Sound.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void SplineItem.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void TextFrame.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void WMF.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

Return

ObjectStyle ObjectStyle.duplicate ()

Array of ObjectStyle ObjectStyle.getElements ()

ObjectStyle ObjectStyle.move (to: LocationOptions[, reference: varies])

ObjectStyle ObjectStyles.[] (index: number)

ObjectStyle ObjectStyles.add ([withProperties: Object])

ObjectStyle ObjectStyles.anyItem ()

Array of ObjectStyle ObjectStyles.everyItem ()

ObjectStyle ObjectStyles.firstItem ()

ObjectStyle ObjectStyles.item (index: varies)

ObjectStyle ObjectStyles.itemByID (id: number)

ObjectStyle ObjectStyles.itemByName (name: string)

Array of ObjectStyle ObjectStyles.itemByRange (from: varies, to: varies)

ObjectStyle ObjectStyles.lastItem ()

ObjectStyle ObjectStyles.middleItem ()

ObjectStyle ObjectStyles.nextItem (obj: ObjectStyle)

ObjectStyle ObjectStyles.previousItem (obj: ObjectStyle)

Jongware, 28-Apr-2012 v3.0.3iContents :: Index