Venice 0.751beta

nz.org.venice.portfolio
Class AccountDialog

java.lang.Object
  extended bynz.org.venice.portfolio.AccountDialog

public class AccountDialog
extends java.lang.Object

A dialog that allows the user to enter an account name and currency. The account could be a portfolio or a portfolio's account. Example:

      AccountDialog dialog = new AccountDialog(desktop,
                                               Locale.getString("ENTER_PORTFOLIO_NAME"),
                                               Locale.getString("NEW_PORTFOLIO"));
      if(dialog.showDialog()) {
          String accountName = dialog.getAccountName();
          Currency accountCurrency = dialog.getAccountCurrency();
      }
 

Author:
Quentin Bossard, Andrew Leppard

Constructor Summary
AccountDialog(javax.swing.JComponent parent, java.lang.String message, java.lang.String title)
          Create new account dialog.
AccountDialog(javax.swing.JComponent parent, java.lang.String message, java.lang.String title, Currency currency)
          Create new account dialog.
 
Method Summary
 Currency getAccountCurrency()
          Return the currency selected.
 java.lang.String getAccountName()
          Return the account name entered into the dialog.
 boolean showDialog()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountDialog

public AccountDialog(javax.swing.JComponent parent,
                     java.lang.String message,
                     java.lang.String title)
Create new account dialog.

Parameters:
parent - The parent component to tie the dialog to
message - The prompt text
title - The title to place on the dialog

AccountDialog

public AccountDialog(javax.swing.JComponent parent,
                     java.lang.String message,
                     java.lang.String title,
                     Currency currency)
Create new account dialog.

Parameters:
parent - The parent component to tie the dialog to
message - The prompt text
title - The title to place on the dialog
currency - The default currency for the account.
Method Detail

showDialog

public boolean showDialog()

getAccountName

public java.lang.String getAccountName()
Return the account name entered into the dialog.

Returns:
the account name.

getAccountCurrency

public Currency getAccountCurrency()
Return the currency selected.

Returns:
the currency.

Venice 0.751beta