*/
package jalview.gui;
+import static jalview.util.ImageMaker.TYPE.PNG;
+
import jalview.analysis.scoremodels.ScoreModels;
import jalview.api.AlignViewportI;
import jalview.api.analysis.ScoreModelI;
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)
{