本文整理匯總了Java中javafx.scene.control.Alert.setX方法的典型用法代碼示例。如果您正苦於以下問題:Java Alert.setX方法的具體用法?Java Alert.setX怎麽用?Java Alert.setX使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.control.Alert
的用法示例。
在下文中一共展示了Alert.setX方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: mnuUndo
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void mnuUndo(ActionEvent event) {
String feedback = new Undo().actionUndo();
Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("Action Successful");
alert.setHeaderText(null);
alert.setContentText(feedback);
alert.setX(MakeATransactionStage.getX() + 190);
alert.setY(MakeATransactionStage.getY() + 190);
// initialize();
gmInitialize();
exInitialize();
leInitialize();
bkInitialize();
rocInitialize();
perInitialize();
alert.showAndWait();
}
示例2: btnSave
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void btnSave(ActionEvent event) {
if (passPassword.getText().isEmpty()) {
lblMsgInformation.setText("Password can't empty");
} else if (!passReTypePassword.getText().equals(passPassword.getText())) {
lblMsgInformation.setText("Re-type Your Password Correctly");
} else if(txtAnswer.getText().isEmpty() || countWords(txtAnswer.getText()) == 0) {
lblMsgInformation.setText("Answer the Security Question.");
} else {
setPassword(passPassword.getText());
setSecurityQuestion(cmboSecurityQuestion.getValue());
setSecurityQuestionAnswer(txtAnswer.getText());
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Operation Successful");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText("Information Updated Successfully");
Stage RegistrationIssueStage = (Stage) btnSave.getScene().getWindow();
confirmationMsg.setX(RegistrationIssueStage.getX() + 200);
confirmationMsg.setY(RegistrationIssueStage.getY() + 170);
confirmationMsg.showAndWait();
(new GoToOperation()).goToSignIn(RegistrationIssueStage.getX(), RegistrationIssueStage.getY());
RegistrationIssueStage.close();
}
}
示例3: mnuUndo
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void mnuUndo(ActionEvent event) {
Stage SettingsStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("Action Failed");
alert.setHeaderText("Undo Function Works Only From \"Make A Transaction\" and \"History\" Window");
alert.setContentText("Press \"OK\" to go to \"Make A Transaction\" window");
alert.setX(SettingsStage.getX() + 60);
alert.setY(SettingsStage.getY() + 170);
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
(new TabAccess()).setTabName("tabGetMoney"); //name of which Tab should open
(new GoToOperation()).goToMakeATransaction(SettingsStage.getX(), SettingsStage.getY());
SettingsStage.close();
}
}
示例4: createSource
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void createSource(ActionEvent event) {
if ((sourcetxtSourceName.getText()).length() == 0 || countWords(sourcetxtSourceName.getText()) == 0) {
sourcelblWarningMsg.setText("Write a Source Name Please");
} else {
sourcelblWarningMsg.setText("");
source.createSource(sourcetxtSourceName.getText());
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Message");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText("Source "+sourcetxtSourceName.getText()+ " created successfully");
Stage SettingsStage = (Stage) btnDashboard.getScene().getWindow();
confirmationMsg.setX(SettingsStage.getX() + 200);
confirmationMsg.setY(SettingsStage.getY() + 170);
confirmationMsg.showAndWait();
tabSourceInitialize();
}
}
示例5: archiveSource
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void archiveSource(ActionEvent event) {
try {
source.archiveSource(sourcecmboArchive.getValue());
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Message");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText(sourcecmboArchive.getValue()+ " is Archived Successfully");
Stage SettingsStage = (Stage) btnDashboard.getScene().getWindow();
confirmationMsg.setX(SettingsStage.getX() + 200);
confirmationMsg.setY(SettingsStage.getY() + 170);
confirmationMsg.showAndWait();
tabSourceInitialize();
} catch (Exception e) {}
}
示例6: unarchiveSource
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void unarchiveSource(ActionEvent event) {
try {
source.unarchiveSource(sourcecmboUnArchive.getValue());
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Message");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText(sourcecmboUnArchive.getValue()+ " is Unarchived Successfully");
Stage SettingsStage = (Stage) btnDashboard.getScene().getWindow();
confirmationMsg.setX(SettingsStage.getX() + 200);
confirmationMsg.setY(SettingsStage.getY() + 170);
confirmationMsg.showAndWait();
tabSourceInitialize();
} catch (Exception e) {}
}
示例7: createSector
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void createSector(ActionEvent event) {
if ((sectortxtSourceName.getText()).length() == 0 || countWords(sectortxtSourceName.getText()) == 0) {
sectorlblWarningMsg.setText("Write a Sector Name Please");
} else {
sectorlblWarningMsg.setText("");
sector.createSector(sectortxtSourceName.getText());
advancedSector.createSectorToAddList(sectortxtSourceName.getText());
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Message");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText("Sector "+sectortxtSourceName.getText()+ " created successfully");
Stage SettingsStage = (Stage) btnDashboard.getScene().getWindow();
confirmationMsg.setX(SettingsStage.getX() + 200);
confirmationMsg.setY(SettingsStage.getY() + 170);
confirmationMsg.showAndWait();
tabSectorInitialize();
}
}
示例8: unarchiveSector
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void unarchiveSector(ActionEvent event) {
try {
sector.unarchiveSector(sectorcmboUnArchive.getValue());
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Message");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText(sectorcmboUnArchive.getValue()+ " is Unarchived Successfully");
Stage SettingsStage = (Stage) btnDashboard.getScene().getWindow();
confirmationMsg.setX(SettingsStage.getX() + 200);
confirmationMsg.setY(SettingsStage.getY() + 170);
confirmationMsg.showAndWait();
tabSectorInitialize();
} catch (Exception e) {}
}
示例9: advancedBtnRemove
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void advancedBtnRemove(ActionEvent event) {
try {
advancedSector.removeSectorFromList(advancedCmboRemove.getValue());
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Message");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText(advancedCmboRemove.getValue()+ " is removed from list successfully");
Stage SettingsStage = (Stage) btnDashboard.getScene().getWindow();
confirmationMsg.setX(SettingsStage.getX() + 200);
confirmationMsg.setY(SettingsStage.getY() + 170);
tabAdvancedInitialize();
confirmationMsg.showAndWait();
} catch (Exception e) {}
}
示例10: mnuUndo
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void mnuUndo(ActionEvent event) {
Stage DashboardStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("Action Failed");
alert.setHeaderText("Undo Function Works Only From \"Make A Transaction\" and \"History\" Window");
alert.setContentText("Press \"OK\" to go to \"Make A Transaction\" window");
alert.setX(DashboardStage.getX() + 60);
alert.setY(DashboardStage.getY() + 170);
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
(new TabAccess()).setTabName("tabGetMoney"); //name of which Tab should open
(new GoToOperation()).goToMakeATransaction(DashboardStage.getX(), DashboardStage.getY());
DashboardStage.close();
}
}
示例11: mnuUndo
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void mnuUndo(ActionEvent event) {
Stage AboutStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("Action Failed");
alert.setHeaderText("Undo Function Works Only From \"Make A Transaction\" and \"History\" Window");
alert.setContentText("Press \"OK\" to go to \"Make A Transaction\" window");
alert.setX(AboutStage.getX() + 60);
alert.setY(AboutStage.getY() + 170);
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
(new TabAccess()).setTabName("tabGetMoney"); //name of which Tab should open
(new GoToOperation()).goToMakeATransaction(AboutStage.getX(), AboutStage.getY());
AboutStage.close();
}
}
示例12: mnuUndo
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void mnuUndo(ActionEvent event) {
String feedback = new Undo().actionUndo();
Stage TransactionHistoryStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("Action Successful");
alert.setHeaderText(null);
alert.setContentText(feedback);
alert.setX(TransactionHistoryStage.getX() + 190);
alert.setY(TransactionHistoryStage.getY() + 190);
initialize();
alert.showAndWait();
}
示例13: mnuUndo
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void mnuUndo(ActionEvent event) {
Stage CashCalculateStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("Action Failed");
alert.setHeaderText("Undo Function Works Only From \"Make A Transaction\" and \"History\" Window");
alert.setContentText("Press \"OK\" to go to \"Make A Transaction\" window");
alert.setX(CashCalculateStage.getX() + 60);
alert.setY(CashCalculateStage.getY() + 170);
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
(new TabAccess()).setTabName("tabGetMoney"); //name of which Tab should open
(new GoToOperation()).goToMakeATransaction(CashCalculateStage.getX(), CashCalculateStage.getY());
CashCalculateStage.close();
}
}
示例14: mnuUndo
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void mnuUndo(ActionEvent event) {
Stage HelpStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.CONFIRMATION);
alert.setTitle("Action Failed");
alert.setHeaderText("Undo Function Works Only From \"Make A Transaction\" and \"History\" Window");
alert.setContentText("Press \"OK\" to go to \"Make A Transaction\" window");
alert.setX(HelpStage.getX() + 60);
alert.setY(HelpStage.getY() + 170);
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK){
(new TabAccess()).setTabName("tabGetMoney"); //name of which Tab should open
(new GoToOperation()).goToMakeATransaction(HelpStage.getX(), HelpStage.getY());
HelpStage.close();
}
}
示例15: exbtnAdvancedSaveAndAdd
import javafx.scene.control.Alert; //導入方法依賴的package包/類
@FXML
private void exbtnAdvancedSaveAndAdd(ActionEvent event) {
if (total == 0) {
exlblAdvWarningMsg.setText("Empty or Zero is not approved.");
} else {
TextField AdvancedExtxt[] = {extxtAdvSector1, extxtAdvSector2, extxtAdvSector3, extxtAdvSector4,
extxtAdvSector5, extxtAdvSector6, extxtAdvSector7 };
Label AdvancedExlbl[] = {exlblAdvSector1, exlblAdvSector2, exlblAdvSector3, exlblAdvSector4,
exlblAdvSector5, exlblAdvSector6, exlblAdvSector7 };
int index = 0;
for (TextField textField : AdvancedExtxt) {
if ((!textField.getText().isEmpty()) && (!textField.getText().equals("0"))) {
exAdvSaveFunction(textField.getText(), AdvancedExlbl[index].getText());
}
++index;
}
exInitialize();
extxtAdvancedDescription.clear();
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Successfull Transaction");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText("Your transaction completed successfully.");
Stage MakeATransactionStage = (Stage) exbtnSave.getScene().getWindow();
confirmationMsg.setX(MakeATransactionStage.getX() + 200);
confirmationMsg.setY(MakeATransactionStage.getY() + 170);
confirmationMsg.showAndWait();
}
}