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


Java GuiUtils.informationalAlert方法代码示例

本文整理汇总了Java中wallettemplate.utils.GuiUtils.informationalAlert方法的典型用法代码示例。如果您正苦于以下问题:Java GuiUtils.informationalAlert方法的具体用法?Java GuiUtils.informationalAlert怎么用?Java GuiUtils.informationalAlert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wallettemplate.utils.GuiUtils的用法示例。


在下文中一共展示了GuiUtils.informationalAlert方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
@Override
public void start(Stage mainWindow) throws Exception {
    instance = this;
    // Show the crash dialog for any exceptions that we don't handle and that hit the main loop.
    GuiUtils.handleCrashesOnThisThread();
    try {
        init(mainWindow);
    } catch (Throwable t) {
        // Nicer message for the case where the block store file is locked.
        if (Throwables.getRootCause(t) instanceof BlockStoreException) {
            GuiUtils.informationalAlert("Already running", "This application is already running and cannot be started twice.");
        } else {
            throw t;
        }
    }
}
 
开发者ID:HashEngineering,项目名称:megacoinj,代码行数:17,代码来源:Main.java

示例2: deleteAvatar

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
@FXML protected void deleteAvatar (ActionEvent event){
	if(Authenticator.getWalletOperation().isOnenameAvatarSet()) {
		boolean result = false;
		try {
			result = Authenticator.getWalletOperation().deleteOneNameAvatar();
		} catch (IOException e) {
			e.printStackTrace();
			GuiUtils.informationalAlert("Could not delete OneName profile", "");
		}
		if(result == false) {
			GuiUtils.informationalAlert("Could not delete OneName profile", "");
		}
		else {
			Authenticator.fireonOneNameIdentityChanged(null, null);
			done();
		}
	}
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:19,代码来源:OneNameController.java

示例3: playPairingOperation

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
private void playPairingOperation(String pairName, NetworkType nt, PairingStageUpdater stageListener){
	BAOperation op = OperationsFactory.PAIRING_OPERATION(Authenticator.getWalletOperation(),
   			pairName, 
   			null,
   			null,
   			nt,
   			0,
   			false,
   			stageListener,
   			null);
	
	op.SetOperationUIUpdate(new OperationListenerAdapter() {
		@Override
		public void onError(BAOperation operation, Exception e, Throwable t) {
			Platform.runLater(() -> GuiUtils.informationalAlert("Error !", "We could not create the pairing QR code, please restart wallet."));
		}
	});
	
	boolean result = auth.addOperation(op);
   	if(!result){ 
   		GuiUtils.informationalAlert("Error !", "Could not add operation");
   	}
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:24,代码来源:StartupController.java

示例4: realStart

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
public void realStart(Stage mainWindow) {
    instance = this;
    // Show the crash dialog for any exceptions that we don't handle and that hit the main loop.
    GuiUtils.handleCrashesOnThisThread();
    
    UI_ONLY_WALLET_PW = new BAPassword();
    
    
     try {
     	if(super.BAInit()) {
     		System.out.println(toString());
         	init(mainWindow);
     	}
     	else
         	Runtime.getRuntime().exit(0);
     } catch (Exception t) {
         if(t instanceof WrongOperatingSystemException)
         	GuiUtils.informationalAlert("Error", "Could not find an appropriate OS");
         
         else 
         	Runtime.getRuntime().exit(0);
     }
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:24,代码来源:Main.java

示例5: requestMoney

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
@FXML
protected void requestMoney(MouseEvent event) {
    if (event.getButton() == MouseButton.SECONDARY || (event.getButton() == MouseButton.PRIMARY && event.isMetaDown())) {
        // User right clicked or the Mac equivalent. Show the context menu.
        addressMenu.show(addressLabel, event.getScreenX(), event.getScreenY());
    } else {
        // User left clicked.
        try {
            Desktop.getDesktop().browse(URI.create(uri()));
        } catch (IOException e) {
            GuiUtils.informationalAlert("Opening wallet app failed", "Perhaps you don't have one installed?");
        }
    }
}
 
开发者ID:creativechain,项目名称:creacoinj,代码行数:15,代码来源:ClickableBitcoinAddress.java

示例6: done

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
@FXML protected void done(ActionEvent event){
  	if(validateDone()){
  		if(this.listener != null)
  			this.listener.addedAccount(new AddedAccountObject(type, 
  					txfAccountName.getText(), 
  					Integer.parseInt(txfAccountID.getText())));
  		stage.close();
  	}
  	else{
  		GuiUtils.informationalAlert("Something is wrong", "Make sure u entered all fields correctly");
  	}
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:13,代码来源:AddAccountWindow.java

示例7: toBackupNewWalletPane

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
@FXML protected void toBackupNewWalletPane(ActionEvent event) {
 if (txAccount.getText().toString().equals("")){
	 informationalAlert("Unfortunately, you messed up.",
			 "You need to enter a name for your account");
 }
 
 if(handlePasswordPane(txPW1.getText(), txPW2.getText()))
 {
	 try {
		firstAccountName = txAccount.getText();
		//createNewStandardAccount(txAccount.getText());
		
		ckSeed.selectedProperty().addListener(new ChangeListener<Boolean>() {
			 public void changed(ObservableValue<? extends Boolean> ov,
					 Boolean old_val, Boolean new_val) {
				 if (ckSeed.isSelected()){
					 btnContinue2.setStyle("-fx-background-color: #95d946;");
				 }
				 else {
					 btnContinue2.setStyle("-fx-background-color: #badb93;");
				 }
			 }
		 });
		 Animation ani = GuiUtils.fadeOut(SetPasswordPane);
		 GuiUtils.fadeIn(BackupNewWalletPane);
		 SetPasswordPane.setVisible(false);
		 BackupNewWalletPane.setVisible(true);
		 //Main.bitcoin.wallet().encrypt(txPW1.getText().toString());
	} catch (Exception e) { 
		e.printStackTrace();
		GuiUtils.informationalAlert("Cannot Create account !", "Please try again");
	}
	 
 }
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:36,代码来源:StartupController.java

示例8: goRestoreFromSeed

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
@FXML protected void goRestoreFromSeed(ActionEvent event){
 DeterministicSeed seed = reconstructSeed(lblSeedRestorer.getText(), seedCreationDatePicker.getValue());
 if(seed != null){
	 try {
		createWallet(seed);
		RestoreFromMnemonicPane.setVisible(false);
		launchRestoreAccoutns(RestoreFromMnemonicPane);
	} catch (IOException e) {
		e.printStackTrace();
		GuiUtils.informationalAlert("Cannot Restore from Mnemonic Seed", "Please try again");
	}
 }
 else
	 GuiUtils.informationalAlert("Cannot Restore from Mnemonic Seed", "Please try again");
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:16,代码来源:StartupController.java

示例9: goRestoreFromQR

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
@FXML protected void goRestoreFromQR(ActionEvent event){
 if(walletSeed != null){
	 try {
		createWallet(walletSeed);
		RestoreFromQRPane.setVisible(false);
		launchRestoreAccoutns(RestoreFromMnemonicPane);
	} catch (IOException e) {
		e.printStackTrace();
		GuiUtils.informationalAlert("Cannot Restore from Mnemonic Seed", "Please try again");
	}
 }
 else
	 GuiUtils.informationalAlert("Cannot Restore from Mnemonic Seed", "Please try again");
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:15,代码来源:StartupController.java

示例10: runPairing

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
private void runPairing(String pairName, @Nullable Integer accountID, @Nullable String keyHex,  boolean isRepairing) throws IOException
{    	    	
	if(!Main.UI_ONLY_WALLET_PW.hasPassword() && Authenticator.getWalletOperation().isWalletEncrypted()) {
		informationalAlert("The wallet is locked",
	"Please unlock the wallet to continue");
		return ;
	}
	
	pairingOP = OperationsFactory.PAIRING_OPERATION(Authenticator.getWalletOperation(),
			pairName, 
			accountID,
			keyHex,
			Authenticator.getApplicationParams().getBitcoinNetworkType(), 
			60000,
			isRepairing,
			new PairingStageUpdater(){
	@Override
	public void onPairingStageChanged(PairingStage stage, @Nullable byte[] qrImageBytes) {
		handlePairingStage(stage, qrImageBytes);
	}

	@Override
	public void pairingData(PairedAuthenticator data) { }
			},
			Main.UI_ONLY_WALLET_PW).SetOperationUIUpdate(opListener);
	
	boolean result = Authenticator.addOperation(pairingOP);
	if(!result){
		GuiUtils.informationalAlert("Error !", "Could not add operation");
	}
	else{}
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:33,代码来源:PairWallet.java

示例11: deleteAccount

import wallettemplate.utils.GuiUtils; //导入方法依赖的package包/类
@FXML protected void deleteAccount(ActionEvent event)
{
	if(currentSelectedCell == null)
		return;
	
	/**
	 * check at least one account remains
	 */
	if(Authenticator.getWalletOperation().getAllAccounts().size() < 2){
		GuiUtils.informationalAlert("Cannot Remove account !", "At least one active account should remain.");						
		return;
	}
	
	/**
	 * Check is not the active account
	 */
	if(Authenticator.getWalletOperation().getActiveAccount().getActiveAccount().getIndex() == currentSelectedCell.getAccount().getIndex()){
		GuiUtils.informationalAlert("Cannot Remove account !", "The account for removal is the active wallet's account.\n"
        		+ "Change the wallet's active account and try again.");
		return;
	}
	
	BADialog.confirm(Main.class, "Warning !","You are about to delete the \"" + currentSelectedCell.getAccount().getAccountName() + "\" account !\n"
       		+ "Deleting the account will delete all information about it.\n"
       		+ "Do you wish do continue ?\n",
       		new BADialogResponseListner(){
					@Override
					public void onResponse(BADialogResponse response,String input) {
						if(response == BADialogResponse.Yes)
						{
							try {
								Authenticator.getWalletOperation().removeAccount(currentSelectedCell.getAccount().getIndex());
								currentSelectedCell = null;
								setupContent();
								GuiUtils.informationalAlert("Operation Complete", "Account was deleted");
								
							} catch (IOException e) { 
								e.printStackTrace();
								GuiUtils.informationalAlert("Error !", "Error occured while deleting the account.");
							}
						}
					}
				}).show();
}
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:45,代码来源:AccountsController.java


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