UI.GUI.AccountView
index
/home/flempriere/personal_projects/Languages/Python/BeginToCodeWithPython/03_UsefulPython/13_PythonAndGraphicalUserInterfaces/Exercises/03_GraphicalBankingApplication/UI/GUI/AccountView.py

Exercise 13.3g Account View
 
Module providing Graphical View Components for different account types
 
Classes
-------
AccountView
    abstract class for providing a  graphical view for an Account
SavingsAccountView
    class providing a graphical view for a SavingsAccount
LongTermSavingsAccountView
    class providing a graphical view for a LongTermSavingsAccount
CreditAccountView
    class providing a graphical view for a CreditAccount
 
Variables
---------
account_views_dictionary : dict[str, AccountView]
    dictionary mapping `Account.Account.account_type` strings to the corresponding
    `AccountView` subclass

 
Modules
       
Data.Account
abc
tkinter

 
Classes
       
abc.ABC(builtins.object)
AccountView
CreditView
LongTermSavingsAccountView
SavingsAccountView

 
class AccountView(abc.ABC)
    AccountView(root)
 
Abstract class for providing a graphical display of an Account
 
Handles displaying the attributes common to all accounts. Subclasses
should extend this view with subclass specific attributes
 
Attributes
----------
frame
    frame containing this widget
 
 
Method resolution order:
AccountView
abc.ABC
builtins.object

Methods defined here:
__init__(self, root)
Create a new `AccountView`
 
Parameters
----------
root
    parent widget
clear_view(self)
Clear the current view
 
Returns
-------
None
load_into_view(self, account)
Load an account into the view
 
Parameters
----------
account : `Account.Account`
    The account to display

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
__abstractmethods__ = frozenset({'clear_view', 'load_into_view'})

 
class CreditView(AccountView)
    CreditView(root)
 
Specific View implementation for a Credit Account
 
 
Method resolution order:
CreditView
AccountView
abc.ABC
builtins.object

Methods defined here:
__init__(self, root)
Create a new `CreditView`
 
Parameters
----------
root
    parent widget
clear_view(self)
Clear the current view
 
Returns
-------
None
load_into_view(self, account)
Load an account into the view
 
Parameters
----------
account : `Account.Account`
    The account to display

Data and other attributes defined here:
__abstractmethods__ = frozenset()

Data descriptors inherited from AccountView:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
class LongTermSavingsAccountView(AccountView)
    LongTermSavingsAccountView(root)
 
Specific view implementation for a `LongTermSavingsAccount`
 
 
Method resolution order:
LongTermSavingsAccountView
AccountView
abc.ABC
builtins.object

Methods defined here:
__init__(self, root)
Create a new `LongTermSavingsAccountView`
 
Parameters
----------
root
    parent widget
clear_view(self)
Clear the current view
 
Returns
-------
None
load_into_view(self, account)
Load an account into the view
 
Parameters
----------
account : `Account.Account`
    The account to display

Data and other attributes defined here:
__abstractmethods__ = frozenset()

Data descriptors inherited from AccountView:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
class SavingsAccountView(AccountView)
    SavingsAccountView(root)
 
Specific View implementation for a Savings Account
 
 
Method resolution order:
SavingsAccountView
AccountView
abc.ABC
builtins.object

Methods defined here:
__init__(self, root)
Create a new `SavingsAccountView`
 
Parameters
----------
root
    Tkinter root frame for the savings view
clear_view(self)
Clear the current view
 
Returns
-------
None
load_into_view(self, account)
Load an account into the view
 
Parameters
----------
account : `Account.Account`
    The account to display

Data and other attributes defined here:
__abstractmethods__ = frozenset()

Data descriptors inherited from AccountView:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
Data
        account_views_dictionary = {'Credit Account': <class 'UI.GUI.AccountView.CreditView'>, 'Long Term Savings Account': <class 'UI.GUI.AccountView.LongTermSavingsAccountView'>, 'Savings Account': <class 'UI.GUI.AccountView.SavingsAccountView'>}