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

com.vaadin.flow.component.charts.model.ResetZoomButton 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.ButtonTheme;

/**
 * The button that appears after a selection zoom, allowing the user to reset
 * zoom.
 */
public class ResetZoomButton extends AbstractConfigurationObject {

    private Position position;
    private ResetZoomButtonRelativeTo relativeTo;
    private ButtonTheme theme;

    public ResetZoomButton() {
    }

    /**
     * @see #setPosition(Position)
     */
    public Position getPosition() {
        if (position == null) {
            position = new Position();
        }
        return position;
    }

    /**
     * The position of the button.
     */
    public void setPosition(Position position) {
        this.position = position;
    }

    /**
     * @see #setRelativeTo(ResetZoomButtonRelativeTo)
     */
    public ResetZoomButtonRelativeTo getRelativeTo() {
        return relativeTo;
    }

    /**
     * What frame the button should be placed related to. Can be either "plot"
     * or "chart".
     * 

* Defaults to: plot */ public void setRelativeTo(ResetZoomButtonRelativeTo relativeTo) { this.relativeTo = relativeTo; } /** * @see #setTheme(ButtonTheme) */ public ButtonTheme getTheme() { if (theme == null) { theme = new ButtonTheme(); } return theme; } /** * A collection of attributes for the button. The object takes SVG * attributes like fill, stroke, * stroke-width or r, the border radius. The theme * also supports style, a collection of CSS properties for the * text. Equivalent attributes for the hover state are given in * theme.states.hover. */ public void setTheme(ButtonTheme theme) { this.theme = theme; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy