Class MerchandiseLineItem


  • public class MerchandiseLineItem
    extends java.lang.Object
    Mutable line item wrapping a Merchandise catalog entry. Adds JavaFX properties for selection state, optional description, quantity, and effective price. The price defaults to the catalog's defaultCost but can be overridden by the user for items that have no default cost. For per-unit items the price is recomputed from quantity × defaultCost whenever the spinner value changes.
    • Constructor Detail

      • MerchandiseLineItem

        public MerchandiseLineItem​(Merchandise catalog)
    • Method Detail

      • 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)