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
弹窗提示
示例:
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.AnchorLocationNested 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, ownerWindowProperties 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 class AbstractPopupTipsService
root, showingTipsNode, showOnRoot, TIPS_KEYFields inherited from interface TimiFXUI
CSS_FONT, CSS_STYLE, MULTILINGUAL, RESOURCE -
Method Summary
Modifier and TypeMethodDescriptionprotected javafx.scene.layout.StackPane构造根容器static PopupTipsService获取单例对象static PopupTipsLabelinstallBindingText(javafx.scene.Node node, javafx.beans.binding.StringBinding binding) 为组件安装绑定文本弹窗提示static PopupTipsLabelinstallBindingText(javafx.scene.Node node, javafx.beans.property.BooleanProperty when, String then, String otherwise) 为组件安装绑定文本弹窗提示static PopupTipsLabelinstallBindingText(javafx.scene.Node node, javafx.beans.property.StringProperty property) 为组件安装绑定文本弹窗提示static PopupTipsImageinstallImage(javafx.scene.Node node, javafx.scene.image.Image image) 为组件安装图片弹窗提示static PopupTipsLabelinstallText(javafx.scene.Node node, String text) 为组件安装文本弹窗提示static voidinstallTips(javafx.scene.Node node, AbstractPopupTips<?> tips) 为组件安装通用提示Methods inherited from class AbstractPopupTipsService
install, showAndKeepMethods inherited from class javafx.stage.Popup
getContentMethods 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, showMethods 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
-
Method Details
-
createRoot
protected javafx.scene.layout.StackPane createRoot()Description copied from class:AbstractPopupTipsService构造根容器- Specified by:
createRootin classAbstractPopupTipsService<javafx.scene.layout.StackPane>- Returns:
- 根容器
-
getInstance
-
installText
为组件安装文本弹窗提示- 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
为组件安装图片弹窗提示- Parameters:
node- 组件image- 图片- Returns:
- 图片弹出提示
-
installTips
为组件安装通用提示- Parameters:
node- 组件tips- 提示
-