Class MerchandiseLineItem
- java.lang.Object
-
- com.palmer.billingstatementgenerator.models.lineitems.MerchandiseLineItem
-
public class MerchandiseLineItem extends java.lang.ObjectMutable line item wrapping aMerchandisecatalog entry. Adds JavaFX properties for selection state, optional description, quantity, and effective price. The price defaults to the catalog'sdefaultCostbut can be overridden by the user for items that have no default cost. For per-unit items the price is recomputed fromquantity × defaultCostwhenever the spinner value changes.
-
-
Constructor Summary
Constructors Constructor Description MerchandiseLineItem(Merchandise catalog)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.StringPropertydescriptionProperty()MerchandisegetCatalog()java.lang.StringgetDescription()java.math.BigDecimalgetPrice()intgetQuantity()booleanisSelected()javafx.beans.property.ObjectProperty<java.math.BigDecimal>priceProperty()javafx.beans.property.IntegerPropertyquantityProperty()javafx.beans.property.BooleanPropertyselectedProperty()voidsetDescription(java.lang.String value)voidsetPrice(java.math.BigDecimal value)voidsetQuantity(int value)voidsetSelected(boolean value)
-
-
-
Constructor Detail
-
MerchandiseLineItem
public MerchandiseLineItem(Merchandise catalog)
-
-
Method Detail
-
getCatalog
public Merchandise getCatalog()
-
selectedProperty
public javafx.beans.property.BooleanProperty selectedProperty()
-
isSelected
public boolean isSelected()
-
setSelected
public void setSelected(boolean value)
-
descriptionProperty
public javafx.beans.property.StringProperty descriptionProperty()
-
getDescription
public java.lang.String getDescription()
-
setDescription
public void setDescription(java.lang.String value)
-
priceProperty
public javafx.beans.property.ObjectProperty<java.math.BigDecimal> priceProperty()
-
getPrice
public java.math.BigDecimal getPrice()
-
setPrice
public void setPrice(java.math.BigDecimal value)
-
quantityProperty
public javafx.beans.property.IntegerProperty quantityProperty()
-
getQuantity
public int getQuantity()
-
setQuantity
public void setQuantity(int value)
-
-