com.wedasoft.simpleJavaFxApplicationBase.sceneSwitcher.FxmlSceneControllerBase Maven / Gradle / Ivy
package com.wedasoft.simpleJavaFxApplicationBase.sceneSwitcher;
import java.util.Map;
/**
* @author davidweber411
*/
public abstract class FxmlSceneControllerBase {
private Map passedArguments;
/**
* This method is called after setting the new scene into the stage.
* The execution order of the initialization methods is:
*
* - Constructor() of the controller is called first.
* You can do constructor things here, but it is recommend to do nearly everything in onFxmlSceneReady().
* - initialize() of the controller is called second.
* You can load JavaFX specific things here.
* - onFxmlSceneReady() of the controller is called third.
* You can load data from the database and fill textfields here.
*
*/
public abstract void onFxmlSceneReady();
/**
* Checks if there are passed arguments available.
*
* @return False if passedArguments is null or empty, otherwise true.
*/
public boolean passedArgumentsAreAvailable() {
return passedArguments != null && !passedArguments.isEmpty();
}
/**
* This method gets the arguments that were passed to the controller.
*
* @return Map of passed arguments.
*/
public Map getPassedArguments() {
return passedArguments;
}
public void setPassedArguments(Map passedArguments) {
this.passedArguments = passedArguments;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy