Package lv.odylab.evemanage.client.rpc.dto.blueprint

Examples of lv.odylab.evemanage.client.rpc.dto.blueprint.MaterialDto


        List<RequirementDto> copyingRequirements = details.getCopyingRequirements();
        List<RequirementDto> inventionRequirements = details.getInventionRequirements();
        Map<MaterialDto, QuantityLabel> materialToWidgetMap = new HashMap<MaterialDto, QuantityLabel>();
        Map<RequirementDto, QuantityLabel> requirementToWidgetMap = new HashMap<RequirementDto, QuantityLabel>();
        for (int i = 0; i < materials.size(); i++) {
            MaterialDto material = materials.get(i);
            String imageUrl = imageUrlProvider.getImage16Url(material.getMaterialTypeCategoryID(), material.getMaterialTypeID(), material.getMaterialTypeGraphicIcon());
            Image image = new Image(imageUrl);
            image.setTitle(material.getMaterialTypeName());
            image.addStyleName(resources.css().image16());
            EveItemInfoLink imageItemInfoLink = new EveItemInfoLink(ccpJsMessages, image, material.getMaterialTypeID());
            materialsTable.setWidget(i, 0, imageItemInfoLink);
            materialsTable.setWidget(i, 1, new EveItemMarketDetailsLink(constants, urlMessages, ccpJsMessages, material.getMaterialTypeName(), material.getMaterialTypeID()));
            materialsTable.setWidget(i, 2, new Label("x"));
            QuantityLabel quantityLabel = new QuantityLabel();
            materialsTable.setWidget(i, 3, quantityLabel);
            materialToWidgetMap.put(material, quantityLabel);
        }
View Full Code Here


        this.sharingLevelLabel = sharingLevelLabel;
    }

    public void recalculate(BlueprintDto blueprint, EveCalculator calculator) {
        for (Map.Entry<MaterialDto, QuantityLabel> mapEntry : materialToWidgetMap.entrySet()) {
            MaterialDto material = mapEntry.getKey();
            QuantityLabel quantityLabel = mapEntry.getValue();
            quantityLabel.setQuantity(calculator.calculateMaterialAmount(material.getQuantity(), blueprint.getMaterialLevel(), blueprintDetails.getWasteFactor()));
        }
        for (Map.Entry<RequirementDto, QuantityLabel> mapEntry : requirementToWidgetMap.entrySet()) {
            RequirementDto requirement = mapEntry.getKey();
            QuantityLabel quantityLabel = mapEntry.getValue();
            quantityLabel.setQuantity(requirement.getQuantity());
View Full Code Here

        return blueprintDto;
    }

    @Override
    public MaterialDto map(TypeMaterialDto typeMaterial, Class<MaterialDto> blueprintMaterialDtoClass) {
        MaterialDto materialDto = new MaterialDto();
        materialDto.setMaterialTypeID(typeMaterial.getMaterialTypeID());
        materialDto.setMaterialTypeName(typeMaterial.getMaterialTypeName());
        materialDto.setMaterialTypeCategoryID(typeMaterial.getMaterialTypeCategoryID());
        materialDto.setQuantity(typeMaterial.getQuantity());
        materialDto.setMaterialTypeGraphicIcon(typeMaterial.getMaterialTypeGraphicIcon());
        return materialDto;
    }
View Full Code Here

        return typeMaterialDto;
    }

    @Override
    public MaterialDto map(InvTypeMaterialDto invTypeMaterialDto, Class<MaterialDto> materialDtoClass) {
        MaterialDto materialDto = new MaterialDto();
        materialDto.setMaterialTypeID(invTypeMaterialDto.getMaterialTypeID());
        materialDto.setMaterialTypeName(invTypeMaterialDto.getMaterialTypeName());
        materialDto.setMaterialTypeCategoryID(invTypeMaterialDto.getMaterialTypeCategoryID());
        materialDto.setQuantity(invTypeMaterialDto.getQuantity());
        materialDto.setMaterialTypeGraphicIcon(invTypeMaterialDto.getMaterialTypeIcon());
        return materialDto;
    }
View Full Code Here

TOP

Related Classes of lv.odylab.evemanage.client.rpc.dto.blueprint.MaterialDto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.