Class DialogPane
- All Implemented Interfaces:
LayoutMeasurable,LayoutMeasurableMixin,HasBackgroundProperty,HasBlendModeProperty,HasBorderProperty,HasClipProperty,HasEffectProperty,HasHeightProperty,HasLayoutXProperty,HasLayoutYProperty,HasManagedProperty,HasMaxHeightProperty,HasMaxWidthProperty,HasMinHeightProperty,HasMinWidthProperty,HasMouseTransparentProperty,HasOnMouseClickedProperty,HasOpacityProperty,HasPaddingProperty,HasParentProperty,HasPrefHeightProperty,HasPrefWidthProperty,HasSnapToPixelProperty,HasVisibleProperty,HasWidthProperty,Styleable,EventTarget,INode,PreferenceResizableNode
Dialog instance. In this role, the DialogPane is responsible for the
placement of headers, graphics,
content, and buttons.
The default implementation of DialogPane (that is, the DialogPane class itself)
handles the layout via the normal layoutChildren() method. This
method may be overridden by subclasses wishing to handle the layout in an
alternative fashion).
In addition to the header and
content properties, there exists
header text and
content text properties. The way the *Text
properties work is that they are a lower precedence compared to the Node
properties, but they are far more convenient for developers in the common case,
as it is likely the case that a developer more often than not simply wants to
set a string value into the header or content areas of the DialogPane.
It is important to understand the implications of setting non-null values
in the header and headerText
properties. The key points are as follows:
- The
headerproperty takes precedence over theheaderTextproperty, so if both are set to non-null values,headerwill be used andheaderTextwill be ignored. - If
headerTextis set to a non-null value, and agraphichas also been set, the default position for the graphic shifts from being located to the left of the content area to being to the right of the header text. - If
headeris set to a non-null value, and agraphichas also been set, the graphic is removed from its default position (to the left of the content area), and is not placed to the right of the custom header node. If the graphic is desired, it should be manually added in to the layout of the custom header node manually.
DialogPane operates on the concept of ButtonType. A ButtonType is
a descriptor of a single button that should be represented visually in the
DialogPane. Developers who create a DialogPane therefore must specify the
button types that they want to display, and this is done via the
getButtonTypes() method, which returns a modifiable
ObservableList, which users can add to and remove from as desired.
The ButtonType class defines a number of pre-defined button types,
such as ButtonType.OK and ButtonType.CANCEL. Many users of the
JavaFX dialogs API will find that these pre-defined button types meet their
needs, particularly due to their built-in support for
default and
cancel buttons, as well as the benefit of
the strings being translated into all languages which JavaFX is translated to.
For users that want to define their own ButtonType (most commonly to
define a button with custom text), they may do so via the constructors available
on the ButtonType class.
Developers will quickly find that the amount of configurability offered
via the ButtonType class is minimal. This is intentional, but does not
mean that developers can not modify the buttons created by the ButtonType
that have been specified. To do this, developers simply call the
lookupButton(ButtonType) method with the ButtonType (assuming it has
already been set in the getButtonTypes() list. The returned Node is
typically of type Button, but this depends on if the
createButton(ButtonType) method has been overridden.
The DialogPane class offers a few methods that can be overridden by subclasses, to more easily enable custom functionality. These methods include the following:
These methods are documented, so please take note of the expectations placed on any developer who wishes to override these methods with their own functionality.
- Since:
- JavaFX 8u40
- See Also:
-
Property Summary
PropertiesTypePropertyDescriptionfinal ObjectProperty<Node>Property representing the content area of the dialog.A property representing the content text for the dialog pane.final ObjectProperty<Node>A property that represents the dialog expandable content area.Represents whether the dialogPane is expanded.final ObjectProperty<Node>The dialog graphic, presented either in the header, if one is showing, or to the left of thecontent.final ObjectProperty<Node>Property representing the header area of the dialog pane.A property representing the header text for the dialog pane.Properties inherited from class javafx.scene.layout.Region
background, border, height, insets, maxHeight, maxWidth, minHeight, minWidth, padding, prefHeight, prefWidth, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties inherited from class javafx.scene.Node
blendMode, cacheHint, cache, clip, cursor, disabled, disable, effect, eventDispatcher, focused, focusTraversable, hover, id, layoutBounds, layoutX, layoutY, managed, mouseTransparent, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onScroll, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, opacity, parent, pressed, rotate, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, visibleProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBlendModeProperty
blendModeProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasClipProperty
clipProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasEffectProperty
effectProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutXProperty
layoutXProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutYProperty
layoutYProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasManagedProperty
managedProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMouseTransparentProperty
mouseTransparentProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOnMouseClickedProperty
onMouseClickedProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOpacityProperty
opacityProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasParentProperty
parentProperties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasVisibleProperty
visible -
Field Summary
Fields inherited from interface javafx.scene.INode
BASELINE_OFFSET_SAME_AS_HEIGHTFields inherited from interface javafx.scene.layout.PreferenceResizableNode
USE_COMPUTED_SIZE, USE_PREF_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DialogPane instance with a style class of 'dialog-pane'. -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecomputeMinHeight(double width) Computes the minimum height of this region.protected doublecomputeMinWidth(double height) Computes the minimum width of this region.protected doublecomputePrefHeight(double width) Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.protected doublecomputePrefWidth(double height) Computes the preferred width of this region for the given height.final ObjectProperty<Node>Property representing the content area of the dialog.A property representing the content text for the dialog pane.protected NodecreateButton(ButtonType buttonType) This method can be overridden by subclasses to create a custom button that will subsequently inserted into the DialogPane button area (created via thecreateButtonBar()method, but mostly commonly it is an instance ofButtonBar.protected NodeThis method can be overridden by subclasses to provide the button bar.protected NodeThis method can be overridden by subclasses to create a custom details button.final ObjectProperty<Node>A property that represents the dialog expandable content area.Represents whether the dialogPane is expanded.final ObservableList<ButtonType>Observable list of button types used for the dialog button bar area (created via thecreateButtonBar()method).final NodeReturns the dialog content as a Node (even if it was set as a String usingsetContentText(String)- this was simply transformed into aNode(most probably aLabel).final StringReturns the currently-set content text for this DialogPane.final NodeReturns the dialog expandable content node, if one is set, or null otherwise.final NodeGets the value of thegraphicproperty.final NodeNode which acts as the dialog pane header.final StringReturns the currently-set header text for this DialogPane.final ObjectProperty<Node>The dialog graphic, presented either in the header, if one is showing, or to the left of thecontent.final ObjectProperty<Node>Property representing the header area of the dialog pane.A property representing the header text for the dialog pane.final booleanReturns whether or not the dialogPane is expanded.protected voidInvoked during the layout pass to layout the children in thisParent.final NodelookupButton(ButtonType buttonType) This method provides a way in which developers may retrieve the actual Node for a givenButtonType(assuming it is part of thebutton typeslist).voidRequests a layout pass to be performed before the next scene is rendered.final voidsetContent(Node content) Assign dialog content.final voidsetContentText(String contentText) Sets the string to show in the dialog content area.final voidsetExpandableContent(Node content) Sets the dialog expandable content node, or null if no expandable content needs to be shown.final voidsetExpanded(boolean value) Sets whether the dialogPane is expanded.final voidsetGraphic(Node graphic) Sets the dialog graphic, which will be displayed either in the header, if one is showing, or to the left of thecontent.final voidAssigns the dialog pane header.final voidsetHeaderText(String headerText) Sets the string to show in the dialog header area.Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, boundedSize, computeMaxHeight, computeMaxWidth, getInsets, heightProperty, impl_computeGeomBounds, impl_computeLayoutBounds, impl_maxHeight, impl_maxWidth, impl_minHeight, impl_minWidth, impl_prefHeight, impl_prefWidth, insetsProperty, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, paddingProperty, positionInArea, positionInArea, prefHeightProperty, prefWidthProperty, resize, setMaxSize, setMinSize, setPrefSize, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class javafx.scene.Parent
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, isNeedsLayout, layout, needsLayoutProperty, requestParentLayout, setLayoutFlag, setNeedsLayout, setSceneRootMethods inherited from class javafx.scene.Node
addEventFilter, addEventHandler, autosize, blendModeProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, createLayoutMeasurable, cursorProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAllNodeTransforms, getBoundsInLocal, getCacheHint, getCursor, getEventDispatcher, getId, getLayoutMeasurable, getNodePeer, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseDragged, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnScroll, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOrCreateAndBindNodePeer, getProperties, getRotate, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleClass, getTransforms, getTranslateX, getTranslateY, getUserData, hasProperties, hoverProperty, idProperty, impl_getLayoutBounds, impl_isTreeVisible, impl_traverse, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isPressed, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToScene, localToScene, localToScreen, localToScreen, localToScreen, localToScreen, managedProperty, mouseTransparentProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDraggedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onNodePeerReady, onPeerSizeChanged, onScrollProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, opacityProperty, parentProperty, parentToLocal, pressedProperty, removeEventFilter, removeEventHandler, requestFocus, requestPeerFocus, rotateProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, setCache, setCacheHint, setCursor, setDisable, setDisabled, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setNodePeer, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseDragged, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnScroll, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setPressed, setRotate, setScaleX, setScaleY, setScaleZ, setScene, setStyle, setTranslateX, setTranslateY, setUserData, shouldUseLayoutMeasurable, snapshot, startDragAndDrop, styleProperty, toBack, toFront, translateXProperty, translateYProperty, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBackgroundProperty
getBackground, setBackgroundMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBlendModeProperty
blendModeProperty, getBlendMode, setBlendModeMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBorderProperty
getBorder, setBorderMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasClipProperty
clipProperty, getClip, setClipMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasEffectProperty
effectProperty, getEffect, setEffectMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasHeightProperty
getHeight, setHeightMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutXProperty
getLayoutX, layoutXProperty, setLayoutXMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutYProperty
getLayoutY, layoutYProperty, setLayoutYMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasManagedProperty
isManaged, managedProperty, setManagedMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMaxHeightProperty
getMaxHeight, setMaxHeightMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMaxWidthProperty
getMaxWidth, setMaxWidthMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMinHeightProperty
getMinHeight, setMinHeightMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMinWidthProperty
getMinWidth, setMinWidthMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMouseTransparentProperty
isMouseTransparent, mouseTransparentProperty, setMouseTransparentMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOnMouseClickedProperty
getOnMouseClicked, onMouseClickedProperty, setOnMouseClickedMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOpacityProperty
getOpacity, opacityProperty, setOpacityMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasPaddingProperty
getPadding, setPaddingMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasParentProperty
getParent, parentProperty, setParentMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasPrefHeightProperty
getPrefHeight, setPrefHeightMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasPrefWidthProperty
getPrefWidth, setPrefWidthMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasSnapToPixelProperty
isSnapToPixel, setSnapToPixelMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasVisibleProperty
isVisible, setVisible, visiblePropertyMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasWidthProperty
getWidth, setWidthMethods inherited from interface javafx.scene.INode
autosize, getAllNodeTransforms, getBaselineOffset, getContentBias, getNodePeer, getOrCreateAndBindNodePeer, getProperties, getScene, getTransforms, hasProperties, relocate, resizeRelocateMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.emul_coupling.LayoutMeasurableMixin
clearCache, getLayoutBounds, getLayoutMeasurable, maxHeight, maxWidth, minHeight, minWidth, prefHeight, prefWidthMethods inherited from interface javafx.scene.layout.PreferenceResizableNode
isResizable
-
Property Details
-
graphic
The dialog graphic, presented either in the header, if one is showing, or to the left of thecontent.- See Also:
-
header
Property representing the header area of the dialog pane. Note that if this header is set to a non-null value, that it will take up the entire top area of the DialogPane. It will also result in the DialogPane switching its layout to the 'header' layout - as outlined in theDialogPaneclass javadoc.- See Also:
-
headerText
A property representing the header text for the dialog pane. The header text is lower precedence than theheader node, meaning that if both the header node and the headerText properties are set, the header text will not be displayed in a default DialogPane instance.When headerText is set to a non-null value, this will result in the DialogPane switching its layout to the 'header' layout - as outlined in the
DialogPaneclass javadoc. -
content
Property representing the content area of the dialog.- See Also:
-
contentText
A property representing the content text for the dialog pane. The content text is lower precedence than thecontent node, meaning that if both the content node and the contentText properties are set, the content text will not be displayed in a default DialogPane instance. -
expandableContent
A property that represents the dialog expandable content area. Any Node can be placed in this area, but it will only be shown when the user clicks the 'Show Details' expandable button. This button will be added automatically when the expandable content property is non-null. -
expanded
Represents whether the dialogPane is expanded.- See Also:
-
-
Constructor Details
-
DialogPane
public DialogPane()Creates a new DialogPane instance with a style class of 'dialog-pane'.
-
-
Method Details
-
graphicProperty
The dialog graphic, presented either in the header, if one is showing, or to the left of thecontent.- Returns:
- An ObjectProperty wrapping the current graphic.
- See Also:
-
getGraphic
Gets the value of thegraphicproperty.- Property description:
- The dialog graphic, presented either in the header, if one is showing, or
to the left of the
content. - Returns:
- the value of the
graphicproperty - See Also:
-
setGraphic
Sets the dialog graphic, which will be displayed either in the header, if one is showing, or to the left of thecontent.- Parameters:
graphic- The new dialog graphic, or null if no graphic should be shown.
-
getHeader
Node which acts as the dialog pane header.- Returns:
- the header of the dialog pane.
-
setHeader
Assigns the dialog pane header. Any Node can be used.- Parameters:
header- The new header of the DialogPane.
-
headerProperty
Property representing the header area of the dialog pane. Note that if this header is set to a non-null value, that it will take up the entire top area of the DialogPane. It will also result in the DialogPane switching its layout to the 'header' layout - as outlined in theDialogPaneclass javadoc.- Returns:
- the
headerproperty - See Also:
-
setHeaderText
Sets the string to show in the dialog header area. Note that the header text is lower precedence than theheader node, meaning that if both the header node and the headerText properties are set, the header text will not be displayed in a default DialogPane instance.When headerText is set to a non-null value, this will result in the DialogPane switching its layout to the 'header' layout - as outlined in the
DialogPaneclass javadoc. -
getHeaderText
Returns the currently-set header text for this DialogPane. -
headerTextProperty
A property representing the header text for the dialog pane. The header text is lower precedence than theheader node, meaning that if both the header node and the headerText properties are set, the header text will not be displayed in a default DialogPane instance.When headerText is set to a non-null value, this will result in the DialogPane switching its layout to the 'header' layout - as outlined in the
DialogPaneclass javadoc.- Returns:
- the
headerTextproperty - See Also:
-
getContent
Returns the dialog content as a Node (even if it was set as a String usingsetContentText(String)- this was simply transformed into aNode(most probably aLabel).- Returns:
- dialog's content
-
setContent
Assign dialog content. Any Node can be used- Parameters:
content- dialog's content
-
contentProperty
Property representing the content area of the dialog.- Returns:
- the
contentproperty - See Also:
-
setContentText
Sets the string to show in the dialog content area. Note that the content text is lower precedence than thecontent node, meaning that if both the content node and the contentText properties are set, the content text will not be displayed in a default DialogPane instance. -
getContentText
Returns the currently-set content text for this DialogPane. -
contentTextProperty
A property representing the content text for the dialog pane. The content text is lower precedence than thecontent node, meaning that if both the content node and the contentText properties are set, the content text will not be displayed in a default DialogPane instance.- Returns:
- the
contentTextproperty - See Also:
-
expandableContentProperty
A property that represents the dialog expandable content area. Any Node can be placed in this area, but it will only be shown when the user clicks the 'Show Details' expandable button. This button will be added automatically when the expandable content property is non-null.- Returns:
- the
expandableContentproperty - See Also:
-
getExpandableContent
Returns the dialog expandable content node, if one is set, or null otherwise. -
setExpandableContent
Sets the dialog expandable content node, or null if no expandable content needs to be shown. -
expandedProperty
Represents whether the dialogPane is expanded.- Returns:
- the
expandedproperty - See Also:
-
isExpanded
public final boolean isExpanded()Returns whether or not the dialogPane is expanded.- Returns:
- true if dialogPane is expanded.
-
setExpanded
public final void setExpanded(boolean value) Sets whether the dialogPane is expanded. This only makes sense when there isexpandable contentto show.- Parameters:
value- true if dialogPane should be expanded.
-
getButtonTypes
Observable list of button types used for the dialog button bar area (created via thecreateButtonBar()method). Modifying the contents of this list will immediately change the buttons displayed to the user within the dialog pane.- Returns:
- The
ObservableListofbutton typesavailable to the user.
-
lookupButton
This method provides a way in which developers may retrieve the actual Node for a givenButtonType(assuming it is part of thebutton typeslist).- Parameters:
buttonType- TheButtonTypefor which a Node representation is requested.- Returns:
- The Node used to represent the button type, as created by
createButton(ButtonType), and only if the button type is part of thebutton typeslist, otherwise null.
-
createButtonBar
This method can be overridden by subclasses to provide the button bar. Note that by overriding this method, the developer must take on multiple responsibilities:- The developer must immediately iterate through all
button typesand callcreateButton(ButtonType)for each of them in turn. - The developer must add a listener to the
button typeslist, and when this list changes update the button bar as appropriate. - Similarly, the developer must watch for changes to the
expandable contentproperty, adding and removing the details button (created viacreateDetailsButton()method).
The default implementation of this method creates and returns a new
ButtonBarinstance. - The developer must immediately iterate through all
-
createButton
This method can be overridden by subclasses to create a custom button that will subsequently inserted into the DialogPane button area (created via thecreateButtonBar()method, but mostly commonly it is an instance ofButtonBar.- Parameters:
buttonType- TheButtonTypeto create a button from.- Returns:
- A JavaFX
Nodethat represents the givenButtonType, most commonly an instance ofButton.
-
createDetailsButton
This method can be overridden by subclasses to create a custom details button.To override this method you must do two things:
- The button will need to have its own code set to handle mouse / keyboard
interaction and to toggle the state of the
expandedproperty. - If your button changes its visuals based on whether the dialog pane
is expanded or collapsed, you should add a listener to the
expandedproperty, so that you may update the button visuals.
- The button will need to have its own code set to handle mouse / keyboard
interaction and to toggle the state of the
-
layoutChildren
protected void layoutChildren()Invoked during the layout pass to layout the children in thisParent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.Subclasses should override this function to layout content as needed.
- Overrides:
layoutChildrenin classParent
-
computeMinWidth
protected double computeMinWidth(double height) Computes the minimum width of this region. Returns the sum of the left and right insets by default. region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.- Overrides:
computeMinWidthin classRegion- Parameters:
height- the height that should be used if min width depends on it- Returns:
- the computed minimum width of this region
-
computeMinHeight
protected double computeMinHeight(double width) Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.- Overrides:
computeMinHeightin classRegion- Parameters:
width- the width that should be used if min height depends on it- Returns:
- the computed minimum height for this region
-
computePrefWidth
protected double computePrefWidth(double height) Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.- Overrides:
computePrefWidthin classRegion- Parameters:
height- the height that should be used if preferred width depends on it- Returns:
- the computed preferred width for this region
-
computePrefHeight
protected double computePrefHeight(double width) Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.- Overrides:
computePrefHeightin classRegion- Parameters:
width- the width that should be used if preferred height depends on it- Returns:
- the computed preferred height for this region
-
requestLayout
public void requestLayout()Description copied from class:ParentRequests a layout pass to be performed before the next scene is rendered. This is batched up asynchronously to happen once per "pulse", or frame of animation.If this parent is either a layout root or unmanaged, then it will be added directly to the scene's dirty layout list, otherwise requestParentLayout will be invoked.
- Overrides:
requestLayoutin classParent
-