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

com.vaadin.flow.component.incubator.TooltipPosition Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.vaadin.flow.component.incubator;

/**
 * Helper enumeration to specify the position of the Tooltip.
 * Position determines if the tooltip will be positioned on the top, bottom,
 * left or right of the attached component.
 */
public enum TooltipPosition {
    TOP("top"),
    RIGHT("right"),
    LEFT("left"),
    BOTTOM("bottom");

    private String pos;

    TooltipPosition(String pos) {
        this.pos = pos;
    }

    public String getPositionText() {
        return pos;
    }

    public static TooltipPosition getPosition(String text) {
        for (TooltipPosition position : TooltipPosition.values()) {
            if (position.getPositionText().equals(text)) {
                return position;
            }
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy