Adobe FrameMaker-12 Object Model JS: Number

FrameMaker 12.0

Class

Number

 Wraps a numeric value.

QuickLinks

Number, toExponential, toFixed, toLocaleString, toPrecision, toSource, toString, valueOf

Class

PropertyTypeAccessDescription
MAX_VALUEnumber readonlyA constant representing the largest representable number. (default: 1.7976931348623158e+308)
MIN_VALUEnumber readonlyA constant representing the smallest representable number. (default: 2.2250738585072014e-308)
NEGATIVE_INFINITYnumber readonlyA constant representing negative infinity.
NaNnumber readonlyA constant representing the special "Not a Number" value. (default: NaN)
POSITIVE_INFINITYnumber readonlyA constant representing positive infinity.

Methods

Constructor

Number Number (value: any)
Returns a new Number object set to the value of the argument converted to a number.

ParameterTypeDescription
value any The value of the object being created.

Examplenew Number(value)

Instances

number toExponential (decimals: number)
Converts the Number object to a string in scientific notation.

ParameterTypeDescription
decimalsnumberThe number of decimals.

number toFixed (decimals: number)
Converts the Number object to a string with fixed decimals.

ParameterTypeDescription
decimalsnumberThe number of decimals.

number toLocaleString ()
Returns the value of a Number object converted to a string, using localized conventions.

number toPrecision (decimals: number)
Converts the Number object to a string in either scientific or fixed notation, epending on its value.

ParameterTypeDescription
decimalsnumberThe number of decimals.

number toSource ()
Creates a string representation of this object that can be fed back to eval() to re-create an object. Works only with built-in classes.

number toString ([radix: number])
Returns the value of a Number object converted to a string.

ParameterTypeDescription
radixnumberThe optional conversion radix. (Optional)

Examplenum.toString(16)

number valueOf ()
Returns the value of a Number object as a primitive number.

Examplenum.valueOf()

Element of

Bounds.bottom

Bounds.height

Bounds.left

Bounds.length

Bounds.right

Bounds.top

Bounds.width

Bounds.x

Bounds.y

Button.characters

Button.indent

Checkbox.characters

Checkbox.indent

Dimension.height

Dimension.length

Dimension.width

DropDownList.indent

EditText.characters

EditText.indent

FlashPlayer.indent

Group.indent

Group.margins

Group.spacing

IconButton.indent

ListBox.indent

ListItem.index

Panel.characters

Panel.indent

Panel.margins

Panel.spacing

Point.left

Point.length

Point.top

Point.x

Point.y

Progressbar.indent

Progressbar.maxvalue

Progressbar.minvalue

Progressbar.value

RadioButton.characters

RadioButton.indent

ScriptUIBrush.color

ScriptUIBrush.type

ScriptUIFont.size

ScriptUIPen.color

ScriptUIPen.lineWidth

Scrollbar.indent

Scrollbar.jumpdelta

Scrollbar.maxvalue

Scrollbar.minvalue

Scrollbar.stepdelta

Scrollbar.value

Slider.indent

Slider.maxvalue

Slider.minvalue

Slider.value

StaticText.characters

StaticText.indent

TreeView.indent

Window.characters

Window.indent

Window.margins

Window.opacity

Window.spacing

Used in:

ScriptUIFont ScriptUI.newFont (name: String, style: String | Number, size: Number)

void ScriptUIGraphics.drawFocusRing (left: Number, top: Number, width: Number, height: Number)

void ScriptUIGraphics.drawImage (image: ScriptUIImage, left: Number, top: Number[, width: Number][, height: Number])

void ScriptUIGraphics.drawString (text: String, pen: ScriptUIPen, x: Number, y: Number[, font: ScriptUIFont])

Point ScriptUIGraphics.ellipsePath (left: Number, top: Number, width: Number, height: Number)

Point ScriptUIGraphics.lineTo (x: Number, y: Number)

Dimension ScriptUIGraphics.measureString (text: String[, font: ScriptUIFont][, boundingWidth: Number])

Point ScriptUIGraphics.moveTo (x: Number, y: Number)

ScriptUIBrush ScriptUIGraphics.newBrush (type: Number, color: Array of Number | String)

ScriptUIPen ScriptUIGraphics.newPen (type: Number, color: Array of Number | String, width: Number)

Point ScriptUIGraphics.rectPath (left: Number, top: Number, width: Number, height: Number)

UIEvent UIEvent.UIEvent (type: String[, captures: Boolean=false][, bubbles: Boolean=false][, view: Object][, detail: Number])

void UIEvent.initUIEvent (type: String[, captures: Boolean=false][, bubbles: Boolean=false][, view: Object][, detail: Number])

Return

Number Number.Number (value: any)

Jongware, 18-Jan-2015 v1.0Contents :: Index