All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.flow.component.charts.model.Loading Maven / Gradle / Ivy

There is a newer version: 24.5.4
Show newest version
/**
 * Copyright 2000-2024 Vaadin Ltd.
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See {@literal } for the full
 * license.
 */
package com.vaadin.flow.component.charts.model;

import com.vaadin.flow.component.charts.model.style.Style;

/**
 * The loading options control the appearance of the loading screen that covers
 * the plot area on chart operations. This screen only appears after an explicit
 * call to chart.showLoading(). It is a utility for developers to
 * communicate to the end user that something is going on, for example while
 * retrieving new data via an XHR connection. The "Loading..." text itself is
 * not part of this configuration object, but part of the lang
 * object.
 */
public class Loading extends AbstractConfigurationObject {

    private Number hideDuration;
    private Style labelStyle;
    private Number showDuration;
    private Style style;

    public Loading() {
    }

    /**
     * @see #setHideDuration(Number)
     */
    public Number getHideDuration() {
        return hideDuration;
    }

    /**
     * The duration in milliseconds of the fade out effect.
     * 

* Defaults to: 100 */ public void setHideDuration(Number hideDuration) { this.hideDuration = hideDuration; } /** * @see #setLabelStyle(Style) */ public Style getLabelStyle() { if (labelStyle == null) { labelStyle = new Style(); } return labelStyle; } /** * CSS styles for the loading label span. *

* Defaults to: { "fontWeight": "bold", "position": "relative", "top": "45%" * } */ public void setLabelStyle(Style labelStyle) { this.labelStyle = labelStyle; } /** * @see #setShowDuration(Number) */ public Number getShowDuration() { return showDuration; } /** * The duration in milliseconds of the fade in effect. *

* Defaults to: 100 */ public void setShowDuration(Number showDuration) { this.showDuration = showDuration; } /** * @see #setStyle(Style) */ public Style getStyle() { if (style == null) { style = new Style(); } return style; } /** * CSS styles for the loading screen that covers the plot area. *

* Defaults to: { "position": "absolute", "backgroundColor": "#ffffff", * "opacity": 0.5, "textAlign": "center" } */ public void setStyle(Style style) { this.style = style; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy