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

      Nested Classes 
      Modifier and Type Class Description
      static class  Note.Position
      display position relative to linked node.
      static class  Note.Type
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.beans.property.ObjectProperty<javafx.scene.Node> contentNodeProperty()
      Returns the content shown by the pop over.
      protected javafx.scene.control.Skin<?> createDefaultSkin()  
      javafx.scene.Node getContentNode()
      Gets the content node displayed by this note.
      Note.Position getPosition()
      Gets the position.
      javafx.scene.layout.StackPane getRootPane()
      Gets the root pane of this note.
      Note.Type getType()
      Gets the note type.
      void setContentNode​(javafx.scene.Node contentNode)
      Sets the content node displayed by this note.
      void setText​(java.lang.String text)
      Sets the text to be shown.
      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
    • Constructor Detail

      • Note

        public Note​(Note.Position position,
                    Note.Type type)
        Creates a note.
        Parameters:
        position - the position
        type - the note type
    • Method Detail

      • createDefaultSkin

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

        public Note.Position getPosition()
        Gets the position.
        Returns:
        the position
      • 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.

        Returns:
        the content linkedNode property
      • 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​(java.lang.String text)
        Sets the text to be shown.
        Parameters:
        text - the text