label.mapping_method = Sequence \u27f7 Structure mapping method
status.waiting_for_user_to_select_output_file = Waiting for user to select {0} file
status.cancelled_image_export_operation = Cancelled {0} export operation
+label.make_alignment_image = Create {0} image from alignment
+label.make_pca_image = Make {0} image from PCA
+label.make_pdb_image = Make {0} image from view
info.error_creating_file = Error creating {0} file
exception.outofmemory_loading_mmcif_file = Out of memory loading mmCIF File
label.run_groovy = Run Groovy console script
*/
package jalview.gui;
+import static jalview.util.ImageMaker.TYPE.EPS;
+import static jalview.util.ImageMaker.TYPE.PNG;
+import static jalview.util.ImageMaker.TYPE.SVG;
+
import jalview.analysis.AnnotationSorter;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
alignmentDrawnHeight);
getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(), av,
alignmentGraphics, -1, startRes, endRes + 1);
+
+ /*
+ * reset to left margin
+ */
+ alignmentGraphics.translate(-alignmentGraphicsOffset, 0);
}
return Printable.PAGE_EXISTS;
+ borderBottomOffset;
final int graphicsWidth = Math.max(dim1.width, dim2.width);
- final String imageAction, imageTitle;
- if (type == ImageMaker.TYPE.PNG)
- {
- imageAction = "Create PNG image from alignment";
- imageTitle = null;
- }
- else if (type == ImageMaker.TYPE.EPS)
- {
- imageAction = "Create EPS file from alignment";
- imageTitle = alignFrame.getTitle();
- }
- else
- {
- imageAction = "Create SVG file from alignment";
- imageTitle = alignFrame.getTitle();
- }
+ final String dialogTitle = MessageManager
+ .formatMessage("label.make_alignment_image", type.getName());
+ String imageTitle = type == PNG ? null : alignFrame.getTitle();
- ImageMaker im = new ImageMaker(this, type, imageAction,
+ ImageMaker im = new ImageMaker(this, type, dialogTitle,
graphicsWidth, graphicsHeight, file,
imageTitle, alignFrame, pSessionId, headless);
Graphics graphics = im.getGraphics();
* append coding complement image
*/
graphics.translate(0, dim1.height);
+ boolean test = true;
+ if (test)
+ {
+ graphics.setColor(Color.red);
+ graphics.drawString("Hello world", 0, 0);
+ graphics.setColor(Color.black);
+ }
if (av.getCodingComplement().getWrapAlignment())
{
comp.printWrappedAlignment(dim2.width,
*/
public void makeEPS(File epsFile, boolean forSplitFrame)
{
- makeAlignmentImage(ImageMaker.TYPE.EPS, epsFile, forSplitFrame);
+ makeAlignmentImage(EPS, epsFile, forSplitFrame);
}
/**
*/
public void makePNG(File pngFile, boolean forSplitFrame)
{
- makeAlignmentImage(ImageMaker.TYPE.PNG, pngFile, forSplitFrame);
+ makeAlignmentImage(PNG, pngFile, forSplitFrame);
}
/**
*/
public void makeSVG(File svgFile, boolean forSplitFrame)
{
- makeAlignmentImage(ImageMaker.TYPE.SVG, svgFile, forSplitFrame);
+ makeAlignmentImage(SVG, svgFile, forSplitFrame);
}
public void makePNGImageMap(File imgMapFile, String imageName)
*/
package jalview.gui;
+import static jalview.util.ImageMaker.TYPE.PNG;
+
import jalview.bin.Cache;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.PDBEntry;
import jalview.gui.StructureViewer.ViewerType;
import jalview.structures.models.AAStructureBindingModel;
import jalview.util.BrowserLauncher;
+import jalview.util.ImageMaker;
import jalview.util.MessageManager;
import jalview.util.Platform;
import jalview.ws.dbsources.Pdb;
int width = getWidth();
int height = getHeight();
- jalview.util.ImageMaker im;
-
- if (type == jalview.util.ImageMaker.TYPE.PNG)
- {
- im = new jalview.util.ImageMaker(this,
- jalview.util.ImageMaker.TYPE.PNG, "Make PNG image from view",
- width, height, null, null, null, 0, false);
- }
- else if (type == jalview.util.ImageMaker.TYPE.EPS)
- {
- im = new jalview.util.ImageMaker(this,
- jalview.util.ImageMaker.TYPE.EPS, "Make EPS file from view",
- width, height, null, this.getTitle(), null, 0, false);
- }
- else
- {
-
- im = new jalview.util.ImageMaker(this,
- jalview.util.ImageMaker.TYPE.SVG, "Make SVG file from PCA",
- width, height, null, this.getTitle(), null, 0, false);
- }
+ String dialogTitle = MessageManager
+ .formatMessage("label.make_pdb_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)
{
*/
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)
{