コード例 #1
0
 public Font getFont() {
   if (costForGivenQuantity.compareTo(BigDecimal.ZERO) == 0) {
     return redFont;
   } else {
     return FontUtils.getDejavuRegular7Dark();
   }
 }
コード例 #2
0
 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);
 }