本文整理汇总了Java中javafx.stage.Stage.close方法的典型用法代码示例。如果您正苦于以下问题:Java Stage.close方法的具体用法?Java Stage.close怎么用?Java Stage.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.stage.Stage
的用法示例。
在下文中一共展示了Stage.close方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: signUpOnAction
import javafx.stage.Stage; //导入方法依赖的package包/类
/**
* Sign up
*
* @param event
* @throws IOException
*/
@FXML
private void signUpOnAction(ActionEvent event) throws IOException {
if (isValid() && isPassMatch() && isValidEmail()) {
auth.save(new User(tfUserName.getText(), tfEmail.getText(), pfPass.getText(), tfFullName.getText(), taInfo.getText(), 0, 0));
Parent root = FXMLLoader.load(getClass().getResource("/view/Home.fxml"));
root.getStylesheets().add("../css/main.css");
Scene scene = new Scene(root);
Stage stage = new Stage();
stage.setScene(scene);
stage.show();
Stage nStage = (Stage) btnSignUp.getScene().getWindow();
nStage.close();
} else {
System.out.println("Email address not valid");
}
}
示例2: start
import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {
primaryStage.close(); // Throw away the default stage
loadPomVariables();
Dictionary languageDictionary = new Dictionary(NAME);
Http http = new Http();
fonts = new Fonts();
DialogFactory dialogFactory = new DialogFactory(languageDictionary);
loadUtilities();
loadFonts();
logger.info("Starting {} v{}" , join(".", GROUP_ID, ARTIFACT_ID), VERSION);
SettingsStage settingsStage = new SettingsStage(languageDictionary);
EditorStage editorStage = new EditorStage(languageDictionary, dialogFactory, settingsStage);
settingsStage.initOwner(editorStage);
dialogFactory.initOwner(editorStage);
}
示例3: mnuSettings
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void mnuSettings(ActionEvent event) {
(new TabAccess()).setTabName("tabBank");
Stage HelpStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(HelpStage.getX(), HelpStage.getY());
HelpStage.close();
}
示例4: mnuSourceSettings
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void mnuSourceSettings(ActionEvent event) {
(new TabAccess()).setTabName("tabSource");
Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(MakeATransactionStage.getX(), MakeATransactionStage.getY());
MakeATransactionStage.close();
}
示例5: mnuLend
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void mnuLend(ActionEvent event) {
(new TabAccess()).setTabName("tabLend");
Stage SettingsStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToMakeATransaction(SettingsStage.getX(), SettingsStage.getY());
SettingsStage.close();
}
示例6: mnuBank
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void mnuBank(ActionEvent event) {
(new TabAccess()).setTabName("tabBank");
Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToMakeATransaction(MakeATransactionStage.getX(), MakeATransactionStage.getY());
MakeATransactionStage.close();
}
示例7: mnuSystemSettings
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void mnuSystemSettings(ActionEvent event) {
(new TabAccess()).setTabName("tabSystem");
Stage HelpStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(HelpStage.getX(), HelpStage.getY());
HelpStage.close();
}
示例8: showScene
import javafx.stage.Stage; //导入方法依赖的package包/类
/**
* show some scene in primary stage
*/
public static void showScene(Scene scene) {
Stage stage = Properties.PRIMARY_STAGE_REF;
stage.close();
stage.setScene(scene);
stage.show();
SessionManager.getInstance().startListening(stage);
}
示例9: start
import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws IOException {
/* 앱 버전 */
Properties prop = new Properties();
FileInputStream fis = new FileInputStream(Constants.SystemMessage.PROPERTY_PATH);
prop.load(new java.io.BufferedInputStream(fis));
String current = prop.getProperty(Constants.SystemMessage.PROPERTY_APP_KEY);
/* 업데이트 앱 버전 체크 */
ApplicationAPI api = new ApplicationAPI();
Map<String, String> result = api.appCheck();
String now = result.get("new_version");
if (current != null && now != null) {
if (!current.equals(now)) {
AlertSupport alert = new AlertSupport(Constants.AlertInfoMessage.VERSION_UPDATE_MESSAGE);
int c = alert.alertConfirm();
if (c == 1) {
Runtime runTime = Runtime.getRuntime();
try {
primaryStage.close();
runTime.exec(Constants.SystemMessage.UPDATE_APP_PATH);
} catch (IOException e) {
e.printStackTrace();
}
} else {
// 업데이트를 하지 않을 때
run(primaryStage, current);
}
} else {
// 최신버전일때
run(primaryStage, current);
}
}
}
示例10: mnuExpense
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void mnuExpense(ActionEvent event) {
(new TabAccess()).setTabName("tabExpense");
Stage AboutStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToMakeATransaction(AboutStage.getX(), AboutStage.getY());
AboutStage.close();
}
示例11: mnuCreateSource
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void mnuCreateSource(ActionEvent event) {
(new TabAccess()).setTabName("tabSource");
Stage DashboardStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(DashboardStage.getX(), DashboardStage.getY());
DashboardStage.close();
}
示例12: saveBtnHandler
import javafx.stage.Stage; //导入方法依赖的package包/类
/**
* Get the parameter values from the generated forms, save them to the model and close the window.
*
* @param actionEvent Button event
*/
public void saveBtnHandler(ActionEvent actionEvent) {
// Save the parameters to the model
parametersProperty.setValue(FXCollections.observableList(parameterValues));
// Get a handle to the stage and close it
Stage stage = (Stage) saveBtn.getScene().getWindow();
stage.close();
}
示例13: exSaveBtn
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void exSaveBtn(ActionEvent event) {
if (amountIsZero(extxtAmount.getText())) {
exlblWarningMsg.setText("Empty or Zero is not approved.");
} else {
exSaveFunction();
Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToDashboard(MakeATransactionStage.getX(), MakeATransactionStage.getY());
MakeATransactionStage.close();
}
}
示例14: mnuAdvancedSettings
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void mnuAdvancedSettings(ActionEvent event) {
(new TabAccess()).setTabName("tabAdvanced");
Stage TransactionHistoryStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(TransactionHistoryStage.getX(), TransactionHistoryStage.getY());
TransactionHistoryStage.close();
}
示例15: cancel
import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
protected void cancel() {
Stage stage = (Stage) lvGames.getScene().getWindow();
stage.close();
}