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

com.vaadin.componentfactory.TooltipPosition Maven / Gradle / Ivy

The newest version!
package com.vaadin.componentfactory;

/**
 * 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