API ReferenceGlobalsUnitFormatter

# Class: UnitFormatter

# Hierarchy

  • UnitFormatter

# Implements

# Index

# Constructors

# Properties

# Methods

# Constructors

# constructor

+ new UnitFormatter(creator?: string): UnitFormatter

Defined in packages/configurator-core/src/services/unit-formatter.ts:82

Parameters:

Name Type
creator? string

Returns: UnitFormatter

# Properties

# creator

creator: string

_Implementation of Context.creator_

Defined in packages/configurator-core/src/services/unit-formatter.ts:73

# Methods

# formatAngleValueToUnitString

formatAngleValueToUnitString(value: number, parameter: KernelParameter): string

Defined in packages/configurator-core/src/services/unit-formatter.ts:154

Parameters:

Name Type
value number
parameter KernelParameter

Returns: string


# formatMMValueToUnitString

formatMMValueToUnitString(aValue: number, unitType?: string): string

Defined in packages/configurator-core/src/services/unit-formatter.ts:247

Parameters:

Name Type
aValue number
unitType? string

Returns: string


# formatMMValueWithReqMaxLength

formatMMValueWithReqMaxLength(aValue: number, reqMaxSize: number): string

Defined in packages/configurator-core/src/services/unit-formatter.ts:257

Parameters:

Name Type
aValue number
reqMaxSize number

Returns: string


# formatNumber

formatNumber(aValue: number, digit: number): string

Defined in packages/configurator-core/src/services/unit-formatter.ts:239

Parameters:

Name Type Default
aValue number -
digit number 0

Returns: string


# formatParameter

formatParameter(parameter: UiKernelParameter): void

Defined in packages/configurator-core/src/services/unit-formatter.ts:277

Parameters:

Name Type
parameter UiKernelParameter

Returns: void


# formatPartListParameter

formatPartListParameter(parameter: KernelPartListParameter): void

Defined in packages/configurator-core/src/services/unit-formatter.ts:271

Parameters:

Name Type
parameter KernelPartListParameter

Returns: void


# formatSquareMMValueToUnitString

formatSquareMMValueToUnitString(aValue: number): string

Defined in packages/configurator-core/src/services/unit-formatter.ts:243

Parameters:

Name Type
aValue number

Returns: string


# formatValueToUnitString

formatValueToUnitString(value: number, parameter: KernelParameter): string | number

Defined in packages/configurator-core/src/services/unit-formatter.ts:184

Parameters:

Name Type
value number
parameter KernelParameter

Returns: string | number


# getAllowedDelta

getAllowedDelta(): number

Defined in packages/configurator-core/src/services/unit-formatter.ts:311

Returns: number


# getPrecision

getPrecision(): number

Defined in packages/configurator-core/src/services/unit-formatter.ts:307

Returns: number


# init

init(kernelContainer: any): void

Defined in packages/configurator-core/src/services/unit-formatter.ts:88

Parameters:

Name Type
kernelContainer any

Returns: void


# isInch

isInch(): boolean

Defined in packages/configurator-core/src/services/unit-formatter.ts:303

Returns: boolean


# isParseableNumber

isParseableNumber(aString: string): boolean

Defined in packages/configurator-core/src/services/unit-formatter.ts:208

Parameters:

Name Type
aString string

Returns: boolean


# isParseableUnitString

isParseableUnitString(aString: string, parameter: KernelParameter): boolean

Defined in packages/configurator-core/src/services/unit-formatter.ts:212

Parameters:

Name Type
aString string
parameter KernelParameter

Returns: boolean


# parseAngleValueFromUnitString

parseAngleValueFromUnitString(rotation: string): string

Defined in packages/configurator-core/src/services/unit-formatter.ts:159

Parameters:

Name Type
rotation string

Returns: string


# parseMMValueFromUnitString

parseMMValueFromUnitString(aString: string, unitType: string): number

Defined in packages/configurator-core/src/services/unit-formatter.ts:225

Parameters:

Name Type
aString string
unitType string

Returns: number


# parseNumber

parseNumber(aString: string): number

Defined in packages/configurator-core/src/services/unit-formatter.ts:235

Parameters:

Name Type
aString string

Returns: number


# parseValue

parseValue(value: string, parameter: KernelParameter): string | number

Defined in packages/configurator-core/src/services/unit-formatter.ts:163

Parameters:

Name Type
value string
parameter KernelParameter

Returns: string | number