public Font getFont() { if (costForGivenQuantity.compareTo(BigDecimal.ZERO) == 0) { return redFont; } else { return FontUtils.getDejavuRegular7Dark(); } }
public CostCalculationMaterial( String productNumber, String unit, BigDecimal productQuantity, BigDecimal costForGivenQuantity) { this.productNumber = productNumber; this.unit = unit; this.productQuantity = productQuantity; this.costForGivenQuantity = costForGivenQuantity; this.totalCost = costForGivenQuantity; this.toAdd = BigDecimal.ZERO; redFont = new Font(FontUtils.getDejavu(), 7); redFont.setColor(Color.RED); }