All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bank.gui.AtmGuiLogic

java.lang.Object
   |
   +----bank.gui.AtmGuiLogic

public class AtmGuiLogic
extends Object
implements Acceptable, Cancelable
ATMの画面からのイベント処理を実際に行うコントローラクラス #pattern: Command #pattern MVC

See Also:
Command, AtmGui

Variable Index

 o appManager
 o state
 o view

Constructor Index

 o AtmGuiLogic()
 o AtmGuiLogic(AtmGuiView, AtmGuiState)

Method Index

 o accept()
 o cancel()
 o checkBalance()
 o deposit(int)
 o getAtmGuiState()
 o getAtmGuiView()
 o initManager(String)
BankApplicationManagerのインスタンスを文字列から得てインストールする #pattern: strategy
 o onCheckBalance()
AtmGuiCommandから呼ばれるコールバック
 o onDeposit()
AtmGuiCommandから呼ばれるコールバック
 o onWithdraw()
AtmGuiCommandから呼ばれるコールバック
 o setAtmGuiState(AtmGuiState)
 o setAtmGuiView(AtmGuiView)
 o setBankApplicationManager(BankApplicationManagerInterface)
 o verifyAccount(int)
 o withdraw(int)

Variables

 o appManager
 protected BankApplicationManagerInterface appManager
 o state
 protected AtmGuiState state
 o view
 protected AtmGuiView view

Constructors

 o AtmGuiLogic
 public AtmGuiLogic()
 o AtmGuiLogic
 public AtmGuiLogic(AtmGuiView view,
                    AtmGuiState state)
Parameters:
view - bank.gui.ATMGuiView
state - bank.state.ATMGuiState

Methods

 o accept
 public void accept()
 o cancel
 public void cancel()
 o checkBalance
 public int checkBalance()
Returns:
int
 o deposit
 public int deposit(int money) throws MinusAmountException
Parameters:
money - int
 o getAtmGuiState
 public AtmGuiState getAtmGuiState()
Returns:
bank.state.AtmGuiState
 o getAtmGuiView
 public AtmGuiView getAtmGuiView()
Returns:
bank.state.AtmGuiView
 o initManager
 public void initManager(String managerClassName)
BankApplicationManagerのインスタンスを文字列から得てインストールする #pattern: strategy

 o onCheckBalance
 public void onCheckBalance()
AtmGuiCommandから呼ばれるコールバック

 o onDeposit
 public void onDeposit()
AtmGuiCommandから呼ばれるコールバック

 o onWithdraw
 public void onWithdraw()
AtmGuiCommandから呼ばれるコールバック

 o setAtmGuiState
 public void setAtmGuiState(AtmGuiState state)
Parameters:
anAtmguiState - AtmGuiState
 o setAtmGuiView
 public void setAtmGuiView(AtmGuiView view)
Parameters:
view - bank.gui.AtmGuiView
 o setBankApplicationManager
 public void setBankApplicationManager(BankApplicationManagerInterface appManaber)
Parameters:
appMan - bank.boundary.BankApplicationManagerInterface
 o verifyAccount
 public boolean verifyAccount(int anAccountNumber)
Parameters:
anAccountNumber - int
 o withdraw
 public int withdraw(int money) throws MinusAmountException, OverWithdrawException
Parameters:
money - int
Returns:
int

All Packages  Class Hierarchy  This Package  Previous  Next  Index