Adobe InDesign CS2 (4.0) Object Model JS: CellStyle

InDesign CS2

Class

CellStyle

 A cell style

QuickLinks

applycellstyle, applycellstyletocells, duplicate, extractLabel, getElements, insertLabel, remove, toSource, toSpecifier

Hierarchy

Application | Document
CellStyle

Properties

PropertyTypeAccessDescription
bottomEdgeStrokeColorNothingEnumSwatch r/wThe swatch (color, gradient, tint, or mixed ink) applied to the bottom edge border stroke. Can return: Swatch or NothingEnum enumerator.
bottomEdgeStrokeGapColorNothingEnum
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the gap of the bottom edge border stroke. Note: Not valid when bottom edge stroke type is solid. Can return: Swatch or NothingEnum enumerator.
bottomEdgeStrokeGapOverprintBoolean
NothingEnum
r/wIf true, the gap color of the bottom edge border stroke will overprint. Note: Not valid when bottom edge stroke type is solid. Can return: Boolean or NothingEnum enumerator.
bottomEdgeStrokeGapTintNothingEnum
Real
r/wThe tint (as a percentage) of the bottom edge border stroke gap color. (Range: 0 to 100) Note: Not valid when bottom edge stroke type is solid. Can return: Real or NothingEnum enumerator.
bottomEdgeStrokeOverprintBoolean
NothingEnum
r/wIf true, the bottom edge border stroke will overprint. Can return: Boolean or NothingEnum enumerator.
bottomEdgeStrokePriorityLong
NothingEnum
r/wThe order in which to draw the bottom edge border stroke. Note: The value must be 1, 2, 3, or 4, with 1 indicating that the stroke is the first stroke drawn, and therefore overlapped by strokes with higher priority. Can return: Long or NothingEnum enumerator.
bottomEdgeStrokeTintNothingEnum
Real
r/wThe tint (as a percentage) of the bottom edge border stroke. Can return: Real or NothingEnum enumerator.
bottomEdgeStrokeTypeNothingEnum
StrokeStyle
r/wThe stroke type of the bottom edge. Can return: StrokeStyle or NothingEnum enumerator.
bottomEdgeStrokeWeightNothingEnum
Unit
r/wThe stroke weight of the bottom edge border stroke. Can return: Unit or NothingEnum enumerator.
bottomInsetNothingEnum
Unit
r/wThe bottom inset of the cell. Can return: Unit or NothingEnum enumerator.
clipContentToCellBoolean
NothingEnum
r/wIf true, clips the cell's content to width and height of the cell. Can return: Boolean or NothingEnum enumerator.
diagonalLineInFrontBoolean
NothingEnum
r/wIf true, draws the diagonal line in front of cell contents. Can return: Boolean or NothingEnum enumerator.
diagonalLineStrokeColorNothingEnum
Swatch
r/wThe diagonal line color, specified as a swatch. Can return: Swatch or NothingEnum enumerator.
diagonalLineStrokeGapColorNothingEnum
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the gap of the diagonal line stroke. Note: Not valid when diagonal line stroke type is solid. Can return: Swatch or NothingEnum enumerator.
diagonalLineStrokeGapOverprintBoolean
NothingEnum
r/wIf true, the stroke gap of the diagonal line will overprint. Note: Not valid when diagonal line stroke type is solid. Can return: Boolean or NothingEnum enumerator.
diagonalLineStrokeGapTintNothingEnum
Real
r/wThe tint (as a percentage) of the diagonal line stroke gap color. Note: Not valid when diagonal line stroke type is solid. Can return: Real or NothingEnum enumerator.
diagonalLineStrokeOverprintBoolean
NothingEnum
r/wIf true, the diagonal line stroke will overprint. Can return: Boolean or NothingEnum enumerator.
diagonalLineStrokeTintNothingEnum
Real
r/wThe diagonal line tint (as a percentage). (Range: 0 to 100). Can return: Real or NothingEnum enumerator.
diagonalLineStrokeTypeNothingEnum
StrokeStyle
r/wThe diagonal line stroke type. Can return: StrokeStyle or NothingEnum enumerator.
diagonalLineStrokeWeightNothingEnum
Unit
r/wThe diagonal line stroke weight. Can return: Unit or NothingEnum enumerator.
fillColorNothingEnum
String
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the fill of the object. Can return: Swatch or NothingEnum enumerator. Can also accept: String.
fillTintNothingEnum
Real
r/wThe tint (as a percentage) of the fill of the object. Can return: Real or NothingEnum enumerator.
firstBaselineOffsetFirstBaseline
NothingEnum
r/wThe distance between the baseline of the text and the top inset of the cell. Can return: FirstBaseline enumerator or NothingEnum enumerator.
gradientFillAngleNothingEnum
Real
r/wThe angle of a linear gradient applied to the fill of the object. (Range: -180 to 180). Can return: Real or NothingEnum enumerator.
gradientFillLengthNothingEnum
Real
r/wThe length (of a linear gradient) or radius (of a radial gradient) applied to the fill of the object. Can return: Real or NothingEnum enumerator.
gradientFillStart2 Units
NothingEnum
r/wThe starting point (in page coordinates) of a gradient applied to the fill of the object, in the format [x, y]. Can return: Array of 2 Units or NothingEnum enumerator.
idLong
NothingEnum
readonlyThe unique ID of the CellStyle. Can return: Long or NothingEnum enumerator.
indexLong
NothingEnum
readonlyThe index of the CellStyle within its containing object. Can return: Long or NothingEnum enumerator.
labelNothingEnum
String
r/wA property that can be set to any string. Can return: String or NothingEnum enumerator.
leftEdgeStrokeColorNothingEnum
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the left edge border stroke. Can return: Swatch or NothingEnum enumerator.
leftEdgeStrokeGapColorNothingEnum
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the gap of the left edge border stroke. Note: Not valid when left edge stroke type is solid. Can return: Swatch or NothingEnum enumerator.
leftEdgeStrokeGapOverprintBoolean
NothingEnum
r/wIf true, the gap color of the left edge border stroke will overprint. Note: Not valid when left edge stroke type is solid. Can return: Boolean or NothingEnum enumerator.
leftEdgeStrokeGapTintNothingEnum
Real
r/wThe tint (as a percentage) of the left edge border stroke gap color. (Range: 0 to 100) Note: Not valid when left edge stroke type is solid. Can return: Real or NothingEnum enumerator.
leftEdgeStrokeOverprintBoolean
NothingEnum
r/wIf true, the left edge border stroke will overprint. Can return: Boolean or NothingEnum enumerator.
leftEdgeStrokePriorityLong
NothingEnum
r/wThe order in which to draw the left edge border stroke. Note: The value must be 1, 2, 3, or 4, with 1 indicating that the stroke is the first stroke drawn, and therefore overlapped by strokes with higher priority. Can return: Long or NothingEnum enumerator.
leftEdgeStrokeTintNothingEnum
Real
r/wThe tint (as a percentage) of the left edge border stroke. (Range: 0 to 100). Can return: Real or NothingEnum enumerator.
leftEdgeStrokeTypeNothingEnum
StrokeStyle
r/wThe stroke type of the left edge border stroke. Can return: StrokeStyle or NothingEnum enumerator.
leftEdgeStrokeWeightNothingEnum
Unit
r/wThe stroke weight of the left edge border stroke. Can return: Unit or NothingEnum enumerator.
leftInsetNothingEnum
Unit
r/wThe left inset of the cell. Can return: Unit or NothingEnum enumerator.
minimumFirstBaselineOffsetNothingEnum
Unit (0 - 8640 points)
r/wThe space between the baseline of the text and the top inset of the frame or cell. Can return: Unit (0 - 8640 points) or NothingEnum enumerator.
nameNothingEnum
String
r/wThe name of the CellStyle. Can return: String or NothingEnum enumerator.
overprintFillBoolean
NothingEnum
r/wIf true, the fill of the object will overprint. Can return: Boolean or NothingEnum enumerator.
paraStyleNothingEnum
ParagraphStyle
String
r/wThe paragraph style associated with this cell style. Can return: ParagraphStyle or NothingEnum enumerator. Can also accept: String.
paragraphSpacingLimitNothingEnum
Unit
r/wThe maximum space that can be added between paragraphs in a cell. Note: Valid only when vertical justification is justified. Can return: Unit or NothingEnum enumerator.
parentApplication
Document
readonlyThe parent of the CellStyle (a Application or Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
rightEdgeStrokeColorNothingEnum
Swatch
r/wThe color, specified as a swatch, of the right edge border stroke. Can return: Swatch or NothingEnum enumerator.
rightEdgeStrokeGapColorNothingEnum
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the gap of the right edge border stroke. Note: Not valid when right edge stroke type is solid. Can return: Swatch or NothingEnum enumerator.
rightEdgeStrokeGapOverprintBoolean
NothingEnum
r/wIf true, the gap color of the right edge border stroke will overprint. Note: Not valid when right edge stroke type is solid. Can return: Boolean or NothingEnum enumerator.
rightEdgeStrokeGapTintNothingEnum
Real
r/wThe tint (as a percentage) of the right edge border stroke gap color. (Range: 0 to 100) Note: Not valid when right edge stroke type is solid. Can return: Real or NothingEnum enumerator.
rightEdgeStrokeOverprintBoolean
NothingEnum
r/wIf true, the right edge border stroke will overprint. Can return: Boolean or NothingEnum enumerator.
rightEdgeStrokePriorityLong
NothingEnum
r/wThe order in which to draw the right edge border stroke. Note: The value must be 1, 2, 3, or 4, with 1 indicating that the stroke is the first stroke drawn, and therefore overlapped by strokes with higher priority. Can return: Long or NothingEnum enumerator.
rightEdgeStrokeTintNothingEnum
Real
r/wThe tint (as a percentage) of the right edge border stroke. (Range: 0 to 100). Can return: Real or NothingEnum enumerator.
rightEdgeStrokeTypeNothingEnum
StrokeStyle
r/wThe stroke type of the right edge border stroke. Can return: StrokeStyle or NothingEnum enumerator.
rightEdgeStrokeWeightNothingEnum
Unit
r/wThe stroke weight of the right edge border stroke. Can return: Unit or NothingEnum enumerator.
rightInsetNothingEnum
Unit
r/wThe right inset of the cell. Can return: Unit or NothingEnum enumerator.
rotationAngleNothingEnum
Real
r/wThe rotation angle (in degrees) of the cell, specified as one of the following values: 0, 90, 180, or 270. Can return: Real or NothingEnum enumerator.
topEdgeStrokeColorNothingEnum
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the top edge border stroke. Can return: Swatch or NothingEnum enumerator.
topEdgeStrokeGapColorNothingEnum
Swatch
r/wThe swatch (color, gradient, tint, or mixed ink) applied to the gap of the top edge border stroke. Note: Not valid when top edge stroke type is solid. Can return: Swatch or NothingEnum enumerator.
topEdgeStrokeGapOverprintBoolean
NothingEnum
r/wIf true, the gap color of the top edge border stroke will overprint. Note: Not valid when top edge stroke type is solid. . Can return: Boolean or NothingEnum enumerator.
topEdgeStrokeGapTintNothingEnum
Real
r/wThe tint (as a percentage) of the top edge border stroke gap color. (Range: 0 to 100) Note: Not valid when top edge stroke type is solid. Can return: Real or NothingEnum enumerator.
topEdgeStrokeOverprintBoolean
NothingEnum
r/wIf true, the top edge border stroke will overprint. Can return: Boolean or NothingEnum enumerator.
topEdgeStrokePriorityLong
NothingEnum
r/wThe order in which to draw the top edge border stroke. Note: The value must be 1, 2, 3, or 4, with 1 indicating that the stroke is the first stroke drawn. Can return: Long or NothingEnum enumerator.
topEdgeStrokeTintNothingEnum
Real
r/wThe tint (as a percentage) of the top edge border stroke. (Range: 0 to 100). Can return: Real or NothingEnum enumerator.
topEdgeStrokeTypeNothingEnum
StrokeStyle
r/wThe stroke type of the top edge border stroke. Can return: StrokeStyle or NothingEnum enumerator.
topEdgeStrokeWeightNothingEnum
Unit
r/wThe stroke weight of the top edge border stroke. Can return: Unit or NothingEnum enumerator.
topInsetNothingEnum
Unit
r/wThe top inset of the cell. Can return: Unit or NothingEnum enumerator.
topLeftDiagonalLineBoolean
NothingEnum
r/wIf true, draws a diagonal line starting from the top left. Can return: Boolean or NothingEnum enumerator.
topRightDiagonalLineBoolean
NothingEnum
r/wIf true, draws a diagonal line starting from the top right. Can return: Boolean or NothingEnum enumerator.
verticalJustificationNothingEnum
VerticalJustification
r/wThe vertical alignment of cell. Can return: VerticalJustification enumerator or NothingEnum enumerator.

Methods

Instances

void applycellstyle ([removeOverrides: bool=false])
Used to apply a cell style to the selected cells

ParameterTypeDescription
removeOverridesboolTrue to remove overrides, false to keep them (Optional) (default: false)

void applycellstyletocells (to: Array of any[, removeOverrides: bool=false])
Used to apply a cell style to the specified cells

ParameterTypeDescription
to Array of :
Array of Cells
Columns
Rows
Tables
The cells to apply the style to. Can accept: Array of Cells, Columns, Rows or Tables.
removeOverridesboolTrue to remove overrides, false to keep them (Optional) (default: false)

CellStyle duplicate ()
Used to copy a cell style

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.

void remove ([replacingWith: string=[None]])
Delete the cell style object

ParameterTypeDescription
replacingWithstringThe cell style to replace the style with (Optional) (default: [None])

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

string toSpecifier ()
Retrieves the object specifier.

Element of

Cell.appliedCellStyle

Used in:

array of CellStyle CellStyles.itemByRange (from: any, to: any)

CellStyle CellStyles.nextItem (obj: CellStyle)

CellStyle CellStyles.previousItem (obj: CellStyle)

Return

CellStyle CellStyle.duplicate ()

CellStyle CellStyles.add (name: string[, basedOn: string=[None]])

CellStyle CellStyles.anyItem ()

Array of CellStyle CellStyles.everyItem ()

CellStyle CellStyles.firstItem ()

CellStyle CellStyles.item (index: any)

CellStyle CellStyles.itemByID (id: number)

CellStyle CellStyles.itemByName (name: string)

Array of CellStyle CellStyles.itemByRange (from: any, to: any)

CellStyle CellStyles.lastItem ()

CellStyle CellStyles.middleItem ()

CellStyle CellStyles.nextItem (obj: CellStyle)

CellStyle CellStyles.previousItem (obj: CellStyle)

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