java.lang.Object
javafx.stage.Window
javafx.stage.PopupWindow
javafx.scene.control.PopupControl
org.tentackle.fx.component.Note
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget,javafx.scene.control.Skinnable
public class Note
extends javafx.scene.control.PopupControl
A note control.
Notes display information related to another linkedNode. Tentackle uses notes to display errors due to bad user input in a linkedNode, e.g. after a ParseException.
Notes display information related to another linkedNode. Tentackle uses notes to display errors due to bad user input in a linkedNode, e.g. after a ParseException.
A note is displayed "nearby" its linkedNode. The default position is to the right side of the linkedNode. However, if there is not enough space left on the screen, the note may be displayed below, left or on top of its linkedNode.
The link between the note and its linkedNode is visualized by a straight line and a circle above the linkedNode's border.
Notes come in 3 categories:
- error (background colored light-red, link red, text red and bold)
- info (standard colors, link green)
- sticky (yellow background, black text, link gray)
- Author:
- harald
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<javafx.scene.Node>Returns the content shown by the pop-over.Properties inherited from class javafx.scene.control.PopupControl
id, maxHeight, maxWidth, minHeight, minWidth, prefHeight, prefWidth, skin, styleProperties 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 -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumdisplay position relative to linked node.static enumThe note type.Nested classes/interfaces inherited from class javafx.scene.control.PopupControl
javafx.scene.control.PopupControl.CSSBridgeNested classes/interfaces inherited from class javafx.stage.PopupWindow
javafx.stage.PopupWindow.AnchorLocation -
Field Summary
Fields inherited from class javafx.scene.control.PopupControl
bridge, USE_COMPUTED_SIZE, USE_PREF_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the fade effect.javafx.beans.property.ObjectProperty<javafx.scene.Node>Returns the content shown by the pop-over.protected javafx.scene.control.Skin<?>javafx.scene.NodeGets the content node displayed by this note.protected URLgetCSS()Gets the CSS URL.Gets the position.javafx.scene.layout.StackPaneGets the root pane of this note.getText()Gets the text shown.getType()Gets the note type.voidsetContentNode(javafx.scene.Node contentNode) Sets the content node displayed by this note.voidsetFadeEffect(long fadeIn, long pause, long fadeOut) Configures an animation to fade-in, pause showing and fade-out again.voidsetPosition(Note.Position position) Sets the position related to the content node.voidSets the text to be shown.voidSets the note type.voidshow(javafx.scene.Node ownerNode) Shows the note popup.Methods inherited from class javafx.scene.control.PopupControl
getClassCssMetaData, getCssMetaData, getId, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getPrefHeight, getPrefWidth, getPseudoClassStates, getSkin, getStyle, getStyleableNode, getStyleableParent, getStyleClass, getTypeSelector, idProperty, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, pseudoClassStateChanged, setId, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setPrefHeight, setPrefSize, setPrefWidth, setSkin, setStyle, skinProperty, stylePropertyMethods 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
-
Property Details
-
contentNode
public javafx.beans.property.ObjectProperty<javafx.scene.Node> contentNodePropertyReturns the content shown by the pop-over.- See Also:
-
-
Constructor Details
-
Note
public Note()
-
-
Method Details
-
setFadeEffect
public void setFadeEffect(long fadeIn, long pause, long fadeOut) Configures an animation to fade-in, pause showing and fade-out again.- Parameters:
fadeIn- time to fade-in in [ms]pause- time to pause showing in [ms]fadeOut- time to fade-out in [ms]
-
clearFadeEffect
public void clearFadeEffect()Clears the fade effect. -
setPosition
Sets the position related to the content node.- Parameters:
position- the position
-
getPosition
Gets the position.- Returns:
- the position
-
setType
Sets the note type.- Parameters:
type- the type
-
getType
Gets the note type.- Returns:
- the type
-
getRootPane
public javafx.scene.layout.StackPane getRootPane()Gets the root pane of this note.- Returns:
- the root pane
-
contentNodeProperty
public javafx.beans.property.ObjectProperty<javafx.scene.Node> contentNodeProperty()Returns the content shown by the pop-over.- See Also:
-
getContentNode
public javafx.scene.Node getContentNode()Gets the content node displayed by this note.- Returns:
- the content node
-
setContentNode
public void setContentNode(javafx.scene.Node contentNode) Sets the content node displayed by this note.- Parameters:
contentNode- the content node
-
show
public void show(javafx.scene.Node ownerNode) Shows the note popup.- Parameters:
ownerNode- the owner node
-
setText
Sets the text to be shown.- Parameters:
text- the text
-
getText
Gets the text shown.- Returns:
- the text
-
createDefaultSkin
protected javafx.scene.control.Skin<?> createDefaultSkin()- Overrides:
createDefaultSkinin classjavafx.scene.control.PopupControl
-
getCSS
Gets the CSS URL.- Returns:
- the URL
-