X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FPCAPanel.java;h=a833f9882494fad17077447aada1c22ff1306fec;hb=9770f7a914079cf2b1f05c90fb6c4d373e22b444;hp=4f660a27f5e11ade8ed243446484dcf89071d849;hpb=dd4a158f642b66b20b47648da174a222ce3871bd;p=jalview.git diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java index 4f660a2..a833f98 100644 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -20,6 +20,8 @@ */ package jalview.gui; +import static jalview.util.ImageMaker.TYPE.PNG; + import jalview.analysis.scoremodels.ScoreModels; import jalview.api.AlignViewportI; import jalview.api.analysis.ScoreModelI; @@ -431,25 +433,11 @@ public class PCAPanel extends GPCAPanel int width = getRotatableCanvas().getWidth(); int height = getRotatableCanvas().getHeight(); - ImageMaker im; - - switch (type) - { - case PNG: - im = new ImageMaker(this, ImageMaker.TYPE.PNG, - "Make PNG image from PCA", width, height, null, null, null, 0, - false); - break; - case EPS: - im = new ImageMaker(this, ImageMaker.TYPE.EPS, - "Make EPS file from PCA", width, height, null, - this.getTitle(), null, 0, false); - break; - default: - im = new ImageMaker(this, ImageMaker.TYPE.SVG, - "Make SVG file from PCA", width, height, null, - this.getTitle(), null, 0, false); - } + String dialogTitle = MessageManager + .formatMessage("label.make_pca_image", type.getName()); + String imageTitle = type == PNG ? null : this.getTitle(); + ImageMaker im = new ImageMaker(this, type, dialogTitle, width, height, + null, imageTitle, null, 0, false); if (im.getGraphics() != null) {