Class Note

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.

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:

  1. error (background colored light-red, link red, text red and bold)
  2. info (standard colors, link green)
  3. sticky (yellow background, black text, link gray)
Author:
harald
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.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, style

    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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    display position relative to linked node.
    static enum 
    The note type.

    Nested classes/interfaces inherited from class javafx.scene.control.PopupControl

    javafx.scene.control.PopupControl.CSSBridge

    Nested 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
    Constructor
    Description
    Creates a note.
    With Note.Position.CENTER and Note.Type.INFO.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears 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.Node
    Gets the content node displayed by this note.
    protected URL
    Gets the CSS URL.
    Gets the position.
    javafx.scene.layout.StackPane
    Gets the root pane of this note.
    Gets the text shown.
    Gets the note type.
    void
    setContentNode(javafx.scene.Node contentNode)
    Sets the content node displayed by this note.
    void
    setFadeEffect(long fadeIn, long pause, long fadeOut)
    Configures an animation to fade-in, pause showing and fade-out again.
    void
    Sets the position related to the content node.
    void
    Sets the text to be shown.
    void
    Sets the note type.
    void
    show(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, styleProperty

    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 java.lang.Object

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

    • contentNode

      public javafx.beans.property.ObjectProperty<javafx.scene.Node> contentNodeProperty
      Returns the content shown by the pop-over.

      See Also:
  • Constructor Details

  • 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

      public void setPosition(Note.Position position)
      Sets the position related to the content node.
      Parameters:
      position - the position
    • getPosition

      public Note.Position getPosition()
      Gets the position.
      Returns:
      the position
    • setType

      public void setType(Note.Type type)
      Sets the note type.
      Parameters:
      type - the type
    • getType

      public Note.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

      public void setText(String text)
      Sets the text to be shown.
      Parameters:
      text - the text
    • getText

      public String getText()
      Gets the text shown.
      Returns:
      the text
    • createDefaultSkin

      protected javafx.scene.control.Skin<?> createDefaultSkin()
      Overrides:
      createDefaultSkin in class javafx.scene.control.PopupControl
    • getCSS

      protected URL getCSS()
      Gets the CSS URL.
      Returns:
      the URL