computableCalculationItem.setPriceLabel(priceLabel);
computableCalculationItem.setTotalPriceForParentLabel(totalPriceForParentLabel);
}
private void drawCalculationItem(FlexTable calculationItemTable, CalculationTreeNode calculationTreeNode) {
CalculationTreeNodeSummary calculationTreeNodeSummary = calculationTreeNode.getSummary();
String pathNodesString = calculationTreeNodeSummary.getPathNodesString();
EditableCalculationItem editableCalculationItem = new EditableCalculationItem();
pathNodesStringToEditableCalculationItemMap.put(pathNodesString, editableCalculationItem);
ComputableCalculationItem computableCalculationItem = new ComputableCalculationItem();
computableCalculationItem.setCalculationItems(calculationTreeNode.getCalculationItems());
computableCalculationItem.setCalculationTreeNodeSummary(calculationTreeNodeSummary);
pathNodesStringToComputableCalculationItemMap.put(pathNodesString, computableCalculationItem);
final int index = calculationItemTable.getRowCount();
String imageUrl = imageUrlProvider.getImage16Url(calculationTreeNodeSummary.getItemCategoryID(), calculationTreeNodeSummary.getItemTypeID(), calculationTreeNodeSummary.getItemTypeIcon());
Image image = new Image(imageUrl);
image.setTitle(calculationTreeNodeSummary.getItemTypeName());
image.addStyleName(resources.css().image16());
EveItemInfoLink imageItemInfoLink = new EveItemInfoLink(ccpJsMessages, image, calculationTreeNodeSummary.getItemTypeID());
calculationItemTable.setWidget(index, 0, imageItemInfoLink);
calculationItemTable.setWidget(index, 1, new EveItemMarketDetailsLink(constants, urlMessages, ccpJsMessages, calculationTreeNodeSummary.getItemTypeName(), calculationTreeNodeSummary.getItemTypeID()));
calculationItemTable.setWidget(index, 2, new Label("x"));
QuantityLabel quantityLabel = new QuantityLabel(calculationTreeNodeSummary.getQuantity());
HorizontalPanel quantityAndDamagePerJobPanel = new HorizontalPanel();
quantityAndDamagePerJobPanel.add(quantityLabel);
BigDecimal damagePerJob = calculationTreeNodeSummary.getDamagePerJob();
if (BigDecimal.ONE.compareTo(damagePerJob) == 1) {
DamagePerJobLabel damagePerJobLabel = new DamagePerJobLabel(damagePerJob);
damagePerJobLabel.addStyleName(resources.css().damagePerJob());
quantityAndDamagePerJobPanel.add(damagePerJobLabel);
quantityAndDamagePerJobPanel.setCellVerticalAlignment(damagePerJobLabel, HasVerticalAlignment.ALIGN_BOTTOM);
}
calculationItemTable.setWidget(index, 3, quantityAndDamagePerJobPanel);
calculationItemTable.setWidget(index, 4, new Label("x"));
PriceLabel priceLabel = new PriceLabel(calculationTreeNodeSummary.getPrice());
calculationItemTable.setWidget(index, 5, priceLabel);
calculationItemTable.setWidget(index, 6, new Label("="));
PriceLabel totalPriceLabel = new PriceLabel(calculationTreeNodeSummary.getTotalPrice());
calculationItemTable.setWidget(index, 7, totalPriceLabel);
calculationItemTable.setWidget(index, 8, new Label("x"));
QuantityLabel parentQuantityLabel = new QuantityLabel(calculationTreeNodeSummary.getParentQuantity());
calculationItemTable.setWidget(index, 9, parentQuantityLabel);
calculationItemTable.setWidget(index, 10, new Label("="));
PriceLabel totalPriceForParentLabel = new PriceLabel(calculationTreeNodeSummary.getTotalPriceForParent());
calculationItemTable.setWidget(index, 11, totalPriceForParentLabel);
if (hasBlueprint(calculationTreeNodeSummary.getItemCategoryID(), calculationTreeNodeSummary.getItemTypeID())) {
OpaqueLoadableBlueprintImage blueprintImage = new OpaqueLoadableBlueprintImage(resources, messages, messages.useBlueprint(), messages.stopUsingBlueprint());
blueprintImage.addStyleName(resources.css().image16());
blueprintImage.addStyleName(resources.css().cursorHand());
blueprintImage.setOpacity();
calculationItemTable.setWidget(index, 12, blueprintImage);