Adobe InDesign CS6 (8.0) Object Model JS: CellStyle

InDesign CS6

Class

CellStyle

 A cell style.

QuickLinks

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

Hierarchy

Application | CellStyleGroup | Document
CellStyle
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
appliedParagraphStyleNothingEnumParagraphStyle
String
r/wThe paragraph style applied to the text. Can return: ParagraphStyle or NothingEnum enumerator. Can also accept: String.
basedOnCellStyle
String
r/wThe style that this style is based on. Can return: CellStyle or String.
bottomEdgeStrokeColorNothingEnum
Swatch
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.
bottomEdgeStrokeTintNothingEnum
Real
r/wThe tint (as a percentage) of the bottom edge border stroke. Can return: Real or NothingEnum enumerator.
bottomEdgeStrokeTypeNothingEnum
String
StrokeStyle
r/wThe stroke type of the bottom edge. Can return: StrokeStyle or NothingEnum enumerator. Can also accept: String.
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
String
StrokeStyle
r/wThe stroke type of the diagonal line(s). Can return: StrokeStyle or NothingEnum enumerator. Can also accept: String.
diagonalLineStrokeWeightNothingEnum
Unit
r/wThe diagonal line stroke weight. Can return: Unit or NothingEnum enumerator.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
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 CellStyle, in the format [x, y]. Can return: Array of 2 Units or NothingEnum enumerator.
idnumber readonlyThe unique ID of the CellStyle.
indexnumber readonlyThe index of the CellStyle 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.
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.
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
String
StrokeStyle
r/wThe stroke type of the left edge. Can return: StrokeStyle or NothingEnum enumerator. Can also accept: String.
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.
namestring r/wThe name of the style.
overprintFillBoolean
NothingEnum
r/wIf true, the fill of the object will overprint. Can return: Boolean or NothingEnum enumerator.
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
CellStyleGroup
Document
readonlyThe parent of the CellStyle (a Document, Application or CellStyleGroup).
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.
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
String
StrokeStyle
r/wThe stroke type of the right edge. Can return: StrokeStyle or NothingEnum enumerator. Can also accept: String.
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.
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
String
StrokeStyle
r/wThe stroke type of the top edge. Can return: StrokeStyle or NothingEnum enumerator. Can also accept: String.
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

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)

CellStyle duplicate ()
Duplicates the CellStyle.

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

ParameterTypeDescription
keystringThe key.

Array of CellStyle 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.

CellStyle move (to: LocationOptions[, reference: varies])
Moves the style 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.
referenceApplication
CellStyle
CellStyleGroup
CharacterStyle
CharacterStyleGroup
Document
ParagraphStyle
ParagraphStyleGroup
TableStyle
TableStyleGroup
The reference object. Note: Required when the to parameter specifies before or after. Can accept: ParagraphStyle, ParagraphStyleGroup, CharacterStyle, CharacterStyleGroup, CellStyle, CellStyleGroup, TableStyle, TableStyleGroup, Document or Application. (Optional)

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

ParameterTypeDescription
replacingWithCellStyleThe 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 CellStyle.

string toSpecifier ()
Retrieves the object specifier.

Element of

Application.allCellStyles

Cell.appliedCellStyle

CellStyle.basedOn

CellStyleGroup.allCellStyles

Document.allCellStyles

TableStyle.bodyRegionCellStyle

TableStyle.footerRegionCellStyle

TableStyle.headerRegionCellStyle

TableStyle.leftColumnRegionCellStyle

TableStyle.rightColumnRegionCellStyle

XMLExportMap.mappedStyle

XMLImportMap.mappedStyle

Used in:

void CellStyle.remove ([replacingWith: CellStyle])

CellStyle CellStyles.nextItem (obj: CellStyle)

CellStyle CellStyles.previousItem (obj: CellStyle)

Return

CellStyle CellStyle.duplicate ()

Array of CellStyle CellStyle.getElements ()

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

CellStyle CellStyles.[] (index: number)

CellStyle CellStyles.add ([withProperties: Object])

CellStyle CellStyles.anyItem ()

Array of CellStyle CellStyles.everyItem ()

CellStyle CellStyles.firstItem ()

CellStyle CellStyles.item (index: varies)

CellStyle CellStyles.itemByID (id: number)

CellStyle CellStyles.itemByName (name: string)

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

CellStyle CellStyles.lastItem ()

CellStyle CellStyles.middleItem ()

CellStyle CellStyles.nextItem (obj: CellStyle)

CellStyle CellStyles.previousItem (obj: CellStyle)

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