Class PopupTipsService

java.lang.Object
javafx.stage.Window
javafx.stage.PopupWindow
javafx.stage.Popup
com.imyeyu.fx.ui.components.popup.AbstractPopupTipsService<javafx.scene.layout.StackPane>
com.imyeyu.fx.ui.components.popup.PopupTipsService
All Implemented Interfaces:
TimiFXUI, javafx.event.EventTarget

public final class PopupTipsService extends AbstractPopupTipsService<javafx.scene.layout.StackPane>
弹窗提示

示例:

    PopupTipsService.installText(node, "文本提示");
    PopupTipsService.installImage(node, new Image("/tips.png")); // 图片提示
    PopupTipsService.install(node, new AbstractPopupTips<>(new Button("自定义组件提示")));
Since:
2021-04-22 19:48
Author:
夜雨
  • Nested Class Summary

    Nested classes/interfaces inherited from class javafx.stage.PopupWindow

    javafx.stage.PopupWindow.AnchorLocation

    Nested classes/interfaces inherited from interface TimiFXUI

    TimiFXUI.BG, TimiFXUI.Colorful, TimiFXUI.CSS, TimiFXUI.Shadow, TimiFXUI.Stroke
  • Property Summary

    Properties inherited from class javafx.stage.PopupWindow

    anchorLocation, anchorX, anchorY, autoFix, autoHide, consumeAutoHidingEvents, hideOnEscape, onAutoHide, ownerNode, ownerWindow

    Properties inherited from class javafx.stage.Window

    eventDispatcher, focused, forceIntegerRenderScale, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, opacity, outputScaleX, outputScaleY, renderScaleX, renderScaleY, scene, showing, width, x, y
  • Field Summary

    Fields inherited from interface TimiFXUI

    CSS_FONT, CSS_STYLE, MULTILINGUAL, RESOURCE
  • Method Summary

    Modifier and Type
    Method
    Description
    protected javafx.scene.layout.StackPane
    构造根容器
    获取单例对象
    installBindingText(javafx.scene.Node node, javafx.beans.binding.StringBinding binding)
    为组件安装绑定文本弹窗提示
    installBindingText(javafx.scene.Node node, javafx.beans.property.BooleanProperty when, String then, String otherwise)
    为组件安装绑定文本弹窗提示
    installBindingText(javafx.scene.Node node, javafx.beans.property.StringProperty property)
    为组件安装绑定文本弹窗提示
    installImage(javafx.scene.Node node, javafx.scene.image.Image image)
    为组件安装图片弹窗提示
    installText(javafx.scene.Node node, String text)
    为组件安装文本弹窗提示
    static void
    installTips(javafx.scene.Node node, AbstractPopupTips<?> tips)
    为组件安装通用提示

    Methods inherited from class AbstractPopupTipsService

    install, showAndKeep

    Methods inherited from class javafx.stage.Popup

    getContent

    Methods inherited from class javafx.stage.PopupWindow

    anchorLocationProperty, anchorXProperty, anchorYProperty, autoFixProperty, autoHideProperty, consumeAutoHidingEventsProperty, getAnchorLocation, getAnchorX, getAnchorY, getConsumeAutoHidingEvents, getOnAutoHide, getOwnerNode, getOwnerWindow, hide, hideOnEscapeProperty, isAutoFix, isAutoHide, isHideOnEscape, onAutoHideProperty, ownerNodeProperty, ownerWindowProperty, setAnchorLocation, setAnchorX, setAnchorY, setAutoFix, setAutoHide, setConsumeAutoHidingEvents, setHideOnEscape, setOnAutoHide, setScene, show, show, show

    Methods inherited from class javafx.stage.Window

    addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, forceIntegerRenderScaleProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getOutputScaleX, getOutputScaleY, getProperties, getRenderScaleX, getRenderScaleY, getScene, getUserData, getWidth, getWindows, getX, getY, hasProperties, heightProperty, isFocused, isForceIntegerRenderScale, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, outputScaleXProperty, outputScaleYProperty, removeEventFilter, removeEventHandler, renderScaleXProperty, renderScaleYProperty, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setForceIntegerRenderScale, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setRenderScaleX, setRenderScaleY, setUserData, setWidth, setX, setY, show, showingProperty, sizeToScene, widthProperty, xProperty, yProperty

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • createRoot

      protected javafx.scene.layout.StackPane createRoot()
      Description copied from class: AbstractPopupTipsService
      构造根容器
      Specified by:
      createRoot in class AbstractPopupTipsService<javafx.scene.layout.StackPane>
      Returns:
      根容器
    • getInstance

      public static PopupTipsService getInstance()
      获取单例对象
      Returns:
      单例对象
    • installText

      public static PopupTipsLabel installText(javafx.scene.Node node, String text)
      为组件安装文本弹窗提示
      Parameters:
      node - 组件
      text - 图片
      Returns:
      标签弹出提示
    • installBindingText

      public static PopupTipsLabel installBindingText(javafx.scene.Node node, javafx.beans.property.StringProperty property)
      为组件安装绑定文本弹窗提示
      Parameters:
      node - 组件
      property - 文本绑定属性
      Returns:
      标签弹出提示
    • installBindingText

      public static PopupTipsLabel installBindingText(javafx.scene.Node node, javafx.beans.binding.StringBinding binding)
      为组件安装绑定文本弹窗提示
      Parameters:
      node - 组件
      binding - 文本绑定属性
      Returns:
      标签弹出提示
    • installBindingText

      public static PopupTipsLabel installBindingText(javafx.scene.Node node, javafx.beans.property.BooleanProperty when, String then, String otherwise)
      为组件安装绑定文本弹窗提示
      Parameters:
      node - 组件
      when - 条件
      then - 条件 true 时显示文本
      otherwise - 条件 false 时显示文本
      Returns:
      标签弹出提示
    • installImage

      public static PopupTipsImage installImage(javafx.scene.Node node, javafx.scene.image.Image image)
      为组件安装图片弹窗提示
      Parameters:
      node - 组件
      image - 图片
      Returns:
      图片弹出提示
    • installTips

      public static void installTips(javafx.scene.Node node, AbstractPopupTips<?> tips)
      为组件安装通用提示
      Parameters:
      node - 组件
      tips - 提示