/** * Copyright 2014-present Palantir Technologies * @license MIT */ import * as Typesettable from "typesettable"; import { SimpleSelection, SpaceRequest } from "../core/interfaces"; import { Component } from "./component"; export declare class Label extends Component { protected _textContainer: SimpleSelection; protected _text: string; protected _angle: number; protected _measurer: Typesettable.CacheMeasurer; protected _wrapper: Typesettable.Wrapper; protected _writer: Typesettable.Writer; protected _padding: number; /** * A Label is a Component that displays a single line of text. * * @constructor * @param {string} [displayText=""] The text of the Label. * @param {number} [angle=0] The angle of the Label in degrees (-90/0/90). 0 is horizontal. */ constructor(displayText?: string, angle?: number); requestedSpace(offeredWidth: number, offeredHeight: number): SpaceRequest; protected _setup(): void; /** * Gets the Label's text. */ text(): string; /** * Sets the Label's text. * * @param {string} displayText * @returns {Label} The calling Label. */ text(displayText: string): this; /** * Gets the angle of the Label in degrees. */ angle(): number; /** * Sets the angle of the Label in degrees. * * @param {number} angle One of -90/0/90. 0 is horizontal. * @returns {Label} The calling Label. */ angle(angle: number): this; /** * Gets the amount of padding around the Label in pixels. */ padding(): number; /** * Sets the amount of padding around the Label in pixels. * * @param {number} padAmount * @returns {Label} The calling Label. */ padding(padAmount: number): this; fixedWidth(): boolean; fixedHeight(): boolean; renderImmediately(): this; invalidateCache(): void; } export declare class TitleLabel extends Label { static TITLE_LABEL_CLASS: string; /** * @constructor * @param {string} [text] * @param {number} [angle] One of -90/0/90. 0 is horizontal. */ constructor(text?: string, angle?: number); } export declare class AxisLabel extends Label { static AXIS_LABEL_CLASS: string; /** * @constructor * @param {string} [text] * @param {number} [angle] One of -90/0/90. 0 is horizontal. */ constructor(text?: string, angle?: number); }