package com.imyeyu.fx.ui.components.popup.tips;

import javafx.geometry.Insets;
import javafx.scene.control.Label;

/**
 * 文本标签弹出提示
 *
 * @author 夜雨
 * @since 2023-02-13 12:39
 */
public class PopupTipsLabel extends AbstractPopupTips<Label> {

	private static final Insets PADDING_TEXT = new Insets(3, 6, 3, 6);

	/** 默认构造 */
	public PopupTipsLabel() {
		this("");
	}

	/**
	 * 默认构造
	 *
	 * @param text 显示文本
	 */
	public PopupTipsLabel(String text) {
		super(new Label(text));

		Label label = getNode();
		label.setBorder(Stroke.DEFAULT);
		label.setPadding(PADDING_TEXT);
		label.setWrapText(true);
		label.setMaxWidth(520);
		label.setBackground(BG.DEFAULT);
	}
}
