import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.bin.Cache;
+import jalview.bin.Console;
import jalview.bin.Jalview;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.HiddenColumns;
import jalview.util.Comparison;
import jalview.util.ImageMaker;
import jalview.util.MessageManager;
+import jalview.util.imagemaker.BitmapImageSizing;
import jalview.viewmodel.ViewportListenerI;
import jalview.viewmodel.ViewportRanges;
// to prevent drawing old image
FontMetrics fm = getFontMetrics(av.getFont());
+ // update the flag controlling whether the grid is too small to render the
+ // font
+ av.validCharWidth = fm.charWidth('M') <= av.getCharWidth();
+
scalePanelHolder.setPreferredSize(
new Dimension(10, av.getCharHeight() + fm.getDescent()));
idSpaceFillerPanel1.setPreferredSize(
// could not be validated and it is not clear if it is now being
// called. Log warning here in case it is called and unforeseen
// problems occur
- Cache.log.warn(
+ Console.warn(
"Unexpected path through code: Wrapped jar file opened with wrap alignment set in preferences");
// scroll to start of panel
*/
alignmentGraphics.translate(alignmentGraphicsOffset,
alignmentDrawnHeight);
+ updateLayout();
getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(), av,
alignmentGraphics, -1, startRes, endRes + 1);
}
return (w > 0 ? w : calculateIdWidth().width);
}
+ void makeAlignmentImage(ImageMaker.TYPE type, File file, String renderer)
+ {
+ makeAlignmentImage(type, file, renderer,
+ BitmapImageSizing.nullBitmapImageSizing());
+ }
+
/**
* Builds an image of the alignment of the specified type (EPS/PNG/SVG) and
* writes it to the specified file
*
* @param type
* @param file
+ * @param textrenderer
+ * @param bitmapscale
*/
- void makeAlignmentImage(ImageMaker.TYPE type, File file)
+ void makeAlignmentImage(ImageMaker.TYPE type, File file, String renderer,
+ BitmapImageSizing userBis)
{
final int borderBottomOffset = 5;
int imageWidth = aDimension.getWidth();
int imageHeight = aDimension.getHeight() + borderBottomOffset;
String of = MessageManager.getString("label.alignment");
- exporter.doExport(file, this, imageWidth, imageHeight, of);
+ exporter.doExport(file, this, imageWidth, imageHeight, of, renderer,
+ userBis);
}
/**
}
else
{
- if (Cache.log.isDebugEnabled())
+ if (Console.isDebugEnabled())
{
- Cache.log.warn("Closing alignment panel which is already closed.");
+ Console.warn("Closing alignment panel which is already closed.");
}
}
}
setAlignFrameView();
}
}
+
public void setAlignFrameView()
{
alignFrame.setDisplayedView(this);
}
-
+
@Override
public StructureSelectionManager getStructureSelectionManager()
{