Class FxDialogPane

  • All Implemented Interfaces:
    javafx.css.Styleable, javafx.event.EventTarget, FxContainer, FxControl

    public class FxDialogPane
    extends javafx.scene.control.DialogPane
    implements FxContainer
    Extended DialogPane.
    Author:
    harald
    • Field Summary

      • Fields inherited from class javafx.scene.layout.Region

        USE_COMPUTED_SIZE, USE_PREF_SIZE
      • Fields inherited from class javafx.scene.Node

        BASELINE_OFFSET_SAME_AS_HEIGHT
    • Constructor Summary

      Constructors 
      Constructor Description
      FxDialogPane()
      Creates a new DialogPane instance with a style class of 'dialog-pane'.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addModelToViewListener​(ModelToViewListener listener)
      Adds a model-to-view listener.
      The listener will be invoked before the binding operation.
      If the control is a container, the listener will be invoked if any of the container's components get updated.
      void addViewToModelListener​(ViewToModelListener listener)
      Adds a view-to-model listener.
      The listener will be invoked after the binding operation.
      If the control is a container, the listener will be invoked if any of the container's components update the model.
      javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()
      Gets the changaeble property.
      void clearErrors()
      Clears all error messages in all components.
      protected FxDialogPaneDelegate createDelegate()
      Creates the delegate.
      javafx.collections.ObservableList<?> getComponents()
      Gets the fx components maintained by this container.
      FxController getController()
      Gets the controller of this container.
      <C extends FxController>
      C
      getController​(java.lang.Class<C> clazz)
      Gets the controller along the parent hierarchy that is an instanceof the given class.
      FxDialogPaneDelegate getDelegate()
      Gets the lazily created component delegate.
      java.lang.String getHelpUrl()
      Gets the online-help URL.
      FxContainer getParentContainer()
      Gets the parent container.
      void invalidateSavedView()
      Invalidates the saved view.
      boolean isBindable()
      Determines whether this container is bindable.
      boolean isChangeable()
      Returns if this control is changeable.
      boolean isContainerChangeableIgnored()
      Returns whether setContainerChangeable is ignored by this control.
      boolean isViewModified()
      Returns whether the user has modified the view since the last FxControl.updateView().
      void removeModelToViewListener​(ModelToViewListener listener)
      Removes a model-to-view listener.
      void removeViewToModelListener​(ViewToModelListener listener)
      Removes a view-to-model listener.
      void saveView()
      Creates a copy of the value shown to the user.
      void setBindable​(boolean bindable)
      Sets whether this control is bindable, i.e.
      void setChangeable​(boolean changeable)
      Set the control to be changeable.
      This is a unified abstraction and will be translated to setEditable or setDisabled, whatever is appropriate to this control.
      void setContainerChangableIgnored​(boolean containerChangeableIgnored)
      Sets whether to ignore setContainerChangeable.
      void setContainerChangeable​(boolean containerChangeable)
      Invoked when setChangeable() is invoked on the container of this component.
      void setController​(FxController controller)
      Sets the controller of this container.
      void setHelpUrl​(java.lang.String helpUrl)
      Sets the online-help URL.
      If a help url is set, a browser will be launched to show that url if there is no help url for the control the help was requested for.
      void setViewModified​(boolean viewModified)
      Sets whether the view has been modified.
      void showHelp()
      Displays online help if configured.
      java.lang.String toGenericString()
      Returns the classname plus optional fx:id.
      void triggerViewModified()
      Walks up the component hierarchy and updates the viewModified property.
      This is done by comparing the saved view value with the current view.
      void updateModel()
      Updates the model according to the view.
      void updateView()
      Updates the view according to the model.
      void updateViewNonFocused()
      Updates the view according to the model.
      The method is the same as FxControl.updateView() but skips any focused component.
      javafx.beans.property.BooleanProperty viewModifiedProperty()
      Gets the viewModified property.
      • Methods inherited from class javafx.scene.control.DialogPane

        computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contentProperty, contentTextProperty, createButton, createButtonBar, createDetailsButton, expandableContentProperty, expandedProperty, getButtonTypes, getClassCssMetaData, getContent, getContentText, getCssMetaData, getExpandableContent, getGraphic, getHeader, getHeaderText, graphicProperty, headerProperty, headerTextProperty, isExpanded, layoutChildren, lookupButton, setContent, setContentText, setExpandableContent, setExpanded, setGraphic, setHeader, setHeaderText
      • Methods inherited from class javafx.scene.layout.Pane

        getChildren
      • Methods inherited from class javafx.scene.layout.Region

        backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
      • Methods inherited from class javafx.scene.Parent

        getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
      • Methods inherited from class javafx.scene.Node

        accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javafx.css.Styleable

        getStyleableNode
    • Constructor Detail

      • FxDialogPane

        public FxDialogPane()
        Creates a new DialogPane instance with a style class of 'dialog-pane'.
    • Method Detail

      • createDelegate

        protected FxDialogPaneDelegate createDelegate()
        Creates the delegate.
        Returns:
        the delegate
      • getParentContainer

        public FxContainer getParentContainer()
        Description copied from interface: FxControl
        Gets the parent container.
        Specified by:
        getParentContainer in interface FxControl
        Returns:
        the parent, null if not a component of a container
      • getComponents

        public javafx.collections.ObservableList<?> getComponents()
        Description copied from interface: FxContainer
        Gets the fx components maintained by this container.
        Specified by:
        getComponents in interface FxContainer
        Returns:
        list of components
      • setChangeable

        public void setChangeable​(boolean changeable)
        Description copied from interface: FxControl
        Set the control to be changeable.
        This is a unified abstraction and will be translated to setEditable or setDisabled, whatever is appropriate to this control.
        Specified by:
        setChangeable in interface FxControl
        Parameters:
        changeable - true the user can edit the data, false if show only
      • isChangeable

        public boolean isChangeable()
        Description copied from interface: FxControl
        Returns if this control is changeable.
        Specified by:
        isChangeable in interface FxControl
        Returns:
        true the user can edit the data, false if show only
      • setContainerChangeable

        public void setContainerChangeable​(boolean containerChangeable)
        Description copied from interface: FxControl
        Invoked when setChangeable() is invoked on the container of this component.
        Specified by:
        setContainerChangeable in interface FxControl
        Parameters:
        containerChangeable - true if container is changeable, false if all components readonly
      • setContainerChangableIgnored

        public void setContainerChangableIgnored​(boolean containerChangeableIgnored)
        Description copied from interface: FxControl
        Sets whether to ignore setContainerChangeable.
        Specified by:
        setContainerChangableIgnored in interface FxControl
        Parameters:
        containerChangeableIgnored - true if ignore, default is false
      • isContainerChangeableIgnored

        public boolean isContainerChangeableIgnored()
        Description copied from interface: FxControl
        Returns whether setContainerChangeable is ignored by this control.
        Specified by:
        isContainerChangeableIgnored in interface FxControl
        Returns:
        true if ignore
      • changeableProperty

        public javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()
        Description copied from interface: FxControl
        Gets the changaeble property.
        Specified by:
        changeableProperty in interface FxControl
        Returns:
        the property
      • updateView

        public void updateView()
        Description copied from interface: FxControl
        Updates the view according to the model.
        Specified by:
        updateView in interface FxControl
      • updateModel

        public void updateModel()
        Description copied from interface: FxControl
        Updates the model according to the view.
        Specified by:
        updateModel in interface FxControl
      • saveView

        public void saveView()
        Description copied from interface: FxControl
        Creates a copy of the value shown to the user.
        Specified by:
        saveView in interface FxControl
      • invalidateSavedView

        public void invalidateSavedView()
        Description copied from interface: FxControl
        Invalidates the saved view.
        Specified by:
        invalidateSavedView in interface FxControl
      • triggerViewModified

        public void triggerViewModified()
        Description copied from interface: FxControl
        Walks up the component hierarchy and updates the viewModified property.
        This is done by comparing the saved view value with the current view.
        Specified by:
        triggerViewModified in interface FxControl
      • setViewModified

        public void setViewModified​(boolean viewModified)
        Description copied from interface: FxControl
        Sets whether the view has been modified.
        Specified by:
        setViewModified in interface FxControl
        Parameters:
        viewModified - true if user has modified the visual representation
      • isViewModified

        public boolean isViewModified()
        Description copied from interface: FxControl
        Returns whether the user has modified the view since the last FxControl.updateView().
        Specified by:
        isViewModified in interface FxControl
        Returns:
        true if user changed the visual representation
      • viewModifiedProperty

        public javafx.beans.property.BooleanProperty viewModifiedProperty()
        Description copied from interface: FxControl
        Gets the viewModified property.
        Specified by:
        viewModifiedProperty in interface FxControl
        Returns:
        the property
      • setBindable

        public void setBindable​(boolean bindable)
        Description copied from interface: FxControl
        Sets whether this control is bindable, i.e. should be checked within a binding hierarchy.
        Specified by:
        setBindable in interface FxControl
        Parameters:
        bindable - true if bindable, else not eligible for the binding process
      • isBindable

        public boolean isBindable()
        Description copied from interface: FxControl
        Determines whether this container is bindable.
        Specified by:
        isBindable in interface FxControl
        Returns:
        true if bindable, else not eligible for the binding process
      • setHelpUrl

        public void setHelpUrl​(java.lang.String helpUrl)
        Description copied from interface: FxControl
        Sets the online-help URL.
        If a help url is set, a browser will be launched to show that url if there is no help url for the control the help was requested for.
        Specified by:
        setHelpUrl in interface FxControl
        Parameters:
        helpUrl - the help url
      • getHelpUrl

        public java.lang.String getHelpUrl()
        Description copied from interface: FxControl
        Gets the online-help URL.
        Specified by:
        getHelpUrl in interface FxControl
        Returns:
        the help url, default is null
      • showHelp

        public void showHelp()
        Description copied from interface: FxControl
        Displays online help if configured.
        Specified by:
        showHelp in interface FxControl
      • toGenericString

        public java.lang.String toGenericString()
        Description copied from interface: FxControl
        Returns the classname plus optional fx:id.
        Specified by:
        toGenericString in interface FxControl
        Returns:
        the generic string for diagnostics and logging
      • clearErrors

        public void clearErrors()
        Description copied from interface: FxContainer
        Clears all error messages in all components.
        Specified by:
        clearErrors in interface FxContainer
      • getController

        public FxController getController()
        Description copied from interface: FxContainer
        Gets the controller of this container.
        Specified by:
        getController in interface FxContainer
        Returns:
        the controller, null if nested container without a controller
      • setController

        public void setController​(FxController controller)
        Description copied from interface: FxContainer
        Sets the controller of this container.
        Specified by:
        setController in interface FxContainer
        Parameters:
        controller - the controller, null if nested container without a controller
      • getController

        public <C extends FxController> C getController​(java.lang.Class<C> clazz)
        Description copied from interface: FxContainer
        Gets the controller along the parent hierarchy that is an instanceof the given class.
        Specified by:
        getController in interface FxContainer
        Type Parameters:
        C - the controller type
        Parameters:
        clazz - the controller class
        Returns:
        the controller, null if no such controller
      • addModelToViewListener

        public void addModelToViewListener​(ModelToViewListener listener)
        Description copied from interface: FxControl
        Adds a model-to-view listener.
        The listener will be invoked before the binding operation.
        If the control is a container, the listener will be invoked if any of the container's components get updated.
        Specified by:
        addModelToViewListener in interface FxControl
        Parameters:
        listener - the value listener to add
      • addViewToModelListener

        public void addViewToModelListener​(ViewToModelListener listener)
        Description copied from interface: FxControl
        Adds a view-to-model listener.
        The listener will be invoked after the binding operation.
        If the control is a container, the listener will be invoked if any of the container's components update the model.
        Specified by:
        addViewToModelListener in interface FxControl
        Parameters:
        listener - the value listener to add