final AlignmentPanel ap = this;
av.addPropertyChangeListener(new PropertyChangeListener()
{
+ @Override
public void propertyChange(PropertyChangeEvent evt)
{
if (evt.getPropertyName().equals("alignment"))
* automatically adjust annotation panel height for new annotation whilst
* ensuring the alignment is still visible.
*/
+ @Override
public void adjustAnnotationHeight()
{
// TODO: display vertical annotation scrollbar if necessary
* @param evt
* DOCUMENT ME!
*/
+ @Override
public void adjustmentValueChanged(AdjustmentEvent evt)
{
int oldX = av.getStartRes();
// as preference setting
SwingUtilities.invokeLater(new Runnable()
{
+ @Override
public void run()
{
setScrollValues(av.getStartRes(), av.getStartSeq());
* Repaint the alignment including the annotations and overview panels (if
* shown).
*/
+ @Override
public void paintAlignment(boolean updateOverview)
{
final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
* @param g
* DOCUMENT ME!
*/
+ @Override
public void paintComponent(Graphics g)
{
invalidate();
* @throws PrinterException
* DOCUMENT ME!
*/
+ @Override
public int print(Graphics pg, PageFormat pf, int pi)
throws PrinterException
{
void makeAlignmentImage(jalview.util.ImageMaker.TYPE type, File file)
{
- long progress = System.currentTimeMillis();
+ int boarderBottomOffset = 0;
+ long pSessionId = System.currentTimeMillis();
headless = (System.getProperty("java.awt.headless") != null && System
.getProperty("java.awt.headless").equals("true"));
if (alignFrame != null && !headless)
{
- alignFrame.setProgressBar(MessageManager.formatMessage(
+ if (file != null)
+ {
+ alignFrame.setProgressBar(MessageManager.formatMessage(
"status.saving_file", new Object[] { type.getLabel() }),
- progress);
+ pSessionId);
+ }
}
try
{
}
im = new jalview.util.ImageMaker(this, type, imageAction,
- aDimension.getWidth(), aDimension.getHeight(), file,
- imageTitle);
+ aDimension.getWidth(), aDimension.getHeight()
+ + boarderBottomOffset, file,
+ imageTitle, alignFrame, pSessionId, headless);
if (av.getWrapAlignment())
{
if (im.getGraphics() != null)
{
printWrappedAlignment(im.getGraphics(), aDimension.getWidth(),
- aDimension.getHeight(), 0);
+ aDimension.getHeight() + boarderBottomOffset, 0);
im.writeImage();
}
}
im.writeImage();
}
}
+
} catch (OutOfMemoryError err)
{
// Be noisy here.
}
} finally
{
- if (alignFrame != null && !headless)
- {
- alignFrame.setProgressBar(
- MessageManager.getString("status.export_complete"),
- progress);
- }
+
}
}