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

public final Class WorkbenchPresenter

extends Presenter
Class Inheritance
Imports
com.dlsc.workbenchfx.Workbench, com.dlsc.workbenchfx.model.WorkbenchDialog, .WorkbenchOverlay, com.dlsc.workbenchfx.util.WorkbenchUtils, com.dlsc.workbenchfx.view.controls.dialog.DialogControl, java.util.Objects, javafx.collections.MapChangeListener, .ObservableList, .ObservableMap, javafx.scene.control.ButtonType, javafx.scene.layout.Region, org.slf4j.Logger, .LoggerFactory

Represents the presenter of the corresponding WorkbenchView.
Authors
François Martin, Marco Sanfratello

Field Summary

Modifier and TypeField and Description
private final ObservableList<Region>
private static final Logger
private final Workbench
private final ObservableMap<Region, WorkbenchOverlay>
private final ObservableList<Region>
private final WorkbenchView

Constructor Summary

AccessConstructor and Description
public
WorkbenchPresenter(Workbench
the model of WorkbenchFX
model
,
WorkbenchView
corresponding view to this presenter
view
)

Constructs a new WorkbenchPresenter for the WorkbenchView.

Method Summary

Modifier and TypeMethod and Description
private void
addOverlay(WorkbenchOverlay
to be added
overlay
)

Adds an overlay together with the glassPane to the view.

private void
hideOverlay(Region
to be hidden
overlay
)

Makes the overlay invisible, along with its glassPane.

private void
hideOverlay(WorkbenchOverlay
to be hidden
overlay
)

Makes the overlay invisible, along with its glassPane.

public final void
initializeViewParts()

Overrides com.dlsc.workbenchfx.view.Presenter.initializeViewParts.

Initializes parts of the view which require more logic.

private void
removeOverlay(WorkbenchOverlay
to be removed
overlay
)

Removes an overlay together with the glassPane from the view.

public final void
setupBindings()

Overrides com.dlsc.workbenchfx.view.Presenter.setupBindings.

Sets up bindings of the view.

public final void
setupEventHandlers()

Overrides com.dlsc.workbenchfx.view.Presenter.setupEventHandlers.

Sets up event handlers of the view.

public final void
setupValueChangedListeners()

Overrides com.dlsc.workbenchfx.view.Presenter.setupValueChangedListeners.

Adds all listeners to view elements and model properties.

private void
showOverlay(Region
to be shown
overlay
,
boolean
if false, will make overlay hide, if its glassPane was clicked
blocking
)

Makes the overlay visible, along with its glassPane.

private void
showOverlay(WorkbenchOverlay
the overlay's corresponding model object
workbenchOverlay
,
boolean
if false, will make overlay hide, if its glassPane was clicked
blocking
)

Makes the overlay visible, along with its glassPane.

Inherited from com.dlsc.workbenchfx.view.Presenter:
init

Field Detail

blockingOverlaysShownback to summary
private final ObservableList<Region> blockingOverlaysShown
LOGGERback to summary
private static final Logger LOGGER
modelback to summary
private final Workbench model
overlaysback to summary
private final ObservableMap<Region, WorkbenchOverlay> overlays
overlaysShownback to summary
private final ObservableList<Region> overlaysShown
viewback to summary
private final WorkbenchView view

Constructor Detail

WorkbenchPresenterback to summary
public WorkbenchPresenter(Workbench model, WorkbenchView view)

Constructs a new WorkbenchPresenter for the WorkbenchView.

Parameters
model:Workbench

the model of WorkbenchFX

view:WorkbenchView

corresponding view to this presenter

Method Detail

addOverlayback to summary
private void addOverlay(WorkbenchOverlay overlay)

Adds an overlay together with the glassPane to the view.

Parameters
overlay:WorkbenchOverlay

to be added

hideOverlayback to summary
private void hideOverlay(Region overlay)

Makes the overlay invisible, along with its glassPane.

Parameters
overlay:Region

to be hidden

hideOverlayback to summary
private void hideOverlay(WorkbenchOverlay overlay)

Makes the overlay invisible, along with its glassPane.

Parameters
overlay:WorkbenchOverlay

to be hidden

initializeViewPartsback to summary
public final void initializeViewParts()

Overrides com.dlsc.workbenchfx.view.Presenter.initializeViewParts.

Doc from com.dlsc.workbenchfx.view.Presenter.initializeViewParts.

Initializes parts of the view which require more logic.

Annotations
@Override
removeOverlayback to summary
private void removeOverlay(WorkbenchOverlay overlay)

Removes an overlay together with the glassPane from the view.

Parameters
overlay:WorkbenchOverlay

to be removed

setupBindingsback to summary
public final void setupBindings()

Overrides com.dlsc.workbenchfx.view.Presenter.setupBindings.

Doc from com.dlsc.workbenchfx.view.Presenter.setupBindings.

Sets up bindings of the view.

Annotations
@Override
setupEventHandlersback to summary
public final void setupEventHandlers()

Overrides com.dlsc.workbenchfx.view.Presenter.setupEventHandlers.

Doc from com.dlsc.workbenchfx.view.Presenter.setupEventHandlers.

Sets up event handlers of the view.

Annotations
@Override
setupValueChangedListenersback to summary
public final void setupValueChangedListeners()

Overrides com.dlsc.workbenchfx.view.Presenter.setupValueChangedListeners.

Doc from com.dlsc.workbenchfx.view.Presenter.setupValueChangedListeners.

Adds all listeners to view elements and model properties.

Annotations
@Override
showOverlayback to summary
private void showOverlay(Region overlay, boolean blocking)

Makes the overlay visible, along with its glassPane.

Parameters
overlay:Region

to be shown

blocking:boolean

if false, will make overlay hide, if its glassPane was clicked

showOverlayback to summary
private void showOverlay(WorkbenchOverlay workbenchOverlay, boolean blocking)

Makes the overlay visible, along with its glassPane.

Parameters
workbenchOverlay:WorkbenchOverlay

the overlay's corresponding model object

blocking:boolean

if false, will make overlay hide, if its glassPane was clicked