java.lang.Object
javafx.scene.control.Dialog<R>
org.panteleyev.fx.BaseDialog<R>
- Type Parameters:
R
- The return type of the dialog, via the result property.
- All Implemented Interfaces:
javafx.event.EventTarget
public class BaseDialog<R>
extends javafx.scene.control.Dialog<R>
Base class for dialogs.
-
Property Summary
-
Field Summary
Fields Modifier and Type Field Description protected org.controlsfx.validation.ValidationSupport
validation
-
Constructor Summary
Constructors Constructor Description BaseDialog()
Creates dialog instance with no owner and default style sheet.BaseDialog(java.net.URL cssUrl)
Creates dialog instance with no owner and specified style sheet.BaseDialog(Controller owner)
Creates dialog instance with specified owner.BaseDialog(Controller owner, java.net.URL cssUrl)
Creates dialog instance with specified owner and style sheet. -
Method Summary
Modifier and Type Method Description protected void
createDefaultButtons(java.util.ResourceBundle rb)
Creates OK and Cancel buttons.protected java.util.Optional<javafx.scene.control.Button>
getButton(javafx.scene.control.ButtonType type)
Returns button of the specified type.Methods inherited from class javafx.scene.control.Dialog
buildEventDispatchChain, close, contentTextProperty, dialogPaneProperty, getContentText, getDialogPane, getGraphic, getHeaderText, getHeight, getModality, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOwner, getResult, getResultConverter, getTitle, getWidth, getX, getY, graphicProperty, headerTextProperty, heightProperty, hide, initModality, initOwner, initStyle, isResizable, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, resizableProperty, resultConverterProperty, resultProperty, setContentText, setDialogPane, setGraphic, setHeaderText, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setResizable, setResult, setResultConverter, setTitle, setWidth, setX, setY, show, showAndWait, showingProperty, titleProperty, widthProperty, xProperty, yProperty
-
Field Details
-
validation
protected final org.controlsfx.validation.ValidationSupport validation
-
-
Constructor Details
-
BaseDialog
public BaseDialog()Creates dialog instance with no owner and default style sheet. -
BaseDialog
Creates dialog instance with specified owner.- Parameters:
owner
- owner
-
BaseDialog
public BaseDialog(java.net.URL cssUrl)Creates dialog instance with no owner and specified style sheet.- Parameters:
cssUrl
- style sheet url
-
BaseDialog
Creates dialog instance with specified owner and style sheet.- Parameters:
owner
- ownercssUrl
- stye sheet url
-
-
Method Details
-
createDefaultButtons
protected void createDefaultButtons(java.util.ResourceBundle rb)Creates OK and Cancel buttons. Supplied resource bundle must define "button.Cancel" resource for Cancel translation.- Parameters:
rb
- resource bundle
-
getButton
protected java.util.Optional<javafx.scene.control.Button> getButton(javafx.scene.control.ButtonType type)Returns button of the specified type.- Parameters:
type
- button type- Returns:
- button if exists
-