UNPKG

@eclipse-scout/core

Version:
40 lines 1.58 kB
import { CodeModel, CodeType, InitModelOf, Locale, ModelOf, ObjectWithId, ObjectWithType, TreeVisitor, TreeVisitResult } from '../index'; export declare class Code<TCodeId> implements ObjectWithType, ObjectWithId<TCodeId> { model: CodeModel<TCodeId>; id: TCodeId; objectType: string; modelClass: string; active: boolean; enabled: boolean; iconId: string; tooltipText: string; backgroundColor: string; foregroundColor: string; font: string; cssClass: string; extKey: string; value: number; partitionId: number; sortCode: number; children: Code<TCodeId>[]; parent?: Code<TCodeId>; codeType: CodeType<TCodeId, Code<TCodeId>, any>; protected _text: string; constructor(); init(model: InitModelOf<this>): void; protected _initCodeTypeField(codeType: CodeType<TCodeId, Code<TCodeId>, any>, fieldName: string): void; /** * Gets the text of this Code in the given language. * * @param vararg The language tag or the {@link Locale} to load the text for. */ text(vararg: string | Locale): string; /** * Visits all children of this Code recursively without visiting this Code itself. * * By default, only active child codes are visited. To visit inactive child codes as well, set the `activeOnly` argument to false. */ visitChildren(visitor: TreeVisitor<Code<TCodeId>>, activeOnly?: boolean): boolean | TreeVisitResult; static ensure<TCodeId>(code: ModelOf<Code<TCodeId>> | Code<TCodeId>): Code<TCodeId>; } //# sourceMappingURL=Code.d.ts.map