Top Description Fields Constructors Methods
com.dlsc.preferencesfx.view

public Class PreferencesFxDialog

extends DialogPane
Class Inheritance
Imports
com.dlsc.preferencesfx.PreferencesFx, com.dlsc.preferencesfx.history.view.HistoryDialog, com.dlsc.preferencesfx.model.PreferencesFxModel, com.dlsc.preferencesfx.util.Constants, .StorageHandler, javafx.event.ActionEvent, javafx.scene.control.Button, .ButtonType, .Dialog, .DialogPane, javafx.scene.image.Image, javafx.scene.input.KeyCode, .KeyCodeCombination, .KeyCombination, .KeyEvent, javafx.stage.Modality, .Stage, org.slf4j.Logger, .LoggerFactory

Represents the dialog which is used to show the PreferencesFX window.
Authors
François Martin, Marco Sanfratello

Field Summary

Modifier and TypeField and Description
private ButtonType
private Button
private ButtonType
private ButtonType
private Dialog<R>
private static final Logger
private boolean
private PreferencesFxModel
private ButtonType
private PreferencesFxView
private boolean
private StorageHandler

Constructor Summary

AccessConstructor and Description
public
PreferencesFxDialog(PreferencesFxModel
the model of PreferencesFX
model
,
PreferencesFxView
the master view to be display in this DialogPane
preferencesFxView
)

Initializes the DialogPane which shows the PreferencesFX window.

Method Summary

Modifier and TypeMethod and Description
private void
private void
bindButtonVisibility(Button closeBtn, Button cancelBtn)

private void
private void
loadLastWindowState()

Loads last saved size and position of the window.

private void
public void
setDialogIcon(Image
the image to be used as the dialog icon.
image
)

Sets the dialog icon.

public void
setDialogTitle(String
the dialog title
title
)

Sets the dialog title.

private void
private void
private void
private void
private void
public void
show()

Opens PreferencesFx in a non-modal dialog window.

public void
show(boolean
if true, will not allow the user to interact with any other window than the PreferencesFxDialog, as long as it is open.
modal
)

Opens PreferencesFx in a dialog window.

private void
unbindVisibility(Button closeBtn, Button cancelBtn)

Inherited from javafx.scene.control.DialogPane:
computeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthcontentPropertycontentTextPropertycreateButtoncreateButtonBarcreateDetailsButtonexpandableContentPropertyexpandedPropertygetButtonTypesgetClassCssMetaDatagetContentgetContentTextgetCssMetaDatagetExpandableContentgetGraphicgetHeadergetHeaderTextgraphicPropertyheaderPropertyheaderTextPropertyisExpandedlayoutChildrenlookupButtonsetContentsetContentTextsetExpandableContentsetExpandedsetGraphicsetHeadersetHeaderText

Field Detail

applyBtnTypeback to summary
private ButtonType applyBtnType
applyWithEventBtnback to summary
private Button applyWithEventBtn
cancelBtnTypeback to summary
private ButtonType cancelBtnType
closeWindowBtnTypeback to summary
private ButtonType closeWindowBtnType
dialogback to summary
private Dialog<R> dialog

Hides javafx.scene.control.DialogPane.dialog.

LOGGERback to summary
private static final Logger LOGGER
modalityInitializedback to summary
private boolean modalityInitialized
modelback to summary
private PreferencesFxModel model
okBtnTypeback to summary
private ButtonType okBtnType
preferencesFxViewback to summary
private PreferencesFxView preferencesFxView
saveSettingsback to summary
private boolean saveSettings
storageHandlerback to summary
private StorageHandler storageHandler

Constructor Detail

PreferencesFxDialogback to summary
public PreferencesFxDialog(PreferencesFxModel model, PreferencesFxView preferencesFxView)

Initializes the DialogPane which shows the PreferencesFX window.

Parameters
model:PreferencesFxModel

the model of PreferencesFX

preferencesFxView:PreferencesFxView

the master view to be display in this DialogPane

Method Detail

addButtonsback to summary
private void addButtons()
bindButtonVisibilityback to summary
private void bindButtonVisibility(Button closeBtn, Button cancelBtn)
layoutFormback to summary
private void layoutForm()
loadLastWindowStateback to summary
private void loadLastWindowState()

Loads last saved size and position of the window.

saveWindowStateback to summary
private void saveWindowState()
setDialogIconback to summary
public void setDialogIcon(Image image)

Sets the dialog icon.

Parameters
image:Image

the image to be used as the dialog icon.

setDialogTitleback to summary
public void setDialogTitle(String title)

Sets the dialog title.

Parameters
title:String

the dialog title

setupApplyBtnback to summary
private void setupApplyBtn(Button applyBtn)
setupButtonsback to summary
private void setupButtons()
setupDebugHistoryTableback to summary
private void setupDebugHistoryTable()
setupDialogCloseback to summary
private void setupDialogClose()
setupValueChangedListenersback to summary
private void setupValueChangedListeners()
showback to summary
public void show()

Opens PreferencesFx in a non-modal dialog window. A non-modal dialog window means the user is able to interact with the original application while the dialog is open.

showback to summary
public void show(boolean modal)

Opens PreferencesFx in a dialog window.

Parameters
modal:boolean

if true, will not allow the user to interact with any other window than the PreferencesFxDialog, as long as it is open.

unbindVisibilityback to summary
private void unbindVisibility(Button closeBtn, Button cancelBtn)