当前位置: 首页>>代码示例>>Java>>正文


Java Stage.close方法代码示例

本文整理汇总了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");
    }

}
 
开发者ID:kmrifat,项目名称:Dr-Assistant,代码行数:25,代码来源:RegistrationController.java

示例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);
}
 
开发者ID:jdesive,项目名称:textmd,代码行数:22,代码来源:TextMd.java

示例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();
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:8,代码来源:HelpController.java

示例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();
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:8,代码来源:MakeATransactionController.java

示例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();
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:8,代码来源:SettingsController.java

示例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();
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:8,代码来源:MakeATransactionController.java

示例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();
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:8,代码来源:HelpController.java

示例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);
}
 
开发者ID:Hackness,项目名称:KeepYourPassword,代码行数:11,代码来源:Main.java

示例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);
		}
	}
}
 
开发者ID:kimyearho,项目名称:WebtoonDownloadManager,代码行数:37,代码来源:Main.java

示例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();
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:8,代码来源:AboutController.java

示例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();
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:8,代码来源:DashboardController.java

示例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();
}
 
开发者ID:scify,项目名称:jedai-ui,代码行数:14,代码来源:DynamicConfigurationController.java

示例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();
	}
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:12,代码来源:MakeATransactionController.java

示例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();
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:8,代码来源:TransactionHistoryController.java

示例15: cancel

import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
protected void cancel() {
    Stage stage = (Stage) lvGames.getScene().getWindow();
    stage.close();
}
 
开发者ID:eternia16,项目名称:javaGMR,代码行数:6,代码来源:UploadSaveFileDialogController.java


注:本文中的javafx.stage.Stage.close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。