Class MerchandiseController
- java.lang.Object
-
- com.palmer.billingstatementgenerator.views.controllers.BaseController
-
- com.palmer.billingstatementgenerator.views.controllers.GridTabController<MerchandiseLineItem>
-
- com.palmer.billingstatementgenerator.views.controllers.MerchandiseController
-
public class MerchandiseController extends GridTabController<MerchandiseLineItem>
Controller for the Merchandise tab. Renders a grid of merchandise line items, supporting three display modes:- Per-unit items (e.g. Memorial Video) — shown with a quantity spinner and computed total
- Items with no default cost — shown with an editable price field
- Items with a default cost — shown with a read-only price label
-
-
Field Summary
-
Fields inherited from class com.palmer.billingstatementgenerator.views.controllers.GridTabController
itemsGrid
-
Fields inherited from class com.palmer.billingstatementgenerator.views.controllers.BaseController
clearButton, DOLLAR_FORMATTER, nextButton
-
-
Constructor Summary
Constructors Constructor Description MerchandiseController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javafx.scene.control.CheckBoxaddItemRow(MerchandiseLineItem item, int row)Builds a row for the given merchandise line item.protected java.util.List<MerchandiseLineItem>getItems()Returns the list of merchandise line items from the current statement.-
Methods inherited from class com.palmer.billingstatementgenerator.views.controllers.GridTabController
addValidationPair, buildView, clearAll, hasInvalidSelections, onClearButtonSet, refreshTotal, reset, setTotalSupplier
-
Methods inherited from class com.palmer.billingstatementgenerator.views.controllers.BaseController
bindIntegerTextField, buildCheckBox, buildPriceField, buildPriceLabel, buildTextField, configTextFieldForInts, configureClearButton, onHide, onNextButtonSet, onShow, setClearButton, setNextButton, wireTextFieldToCheckBox
-
-
-
-
Method Detail
-
getItems
protected java.util.List<MerchandiseLineItem> getItems()
Returns the list of merchandise line items from the current statement.- Specified by:
getItemsin classGridTabController<MerchandiseLineItem>- Returns:
- the list of
MerchandiseLineItemobjects
-
addItemRow
protected javafx.scene.control.CheckBox addItemRow(MerchandiseLineItem item, int row)
Builds a row for the given merchandise line item. The price column is rendered differently based on the item's pricing mode and default cost.- Specified by:
addItemRowin classGridTabController<MerchandiseLineItem>- Parameters:
item- the merchandise line item to renderrow- the grid row index- Returns:
- the
CheckBoxcreated for this row
-
-