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 TypeMethodDescriptionvoid
Await continue.protected void
Display menu.protected void
Display menu list.protected void
displayMenuList
(List<String> menuList) Display menu list.protected int
getListSelectionIdx
(List list) Gets list selection idx.protected int
getListSelectionIdx
(List list, boolean showMenuList) Gets list selection idx.void
printChanges
(String label, boolean isSame, String prevStatus, String curStatus) Print changes.protected void
refreshMenu
(LinkedHashMap<String, Runnable> menuMap) Refresh menu.Sets date.setDateTime
(String promptMsg, boolean onlyFuture) Sets date time.Sets double.int
Sets int.Sets string.abstract void
showMenu()
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.
-