public class GroceryListSelectionController extends SelectionController
Modifier and Type | Field and Description |
---|---|
private GroceryListDB |
groceryListDB |
private static java.lang.String |
TITLE
The title that needs to be passed to the selectionView
|
view
master
Constructor and Description |
---|
GroceryListSelectionController(ControllerMaster master) |
Modifier and Type | Method and Description |
---|---|
protected void |
onCreateItem(java.lang.String newListName)
Creates the new grocery list, adds it to the DB and then shows the "Edit
Grocery List" screen with the newly created (empty) list.
|
protected void |
onDelete(java.lang.String listName)
Deletes a groceryList from the database
|
void |
onSelection(java.lang.String choice)
Shows the selected grocery list.
|
createNewItem, deleteItem, getItemNames, getView, initializeView, setItemNames
onHelpViewStatusChanged, onLogout, onShowAllGroceryLists, onShowAllRecipes, onShowEditProfile, onShowHelp, onShowMap, setView
isHelpOpen
private static final java.lang.String TITLE
private GroceryListDB groceryListDB
public GroceryListSelectionController(ControllerMaster master)
protected void onCreateItem(java.lang.String newListName) throws ItemCreationException
onCreateItem
in class SelectionController
ItemCreationException
protected void onDelete(java.lang.String listName) throws DatabaseException
onDelete
in class SelectionController
listName
- name of the grocery list to deleteDatabaseException
public void onSelection(java.lang.String choice)
onSelection
in class SelectionController
choice
- Chosen grocery list