Package moblima.boundaries
Class Menu
java.lang.Object
moblima.boundaries.Menu
- Direct Known Subclasses:
BookingMenu,CustomerMenu,MovieMenu,SettingsMenu,StaffMenu
The type Menu.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAwait continue.protected voidDisplay menu.protected voidDisplay menu list.protected voiddisplayMenuList(List<String> menuList) Display menu list.protected intgetListSelectionIdx(List list) Gets list selection idx.protected intgetListSelectionIdx(List list, boolean showMenuList) Gets list selection idx.voidprintChanges(String label, boolean isSame, String prevStatus, String curStatus) Print changes.protected voidrefreshMenu(LinkedHashMap<String, Runnable> menuMap) Refresh menu.Sets date.setDateTime(String promptMsg, boolean onlyFuture) Sets date time.Sets double.intSets int.Sets string.abstract voidshowMenu()Show menu.
-
Field Details
-
scanner
The constant scanner.
-
-
Constructor Details
-
Menu
public Menu()
-
-
Method Details
-
displayMenuList
protected void displayMenuList()Display menu list. -
displayMenuList
Display menu list.- Parameters:
menuList- the menu list
-
displayMenu
protected void displayMenu()Display menu. -
awaitContinue
public void awaitContinue()Await continue. -
setDate
Sets date.- Parameters:
promptMsg- the prompt msgonlyFuture- the only future- Returns:
- the date
-
setDateTime
Sets date time.- Parameters:
promptMsg- the prompt msgonlyFuture- the only future- Returns:
- the date time
-
setInt
Sets int.- Parameters:
promptMsg- the prompt msg- Returns:
- the int
-
setDouble
Sets double.- Parameters:
promptMsg- the prompt msg- Returns:
- the double
-
setString
Sets string.- Parameters:
varname- the varnamepromptMsg- the prompt msg- Returns:
- the string
-
printChanges
Print changes.- Parameters:
label- the labelisSame- the is sameprevStatus- the prev statuscurStatus- the cur status
-
getListSelectionIdx
Gets list selection idx.- Parameters:
list- the list- Returns:
- the list selection idx
-
getListSelectionIdx
Gets list selection idx.- Parameters:
list- the listshowMenuList- the show menu list- Returns:
- the list selection idx
-
refreshMenu
Refresh menu.- Parameters:
menuMap- the menu map
-
showMenu
public abstract void showMenu()Show menu.
-