Class CashierController
java.lang.Object
app.controller.cashier.CashierController
Controller for the cashier to update the UI and database
- Author:
- Truman Porter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javafx.collections.ObservableList<CashierController.CartLine> private javafx.scene.control.TableView<CashierController.CartLine> private javafx.scene.layout.HBoxprivate javafx.scene.control.Labelprivate javafx.scene.layout.VBoxprivate intprivate javafx.scene.control.ToggleGroupprivate javafx.scene.control.TableColumn<CashierController.CartLine, String> private final ItemDAOprivate javafx.scene.layout.TilePaneprivate final OrderDAOprivate javafx.scene.control.ChoiceBox<String> private javafx.scene.control.TableColumn<CashierController.CartLine, Integer> private Itemprivate javafx.scene.control.Labelprivate javafx.scene.control.ToggleGroupprivate static final BigDecimalprivate javafx.scene.control.Labelprivate javafx.scene.layout.FlowPaneprivate javafx.scene.control.Label -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate static intprivate voidprivate voidprivate voidloadMenu()private voidprivate voidprivate voidprivate voidprivate voidprivate voidprivate voidonSelectCategory(javafx.event.ActionEvent event) private voidonSelectItem(javafx.event.ActionEvent event) private voidprivate voidprivate static StringselectedText(javafx.scene.control.ToggleGroup group, String fallback) private static voidselectToggle(javafx.scene.control.ToggleGroup group, String text) private voidshowCategory(String category) private voidprivate BigDecimalsubtotal()private BigDecimaltax(BigDecimal subtotal) private static StringtoppingNames(List<Mod> mods) private void
-
Field Details
-
TAX_RATE
-
PAYMENT_TYPES
-
itemDAO
-
orderDAO
-
employeeId
private int employeeId -
cartTable
-
itemColumn
-
qtyColumn
-
subtotalLabel
private javafx.scene.control.Label subtotalLabel -
taxLabel
private javafx.scene.control.Label taxLabel -
totalLabel
private javafx.scene.control.Label totalLabel -
categoryBar
private javafx.scene.layout.HBox categoryBar -
itemGrid
private javafx.scene.layout.TilePane itemGrid -
customizationPanel
private javafx.scene.layout.VBox customizationPanel -
customizationItemLabel
private javafx.scene.control.Label customizationItemLabel -
toppingsPane
private javafx.scene.layout.FlowPane toppingsPane -
iceGroup
private javafx.scene.control.ToggleGroup iceGroup -
sugarGroup
private javafx.scene.control.ToggleGroup sugarGroup -
paymentChoice
-
cart
-
selectedItem
-
-
Constructor Details
-
CashierController
public CashierController()
-
-
Method Details
-
initialize
private void initialize() -
findCashierId
private static int findCashierId() -
loadMenu
private void loadMenu() -
loadToppings
private void loadToppings() -
onSelectCategory
private void onSelectCategory(javafx.event.ActionEvent event) -
showCategory
-
onSelectItem
private void onSelectItem(javafx.event.ActionEvent event) -
onAddToCart
private void onAddToCart() -
selectedText
-
resetCustomization
private void resetCustomization() -
selectToggle
-
showCustomization
private void showCustomization() -
hideCustomization
private void hideCustomization() -
subtotal
-
tax
-
updateTotals
private void updateTotals() -
onCheckout
private void onCheckout() -
printReceipt
private void printReceipt() -
onClearCart
private void onClearCart() -
clearCart
private void clearCart() -
toppingNames
-