public AddItemBatchScaleImporterController( Resolution sourceResolution, List<ImageInformation> information) { this.observers = new HashSet<AddItemBatchScaleDialogObserver>(); this.targetResolutions = new HashSet<Resolution>(); for (ImageInformation imageInformation : information) { targetResolutions.add(imageInformation.getTargetResolution()); } final ImageInformation baseInformation = information.get(0); init(baseInformation.getImageFile()); this.exportName = baseInformation.getExportName(); this.sourceResolution = sourceResolution; this.algorithm = baseInformation.getAlgorithm(); this.method = algorithm.getPrettyMethod(baseInformation.getMethod()); this.exportRoot = baseInformation.getExportPath(); this.isNinePatch = baseInformation.isNinePatch(); this.format = baseInformation.getFormat(); this.targetHeight = getOriginalTargetSize( sourceResolution, baseInformation.getTargetResolution(), targetHeight, baseInformation.getFactor()); this.targetWidth = getOriginalTargetSize( sourceResolution, baseInformation.getTargetResolution(), targetWidth, baseInformation.getFactor()); }