Show / Hide Table of Contents

Class GeneralScope

General scope that can be injected into viewmodels whose views are loaded by the DialogHelper. Its purpose is to provide access to events of the stage that the view is living in. Currenlty used only for reacting to the OnStageClosing event.

Inheritance
java.lang.Object
GeneralScope
Implements
de.saxsys.mvvmfx.Scope
Inherited Members
java.lang.Object.clone()
java.lang.Object.equals(java.lang.Object)
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.hashCode()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.toString()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)
Namespace:
Assembly: .dll
Syntax
public class GeneralScope implements Scope

Constructors

GeneralScope()

Declaration
public GeneralScope()

Methods

getStage()

The stage of the view.

Declaration
public Stage getStage()
Returns
Type Description
javafx.stage.Stage

registerOnStageClosing(Consumer<Stage> closingHandler)

Registers a handler for the onStageClosing event of the stage. The handler will be invoked, when the OnStageClosing event occurs.

Declaration
public void registerOnStageClosing(Consumer<Stage> closingHandler)
Parameters
Type Name Description
java.util.function.Consumer<javafx.stage.Stage> closingHandler

The handler to register

setStage(Stage stage)

Sets the stage of the view. This should only be called by the DialogHelper.

Declaration
public void setStage(Stage stage)
Parameters
Type Name Description
javafx.stage.Stage stage

The stage of the view

Implements

de.saxsys.mvvmfx.Scope
In This Article
Back to top Generated by DocFX