Adobe InDesign CS2 (4.0) Object Model JS: ObjectStyle

InDesign CS2

Class

ObjectStyle

 An object style.

QuickLinks

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

Hierarchy

Application | Document
ObjectStyle
AnchoredObjectSetting | BaselineFrameGridOption | StoryPreference | TextFramePreference | TextWrapPreference

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.
blendModeBlendMode:
BlendMode.NORMAL
BlendMode.MULTIPLY
BlendMode.SCREEN
BlendMode.OVERLAY
BlendMode.SOFT_LIGHT
BlendMode.HARD_LIGHT
BlendMode.COLOR_DODGE
BlendMode.COLOR_BURN
BlendMode.DARKEN
BlendMode.LIGHTEN
BlendMode.DIFFERENCE
BlendMode.EXCLUSION
BlendMode.HUE
BlendMode.SATURATION
BlendMode.COLOR
BlendMode.LUMINOSITY
r/wThe blend mode used to combine the background with the color of the ObjectStyle.
cornerEffectCornerEffects:
CornerEffects.NONE
CornerEffects.ROUNDED_CORNER
CornerEffects.INVERSE_ROUNDED_CORNER
CornerEffects.INSET_CORNER
CornerEffects.BEVEL_CORNER
CornerEffects.FANCY_CORNER
r/wThe shape to apply to corner points in a path. Note: corner effect differs from end join in that you can set a radius for a corner effect, whereas the rounded or beveled effect of an end join depends upon the stroke weight.
cornerRadiusnumber r/wThe radius of the corner
defaultFrameGridObjectStyleObjectStyle
String
r/wThe Default Frame Grid Object Style. Can return: ObjectStyle or String.
defaultObjectStyleObjectStyle
String
r/wThe Default Object Style. Can return: ObjectStyle or String.
defaultTextObjectStyleObjectStyle
String
r/wThe Default Text Object Style. Can return: ObjectStyle or String.
enableAnchoredObjectOptionsbool r/wIf true, the object style will apply an anchored object setting.
enableDropshadowAndFeatherbool r/wIf true, drop shadow and feather settings can be defined for the object style.
enableFillbool r/wIf true, the object style will apply a fill.
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.
enableStrokeAndCornerEffectsbool r/wIf true, the object style will apply stroke effects and corner effects.
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.
enableTransparencybool r/wIf true, the object style will apply transparency 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.
featherCornerTypeFeatherCornerType:
FeatherCornerType.SHARP
FeatherCornerType.ROUNDED
FeatherCornerType.DIFFUSION
r/wThe type of feathering.
featherModeFeatherMode:
FeatherMode.NONE
FeatherMode.STANDARD
r/wThe feather-enabling mode.
featherNoisenumber (range: 0 - 100) r/wThe amount (as a percentage) of noise to apply to the feather. (Range: 0 to 100)
featherWidthMeasurement Unit (Number or String) (range: 0 - 1000) r/wThe width of the feathering.
fillColorString
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the fill of the ObjectStyle. . Can also accept: String.
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.)
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.
isolateBlendingbool r/wIf true, the ObjectStyle blends in isolation.
knockoutGroupbool r/wIf true, the ObjectStyle is a knockout group.
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 r/wThe limit of the ratio of stroke width to miter length before a miter (pointed) join becomes a bevel (squared-off) join. (Range: 1 to 500)
namestring r/wThe name of the ObjectStyle.
nonprintingbool r/wIf true, the ObjectStyle does not print.
opacitynumber (range: 0 - 100) r/wThe opacity of the ObjectStyle. (Range: 0 to 100)
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
readonlyThe parent of the ObjectStyle (a Document or Application).
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.
shadowBlendModeBlendMode:
BlendMode.NORMAL
BlendMode.MULTIPLY
BlendMode.SCREEN
BlendMode.OVERLAY
BlendMode.SOFT_LIGHT
BlendMode.HARD_LIGHT
BlendMode.COLOR_DODGE
BlendMode.COLOR_BURN
BlendMode.DARKEN
BlendMode.LIGHTEN
BlendMode.DIFFERENCE
BlendMode.EXCLUSION
BlendMode.HUE
BlendMode.SATURATION
BlendMode.COLOR
BlendMode.LUMINOSITY
r/wThe blend mode to use for drawing the shadow.
shadowBlurRadiusMeasurement Unit (Number or String) (range: 0 - 144) r/wThe radius of the shadow blur.
shadowColorSwatch r/wThe swatch (color or mixed ink) applied to the shadow.
shadowModeShadowMode:
ShadowMode.NONE
ShadowMode.DROP
r/wThe shadow mode.
shadowNoisenumber (range: 0 - 100) r/wThe amount (as a percentage) of noise to apply to the shadow. (Range: 0 to 100)
shadowOpacitynumber (range: 0 - 100) r/wThe opacity of the shadow. (Range: 0 to 100)
shadowSpreadnumber (range: 0 - 100) r/wThe amount (as a percentage) of the blur radius to use as the shadow footprint. (Range: 0 to 100) For information, see shadow blur radius.
shadowXOffsetMeasurement Unit (Number or String) (range: -1000 - 1000) r/wThe horizontal offset of the shadow.
shadowYOffsetMeasurement Unit (Number or String) (range: -1000 - 1000) r/wThe vertical offset of the shadow.
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.
strokeCornerAdjustmentStrokeCornerAdjustment:
StrokeCornerAdjustment.NONE
StrokeCornerAdjustment.DASHES
StrokeCornerAdjustment.GAPS
StrokeCornerAdjustment.DASHES_AND_GAPS
r/wThe corner adjustment applied to the ObjectStyle.
strokeDashAndGap Array of Measurement Unit (Number or String) r/wThe dash and gap measurements that define the pattern of a custom dashed line. Define up to six values (in points) in the format [dash1, gap1, dash2, gap2, dash3, gap3].
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.)
strokeTypeStrokeStyle r/wThe stroke type
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.

Methods

Instances

ObjectStyle duplicate ()
Duplicates the ObjectStyle.

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

ParameterTypeDescription
keystringThe key.

Array of Object 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: ObjectStyle])
Moves the ObjectStyle to the specified location.

ParameterTypeDescription
toLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location relative to the reference object or within the containing object.
referenceObjectStyleThe reference object. Note: Required when the to value specifies before or after. (Optional)

void remove ()
Deletes the ObjectStyle.

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

string toSpecifier ()
Retrieves the object specifier.

Element of

AnchoredObjectDefault.anchoredObjectStyle

AnchoredObjectSetting.parent

BaselineFrameGridOption.parent

Button.appliedObjectStyle

EPS.appliedObjectStyle

FormField.appliedObjectStyle

GraphicLine.appliedObjectStyle

Group.appliedObjectStyle

Image.appliedObjectStyle

ObjectStyle.basedOn

ObjectStyle.defaultFrameGridObjectStyle

ObjectStyle.defaultObjectStyle

ObjectStyle.defaultTextObjectStyle

Oval.appliedObjectStyle

PDF.appliedObjectStyle

PICT.appliedObjectStyle

PageItem.appliedObjectStyle

Polygon.appliedObjectStyle

Rectangle.appliedObjectStyle

StoryPreference.parent

TextFrame.appliedObjectStyle

TextFramePreference.parent

TextWrapPreference.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 FormField.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])

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

array of ObjectStyle ObjectStyles.itemByRange (from: any, to: any)

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 Polygon.applyObjectStyle (using: ObjectStyle[, clearingOverrides: bool=true][, clearingOverridesThroughRootObjectStyle: bool=false])

void Rectangle.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 ()

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

ObjectStyle ObjectStyles.add ([withProperties: Object])

ObjectStyle ObjectStyles.anyItem ()

Array of ObjectStyle ObjectStyles.everyItem ()

ObjectStyle ObjectStyles.firstItem ()

ObjectStyle ObjectStyles.item (index: any)

ObjectStyle ObjectStyles.itemByID (id: number)

ObjectStyle ObjectStyles.itemByName (name: string)

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

ObjectStyle ObjectStyles.lastItem ()

ObjectStyle ObjectStyles.middleItem ()

ObjectStyle ObjectStyles.nextItem (obj: ObjectStyle)

ObjectStyle ObjectStyles.previousItem (obj: ObjectStyle)

Jongware, 27-Jun-2010 v3.0.3dContents :: Index