2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.appletgui;
23 import java.awt.BorderLayout;
24 import java.awt.Color;
25 import java.awt.Dimension;
26 import java.awt.FontMetrics;
27 import java.awt.Frame;
28 import java.awt.Graphics;
29 import java.awt.Panel;
30 import java.awt.Scrollbar;
31 import java.awt.event.AdjustmentEvent;
32 import java.awt.event.AdjustmentListener;
33 import java.awt.event.ComponentAdapter;
34 import java.awt.event.ComponentEvent;
36 import jalview.analysis.AnnotationSorter;
37 import jalview.api.AlignViewportI;
38 import jalview.api.AlignmentViewPanel;
39 import jalview.datamodel.AlignmentI;
40 import jalview.datamodel.SearchResults;
41 import jalview.datamodel.SequenceI;
42 import jalview.structure.StructureSelectionManager;
44 public class AlignmentPanel extends Panel implements AdjustmentListener,
48 public AlignViewport av;
50 OverviewPanel overviewPanel;
56 IdwidthAdjuster idwidthAdjuster;
58 public AlignFrame alignFrame;
60 ScalePanel scalePanel;
62 AnnotationPanel annotationPanel;
64 AnnotationLabels alabels;
66 // this value is set false when selection area being dragged
67 boolean fastPaint = true;
69 public void finalize()
74 seqPanelHolder = null;
75 sequenceHolderPanel = null;
77 scalePanelHolder = null;
78 annotationPanel = null;
79 annotationPanelHolder = null;
80 annotationSpaceFillerHolder = null;
83 public AlignmentPanel(AlignFrame af, final AlignViewport av)
95 seqPanel = new SeqPanel(av, this);
96 idPanel = new IdPanel(av, this);
97 scalePanel = new ScalePanel(av, this);
98 idwidthAdjuster = new IdwidthAdjuster(this);
99 annotationPanel = new AnnotationPanel(this);
100 annotationPanelHolder.add(annotationPanel, BorderLayout.CENTER);
102 sequenceHolderPanel.add(annotationPanelHolder, BorderLayout.SOUTH);
103 alabels = new AnnotationLabels(this);
105 setAnnotationVisible(av.isShowAnnotation());
107 idPanelHolder.add(idPanel, BorderLayout.CENTER);
108 idSpaceFillerPanel1.add(idwidthAdjuster, BorderLayout.CENTER);
109 annotationSpaceFillerHolder.add(alabels, BorderLayout.CENTER);
110 scalePanelHolder.add(scalePanel, BorderLayout.CENTER);
111 seqPanelHolder.add(seqPanel, BorderLayout.CENTER);
114 setScrollValues(0, 0);
116 apvscroll.addAdjustmentListener(this);
117 hscroll.addAdjustmentListener(this);
118 vscroll.addAdjustmentListener(this);
120 addComponentListener(new ComponentAdapter()
122 public void componentResized(ComponentEvent evt)
124 setScrollValues(av.getStartRes(), av.getStartSeq());
125 if (getSize().height > 0
126 && annotationPanelHolder.getSize().height > 0)
128 validateAnnotationDimensions(false);
135 Dimension d = calculateIdWidth();
136 idPanel.idCanvas.setSize(d);
138 hscrollFillerPanel.setSize(d.width, annotationPanel.getSize().height);
140 idPanel.idCanvas.setSize(d.width, seqPanel.seqCanvas.getSize().height);
141 annotationSpaceFillerHolder.setSize(d.width,
142 annotationPanel.getSize().height);
143 alabels.setSize(d.width, annotationPanel.getSize().height);
144 final AlignmentPanel ap = this;
145 av.addPropertyChangeListener(new java.beans.PropertyChangeListener()
147 public void propertyChange(java.beans.PropertyChangeEvent evt)
149 if (evt.getPropertyName().equals("alignment"))
151 PaintRefresher.Refresh(ap, av.getSequenceSetId(), true, true);
159 public AlignViewportI getAlignViewport()
163 public SequenceRenderer getSequenceRenderer()
165 return seqPanel.seqCanvas.sr;
168 public jalview.api.FeatureRenderer getFeatureRenderer()
170 return seqPanel.seqCanvas.fr;
173 public jalview.api.FeatureRenderer cloneFeatureRenderer()
175 FeatureRenderer nfr = new FeatureRenderer(av);
176 nfr.transferSettings(seqPanel.seqCanvas.fr);
179 public void alignmentChanged()
181 av.alignmentChanged(this);
183 if (overviewPanel != null)
185 overviewPanel.updateOverviewImage();
188 alignFrame.updateEditMenuBar();
193 public void fontChanged()
195 // set idCanvas bufferedImage to null
196 // to prevent drawing old image
197 idPanel.idCanvas.image = null;
198 FontMetrics fm = getFontMetrics(av.getFont());
200 scalePanel.setSize(new Dimension(10, av.getCharHeight()
202 idwidthAdjuster.setSize(new Dimension(10, av.getCharHeight()
204 av.updateSequenceIdColours();
205 annotationPanel.image = null;
206 int ap = annotationPanel.adjustPanelHeight(false);
207 Dimension d = calculateIdWidth();
208 d.setSize(d.width + 4, seqPanel.seqCanvas.getSize().height);
209 alabels.setSize(d.width + 4, ap);
211 idPanel.idCanvas.setSize(d);
212 hscrollFillerPanel.setSize(d);
214 validateAnnotationDimensions(false);
215 annotationPanel.repaint();
219 if (overviewPanel != null)
221 overviewPanel.updateOverviewImage();
225 public void setIdWidth(int w, int h)
227 idPanel.idCanvas.setSize(w, h);
228 idPanelHolder.setSize(w, idPanelHolder.getSize().height);
229 annotationSpaceFillerHolder.setSize(w,
230 annotationSpaceFillerHolder.getSize().height);
231 alabels.setSize(w, alabels.getSize().height);
235 Dimension calculateIdWidth()
237 if (av.nullFrame == null)
239 av.nullFrame = new Frame();
240 av.nullFrame.addNotify();
243 Graphics g = av.nullFrame.getGraphics();
245 FontMetrics fm = g.getFontMetrics(av.font);
246 AlignmentI al = av.getAlignment();
251 while (i < al.getHeight() && al.getSequenceAt(i) != null)
253 SequenceI s = al.getSequenceAt(i);
254 id = s.getDisplayId(av.getShowJVSuffix());
256 if (fm.stringWidth(id) > idWidth)
258 idWidth = fm.stringWidth(id);
263 // Also check annotation label widths
265 if (al.getAlignmentAnnotation() != null)
267 fm = g.getFontMetrics(av.nullFrame.getFont());
268 while (i < al.getAlignmentAnnotation().length)
270 String label = al.getAlignmentAnnotation()[i].label;
271 if (fm.stringWidth(label) > idWidth)
273 idWidth = fm.stringWidth(label);
279 return new Dimension(idWidth, idPanel.idCanvas.getSize().height);
283 * Highlight the given results on the alignment.
286 public void highlightSearchResults(SearchResults results)
288 scrollToPosition(results);
289 seqPanel.seqCanvas.highlightSearchResults(results);
293 * scroll the view to show the position of the highlighted region in results
294 * (if any) and redraw the overview
297 * @return false if results were not found
299 public boolean scrollToPosition(SearchResults results)
301 return scrollToPosition(results, true);
305 * scroll the view to show the position of the highlighted region in results
309 * @param redrawOverview
310 * - when set, the overview will be recalculated (takes longer)
311 * @return false if results were not found
313 public boolean scrollToPosition(SearchResults results,
314 boolean redrawOverview)
317 // do we need to scroll the panel?
318 if (results != null && results.getSize() > 0)
320 AlignmentI alignment = av.getAlignment();
321 int seqIndex = alignment.findIndex(results);
326 SequenceI seq = alignment.getSequenceAt(seqIndex);
327 int[] r = results.getResults(seq, 0, alignment.getWidth());
333 .println("DEBUG: scroll didn't happen - results not within alignment : "
334 + seq.getStart() + "," + seq.getEnd());
342 * System.out.println("DEBUG: scroll: start=" + r[0] +
343 * " av.getStartRes()=" + av.getStartRes() + " end=" + r[1] +
344 * " seq.end=" + seq.getEnd() + " av.getEndRes()=" + av.getEndRes() +
345 * " hextent=" + hextent);
354 if (end == seq.getEnd())
358 return scrollTo(start, end, seqIndex, false, redrawOverview);
363 public boolean scrollTo(int ostart, int end, int seqIndex,
364 boolean scrollToNearest, boolean redrawOverview)
366 int startv, endv, starts, ends, width;
369 if (av.hasHiddenColumns())
371 start = av.getColumnSelection().findColumnPosition(ostart);
372 end = av.getColumnSelection().findColumnPosition(end);
375 if (!scrollToNearest && !av.getColumnSelection().isVisible(ostart))
377 // don't scroll - position isn't visible
386 if (!av.getWrapAlignment())
389 * int spos=av.getStartRes(),sqpos=av.getStartSeq(); if ((startv =
390 * av.getStartRes()) >= start) { spos=start-1; // seqIn //
391 * setScrollValues(start - 1, seqIndex); } else if ((endv =
392 * av.getEndRes()) <= end) { // setScrollValues(spos=startv + 1 + end -
393 * endv, seqIndex); spos=startv + 1 + end - endv; } else if ((starts =
394 * av.getStartSeq()) > seqIndex) { setScrollValues(av.getStartRes(),
395 * seqIndex); } else if ((ends = av.getEndSeq()) <= seqIndex) {
396 * setScrollValues(av.getStartRes(), starts + seqIndex - ends + 1); }
400 if ((av.getStartRes() > end)
401 || (av.getEndRes() < start)
402 || ((av.getStartSeq() > seqIndex) || (av.getEndSeq() < seqIndex)))
404 if (start > av.getAlignment().getWidth() - hextent)
406 start = av.getAlignment().getWidth() - hextent;
413 if (seqIndex > av.getAlignment().getHeight() - vextent)
415 seqIndex = av.getAlignment().getHeight() - vextent;
421 // System.out.println("trying to scroll to: "+start+" "+seqIndex);
422 setScrollValues(start, seqIndex);
427 scrollToWrappedVisible(start);
429 if (redrawOverview && overviewPanel != null)
431 overviewPanel.setBoxPosition();
433 paintAlignment(redrawOverview);
437 void scrollToWrappedVisible(int res)
439 int cwidth = seqPanel.seqCanvas
440 .getWrappedCanvasWidth(seqPanel.seqCanvas.getSize().width);
441 if (res <= av.getStartRes() || res >= (av.getStartRes() + cwidth))
443 vscroll.setValue(res / cwidth);
444 av.startRes = vscroll.getValue() * cwidth;
448 public OverviewPanel getOverviewPanel()
450 return overviewPanel;
453 public void setOverviewPanel(OverviewPanel op)
458 public void setAnnotationVisible(boolean b)
460 if (!av.getWrapAlignment())
462 annotationSpaceFillerHolder.setVisible(b);
463 annotationPanelHolder.setVisible(b);
467 annotationSpaceFillerHolder.setVisible(false);
468 annotationPanelHolder.setVisible(false);
475 * automatically adjust annotation panel height for new annotation whilst
476 * ensuring the alignment is still visible.
478 public void adjustAnnotationHeight()
480 // TODO: display vertical annotation scrollbar if necessary
481 // this is called after loading new annotation onto alignment
482 if (alignFrame.getSize().height == 0)
485 .println("adjustAnnotationHeight frame size zero NEEDS FIXING");
488 validateAnnotationDimensions(true);
489 apvscroll.addNotify();
492 paintAlignment(true);
496 * calculate the annotation dimensions and refresh slider values accordingly.
497 * need to do repaints/notifys afterwards.
499 protected void validateAnnotationDimensions(boolean adjustPanelHeight)
501 boolean modified = false;
502 int height = av.calcPanelHeight();
504 if (hscroll.isVisible())
506 height += (minsize = hscroll.getPreferredSize().height);
508 if (apvscroll.isVisible())
510 minsize += apvscroll.getPreferredSize().height;
512 int mheight = height;
513 Dimension d = sequenceHolderPanel.getSize(), e = idPanel.getSize();
514 int seqandannot = d.height - scalePanelHolder.getSize().height;
516 if (adjustPanelHeight)
518 // NOTE: this logic is different in the application. Need a better
519 // algorithm to define behaviour
520 // sets initial preferred height
521 // try and set height according to alignment
522 float sscaling = (float) ((av.getCharHeight() * av.getAlignment()
523 .getHeight()) / (1.0 * mheight));
526 // if the alignment is too big then
527 // default is 0.5 split
528 height = seqandannot / 2;
532 // otherwise just set the panel so that one row of sequence is visible
533 height = -av.getCharHeight() * 1
534 + (int) (seqandannot * (1 - sscaling));
539 // maintain same window layout whilst updating sliders
540 height = annotationPanelHolder.getSize().height;
543 if (seqandannot - height < 5)
545 height = seqandannot;
547 annotationPanel.setSize(new Dimension(d.width, height));
548 alabels.setSize(new Dimension(e.width, height));
549 annotationSpaceFillerHolder.setSize(new Dimension(e.width, height));
550 annotationPanelHolder.setSize(new Dimension(d.width, height));
551 // seqPanelHolder.setSize(d.width, seqandannot - height);
553 .setSize(d.width, seqPanel.seqCanvas.getSize().height);
554 int s = apvscroll.getValue();
555 if (s > mheight - height)
559 apvscroll.setValues(s, height, 0, mheight);
560 annotationPanel.setScrollOffset(apvscroll.getValue(), false);
561 alabels.setScrollOffset(apvscroll.getValue(), false);
564 public void setWrapAlignment(boolean wrap)
568 scalePanelHolder.setVisible(!wrap);
570 hscroll.setVisible(!wrap);
571 idwidthAdjuster.setVisible(!wrap);
575 annotationPanelHolder.setVisible(false);
576 annotationSpaceFillerHolder.setVisible(false);
578 else if (av.isShowAnnotation())
580 annotationPanelHolder.setVisible(true);
581 annotationSpaceFillerHolder.setVisible(true);
584 idSpaceFillerPanel1.setVisible(!wrap);
586 fontChanged(); // This is so that the scalePanel is resized correctly
589 sequenceHolderPanel.validate();
598 // return value is true if the scroll is valid
599 public boolean scrollUp(boolean up)
603 if (vscroll.getValue() < 1)
607 setScrollValues(hscroll.getValue(), vscroll.getValue() - 1);
611 if (vextent + vscroll.getValue() >= av.getAlignment().getHeight())
615 setScrollValues(hscroll.getValue(), vscroll.getValue() + 1);
622 public boolean scrollRight(boolean right)
626 if (hscroll.getValue() < 1)
630 setScrollValues(hscroll.getValue() - 1, vscroll.getValue());
634 if (hextent + hscroll.getValue() >= av.getAlignment().getWidth())
638 setScrollValues(hscroll.getValue() + 1, vscroll.getValue());
645 public void setScrollValues(int x, int y)
647 int width = av.getAlignment().getWidth();
648 int height = av.getAlignment().getHeight();
650 if (av.hasHiddenColumns())
652 width = av.getColumnSelection().findColumnPosition(width);
660 hextent = seqPanel.seqCanvas.getSize().width / av.getCharWidth();
661 vextent = seqPanel.seqCanvas.getSize().height / av.getCharHeight();
668 if (vextent > height)
673 if ((hextent + x) > width)
675 System.err.println("hextent was " + hextent + " and x was " + x);
680 if ((vextent + y) > height)
682 y = height - vextent;
692 System.err.println("x was " + x);
698 int endSeq = y + vextent;
699 if (endSeq > av.getAlignment().getHeight())
701 endSeq = av.getAlignment().getHeight();
704 av.setEndSeq(endSeq);
706 av.setEndRes((x + (seqPanel.seqCanvas.getSize().width / av
707 .getCharWidth())) - 1);
709 hscroll.setValues(x, hextent, 0, width);
710 vscroll.setValues(y, vextent, 0, height);
712 if (overviewPanel != null)
714 overviewPanel.setBoxPosition();
720 public void adjustmentValueChanged(AdjustmentEvent evt)
722 int oldX = av.getStartRes();
723 int oldY = av.getStartSeq();
725 if (evt == null || evt.getSource() == apvscroll)
727 annotationPanel.setScrollOffset(apvscroll.getValue(), false);
728 alabels.setScrollOffset(apvscroll.getValue(), false);
729 // annotationPanel.image=null;
730 // alabels.image=null;
731 // alabels.repaint();
732 // annotationPanel.repaint();
734 if (evt == null || evt.getSource() == hscroll)
736 int x = hscroll.getValue();
738 av.setEndRes(x + seqPanel.seqCanvas.getSize().width
739 / av.getCharWidth() - 1);
742 if (evt == null || evt.getSource() == vscroll)
744 int offy = vscroll.getValue();
745 if (av.getWrapAlignment())
747 int rowSize = seqPanel.seqCanvas
748 .getWrappedCanvasWidth(seqPanel.seqCanvas.getSize().width);
749 av.setStartRes(vscroll.getValue() * rowSize);
750 av.setEndRes((vscroll.getValue() + 1) * rowSize);
754 av.setStartSeq(offy);
755 av.setEndSeq(offy + seqPanel.seqCanvas.getSize().height
756 / av.getCharHeight());
760 if (overviewPanel != null)
762 overviewPanel.setBoxPosition();
765 int scrollX = av.startRes - oldX;
766 int scrollY = av.startSeq - oldY;
768 if (av.getWrapAlignment() || !fastPaint || av.MAC)
774 // Make sure we're not trying to draw a panel
775 // larger than the visible window
776 if (scrollX > av.endRes - av.startRes)
778 scrollX = av.endRes - av.startRes;
780 else if (scrollX < av.startRes - av.endRes)
782 scrollX = av.startRes - av.endRes;
785 idPanel.idCanvas.fastPaint(scrollY);
786 seqPanel.seqCanvas.fastPaint(scrollX, scrollY);
788 scalePanel.repaint();
789 if (av.isShowAnnotation())
791 annotationPanel.fastPaint(av.getStartRes() - oldX);
798 private void sendViewPosition()
800 StructureSelectionManager.getStructureSelectionManager(av.applet)
801 .sendViewPosition(this, av.startRes, av.endRes, av.startSeq,
806 * Repaint the alignment and annotations, and, optionally, any overview window
808 public void paintAlignment(boolean updateOverview)
810 final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
811 av.isShowAutocalculatedAbove());
812 sorter.sort(getAlignment().getAlignmentAnnotation(),
813 av.getSortAnnotationsBy());
818 jalview.structure.StructureSelectionManager
819 .getStructureSelectionManager(av.applet)
820 .sequenceColoursChanged(this);
822 if (overviewPanel != null)
824 overviewPanel.updateOverviewImage();
829 public void update(Graphics g)
834 public void paint(Graphics g)
837 Dimension d = idPanel.idCanvas.getSize();
838 idPanel.idCanvas.setSize(d.width, seqPanel.seqCanvas.getSize().height);
840 if (av.getWrapAlignment())
842 int maxwidth = av.getAlignment().getWidth();
844 if (av.hasHiddenColumns())
846 maxwidth = av.getColumnSelection().findColumnPosition(maxwidth) - 1;
849 int canvasWidth = seqPanel.seqCanvas
850 .getWrappedCanvasWidth(seqPanel.seqCanvas.getSize().width);
854 int max = maxwidth / canvasWidth;
855 vscroll.setMaximum(1 + max);
856 vscroll.setUnitIncrement(1);
857 vscroll.setVisibleAmount(1);
862 setScrollValues(av.getStartRes(), av.getStartSeq());
865 seqPanel.seqCanvas.repaint();
866 idPanel.idCanvas.repaint();
867 if (!av.getWrapAlignment())
869 if (av.isShowAnnotation())
872 annotationPanel.repaint();
874 scalePanel.repaint();
879 protected Panel sequenceHolderPanel = new Panel();
881 protected Scrollbar vscroll = new Scrollbar();
883 protected Scrollbar hscroll = new Scrollbar();
885 protected Panel seqPanelHolder = new Panel();
887 BorderLayout borderLayout1 = new BorderLayout();
889 BorderLayout borderLayout3 = new BorderLayout();
891 protected Panel scalePanelHolder = new Panel();
893 protected Panel idPanelHolder = new Panel();
895 BorderLayout borderLayout5 = new BorderLayout();
897 protected Panel idSpaceFillerPanel1 = new Panel();
899 public Panel annotationSpaceFillerHolder = new Panel();
901 BorderLayout borderLayout6 = new BorderLayout();
903 BorderLayout borderLayout7 = new BorderLayout();
905 Panel hscrollHolder = new Panel();
907 BorderLayout borderLayout10 = new BorderLayout();
909 protected Panel hscrollFillerPanel = new Panel();
911 BorderLayout borderLayout11 = new BorderLayout();
913 BorderLayout borderLayout4 = new BorderLayout();
915 BorderLayout borderLayout2 = new BorderLayout();
917 Panel annotationPanelHolder = new Panel();
919 protected Scrollbar apvscroll = new Scrollbar();
921 BorderLayout borderLayout12 = new BorderLayout();
923 private void jbInit() throws Exception
925 // idPanelHolder.setPreferredSize(new Dimension(70, 10));
926 this.setLayout(borderLayout7);
928 // sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
929 sequenceHolderPanel.setLayout(borderLayout3);
930 seqPanelHolder.setLayout(borderLayout1);
931 scalePanelHolder.setBackground(Color.white);
933 // scalePanelHolder.setPreferredSize(new Dimension(10, 30));
934 scalePanelHolder.setLayout(borderLayout6);
935 idPanelHolder.setLayout(borderLayout5);
936 idSpaceFillerPanel1.setBackground(Color.white);
938 // idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30));
939 idSpaceFillerPanel1.setLayout(borderLayout11);
940 annotationSpaceFillerHolder.setBackground(Color.white);
942 // annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80));
943 annotationSpaceFillerHolder.setLayout(borderLayout4);
944 hscroll.setOrientation(Scrollbar.HORIZONTAL);
945 hscrollHolder.setLayout(borderLayout10);
946 hscrollFillerPanel.setBackground(Color.white);
947 apvscroll.setOrientation(Scrollbar.VERTICAL);
948 apvscroll.setVisible(true);
949 apvscroll.addAdjustmentListener(this);
951 annotationPanelHolder.setBackground(Color.white);
952 annotationPanelHolder.setLayout(borderLayout12);
953 annotationPanelHolder.add(apvscroll, BorderLayout.EAST);
954 // hscrollFillerPanel.setPreferredSize(new Dimension(70, 10));
955 hscrollHolder.setBackground(Color.white);
957 // annotationScroller.setPreferredSize(new Dimension(10, 80));
958 // this.setPreferredSize(new Dimension(220, 166));
959 seqPanelHolder.setBackground(Color.white);
960 idPanelHolder.setBackground(Color.white);
961 sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);
962 sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);
963 seqPanelHolder.add(vscroll, BorderLayout.EAST);
965 // Panel3.add(secondaryPanelHolder, BorderLayout.SOUTH);
966 this.add(idPanelHolder, BorderLayout.WEST);
967 idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH);
968 idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH);
969 this.add(hscrollHolder, BorderLayout.SOUTH);
970 hscrollHolder.add(hscroll, BorderLayout.CENTER);
971 hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST);
972 this.add(sequenceHolderPanel, BorderLayout.CENTER);
976 * hides or shows dynamic annotation rows based on groups and av state flags
978 public void updateAnnotation()
980 updateAnnotation(false);
983 public void updateAnnotation(boolean applyGlobalSettings)
985 updateAnnotation(applyGlobalSettings, false);
988 public void updateAnnotation(boolean applyGlobalSettings,
989 boolean preserveNewGroupSettings)
991 av.updateGroupAnnotationSettings(applyGlobalSettings,
992 preserveNewGroupSettings);
993 adjustAnnotationHeight();
997 public AlignmentI getAlignment()
999 return av.getAlignment();
1003 public String getViewName()
1009 public StructureSelectionManager getStructureSelectionManager()
1011 return StructureSelectionManager
1012 .getStructureSelectionManager(av.applet);
1016 public void raiseOOMWarning(String string, OutOfMemoryError error)
1019 System.err.println("Out of memory whilst '" + string + "'");
1020 error.printStackTrace();