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.
23 import java.awt.Color;
24 import java.awt.Dimension;
26 import java.awt.FontMetrics;
27 import java.awt.Graphics;
28 import java.awt.Graphics2D;
29 import java.awt.Point;
30 import java.awt.Rectangle;
31 import java.awt.RenderingHints;
32 import java.awt.event.MouseEvent;
33 import java.awt.event.MouseListener;
34 import java.awt.event.MouseMotionListener;
35 import java.awt.print.PageFormat;
36 import java.awt.print.Printable;
37 import java.awt.print.PrinterException;
38 import java.awt.print.PrinterJob;
39 import java.util.ArrayList;
40 import java.util.BitSet;
41 import java.util.HashMap;
42 import java.util.Hashtable;
43 import java.util.List;
45 import java.util.Map.Entry;
46 import java.util.Vector;
48 import javax.swing.JPanel;
49 import javax.swing.JScrollPane;
50 import javax.swing.SwingUtilities;
51 import javax.swing.ToolTipManager;
53 import jalview.analysis.Conservation;
54 import jalview.analysis.TreeModel;
55 import jalview.api.AlignViewportI;
56 import jalview.datamodel.AlignmentAnnotation;
57 import jalview.datamodel.BinaryNode;
58 import jalview.datamodel.ColumnSelection;
59 import jalview.datamodel.ContactMatrixI;
60 import jalview.datamodel.HiddenColumns;
61 import jalview.datamodel.Sequence;
62 import jalview.datamodel.SequenceGroup;
63 import jalview.datamodel.SequenceI;
64 import jalview.datamodel.SequenceNode;
65 import jalview.gui.JalviewColourChooser.ColourChooserListener;
66 import jalview.schemes.ColourSchemeI;
67 import jalview.structure.SelectionSource;
68 import jalview.util.Format;
69 import jalview.util.MessageManager;
77 public class TreeCanvas extends JPanel implements MouseListener, Runnable,
78 Printable, MouseMotionListener, SelectionSource
81 public static final String PLACEHOLDER = " * ";
85 JScrollPane scrollPane;
89 private AlignViewport av;
91 private AlignmentPanel ap;
97 boolean fitToWindow = true;
99 boolean showDistances = false;
101 boolean showBootstrap = false;
103 boolean markPlaceholders = false;
109 private float threshold;
113 int labelLength = -1;
115 Map<Object, Rectangle> nameHash = new Hashtable<>();
117 Map<BinaryNode, Rectangle> nodeHash = new Hashtable<>();
119 BinaryNode highlightNode;
121 boolean applyToAllViews = false;
124 * Creates a new TreeCanvas object.
135 public TreeCanvas(TreePanel tp, AlignmentPanel ap, JScrollPane scroller)
139 this.setAssociatedPanel(ap);
141 scrollPane = scroller;
142 addMouseListener(this);
143 addMouseMotionListener(this);
144 ToolTipManager.sharedInstance().registerComponent(this);
153 public void treeSelectionChanged(SequenceI sequence)
155 AlignmentPanel[] aps = getAssociatedPanels();
157 for (int a = 0; a < aps.length; a++)
159 SequenceGroup selected = aps[a].av.getSelectionGroup();
161 if (selected == null)
163 selected = new SequenceGroup();
164 aps[a].av.setSelectionGroup(selected);
167 selected.setEndRes(aps[a].av.getAlignment().getWidth() - 1);
168 selected.addOrRemove(sequence, true);
178 public void setTree(TreeModel tree)
181 tree.findHeight(tree.getTopNode());
183 // Now have to calculate longest name based on the leaves
184 Vector<BinaryNode> leaves = tree.findLeaves(tree.getTopNode());
185 boolean has_placeholders = false;
188 for (int i = 0; i < leaves.size(); i++)
190 BinaryNode lf = leaves.elementAt(i);
192 if (lf instanceof SequenceNode && ((SequenceNode)lf).isPlaceholder())
194 has_placeholders = true;
197 if (longestName.length() < ((Sequence) lf.element()).getName()
200 longestName = TreeCanvas.PLACEHOLDER
201 + ((Sequence) lf.element()).getName();
205 setMarkPlaceholders(has_placeholders);
226 public void drawNode(Graphics g, BinaryNode node, float chunk,
227 double wscale, int width, int offx, int offy)
234 if ((node.left() == null) && (node.right() == null))
237 double height = node.height;
238 double dist = node.dist;
240 int xstart = (int) ((height - dist) * wscale) + offx;
241 int xend = (int) (height * wscale) + offx;
243 int ypos = (int) (node.ycount * chunk) + offy;
245 if (node.element() instanceof SequenceI)
247 SequenceI seq = (SequenceI) node.element();
249 if (av.getSequenceColour(seq) == Color.white)
251 g.setColor(Color.black);
255 g.setColor(av.getSequenceColour(seq).darker());
260 g.setColor(Color.black);
263 // Draw horizontal line
264 g.drawLine(xstart, ypos, xend, ypos);
266 String nodeLabel = "";
268 if (showDistances && (node.dist > 0))
270 nodeLabel = new Format("%g").form(node.dist);
273 if (showBootstrap && node.bootstrap > -1)
277 nodeLabel = nodeLabel + " : ";
280 nodeLabel = nodeLabel + String.valueOf(node.bootstrap);
283 if (!nodeLabel.equals(""))
285 g.drawString(nodeLabel, xstart + 2, ypos - 2);
288 String name = (markPlaceholders && ((node instanceof SequenceNode && ((SequenceNode)node).isPlaceholder())))
289 ? (PLACEHOLDER + node.getName())
292 int charWidth = fm.stringWidth(name) + 3;
293 int charHeight = font.getSize();
295 Rectangle rect = new Rectangle(xend + 10, ypos - charHeight / 2,
296 charWidth, charHeight);
298 nameHash.put(node.element(), rect);
300 // Colour selected leaves differently
301 boolean isSelected = false;
302 if (tp.isColumnWise())
304 isSelected = isColumnForNodeSelected(node);
308 SequenceGroup selected = av.getSelectionGroup();
310 if ((selected != null)
311 && selected.getSequences(null).contains(node.element()))
318 g.setColor(Color.gray);
320 g.fillRect(xend + 10, ypos - charHeight / 2, charWidth, charHeight);
321 g.setColor(Color.white);
324 g.drawString(name, xend + 10, ypos + fm.getDescent());
325 g.setColor(Color.black);
329 drawNode(g, (BinaryNode) node.left(), chunk, wscale, width, offx,
331 drawNode(g, (BinaryNode) node.right(), chunk, wscale, width, offx,
334 double height = node.height;
335 double dist = node.dist;
337 int xstart = (int) ((height - dist) * wscale) + offx;
338 int xend = (int) (height * wscale) + offx;
339 int ypos = (int) (node.ycount * chunk) + offy;
341 g.setColor(node.color.darker());
343 // Draw horizontal line
344 g.drawLine(xstart, ypos, xend, ypos);
345 if (node == highlightNode)
347 g.fillRect(xend - 3, ypos - 3, 6, 6);
351 g.fillRect(xend - 2, ypos - 2, 4, 4);
354 int ystart = (node.left() == null ? 0
355 : (int) (((BinaryNode) node.left()).ycount * chunk)) + offy;
356 int yend = (node.right() == null ? 0
357 : (int) (((BinaryNode) node.right()).ycount * chunk))
360 Rectangle pos = new Rectangle(xend - 2, ypos - 2, 5, 5);
361 nodeHash.put(node, pos);
363 g.drawLine((int) (height * wscale) + offx, ystart,
364 (int) (height * wscale) + offx, yend);
366 String nodeLabel = "";
368 if (showDistances && (node.dist > 0))
370 nodeLabel = new Format("%g").form(node.dist);
373 if (showBootstrap && node.bootstrap > -1)
377 nodeLabel = nodeLabel + " : ";
380 nodeLabel = nodeLabel + String.valueOf(node.bootstrap);
383 if (!nodeLabel.equals(""))
385 g.drawString(nodeLabel, xstart + 2, ypos - 2);
398 * @return DOCUMENT ME!
400 public Object findElement(int x, int y)
402 for (Entry<Object, Rectangle> entry : nameHash.entrySet())
404 Rectangle rect = entry.getValue();
406 if ((x >= rect.x) && (x <= (rect.x + rect.width)) && (y >= rect.y)
407 && (y <= (rect.y + rect.height)))
409 return entry.getKey();
413 for (Entry<BinaryNode, Rectangle> entry : nodeHash.entrySet())
415 Rectangle rect = entry.getValue();
417 if ((x >= rect.x) && (x <= (rect.x + rect.width)) && (y >= rect.y)
418 && (y <= (rect.y + rect.height)))
420 return entry.getKey();
433 public void pickNodes(Rectangle pickBox)
435 int width = getWidth();
436 int height = getHeight();
438 BinaryNode top = tree.getTopNode();
440 double wscale = ((width * .8) - (offx * 2)) / tree.getMaxHeight();
444 top.count = ((BinaryNode) top.left()).count
445 + ((BinaryNode) top.right()).count;
448 float chunk = (float) (height - (offy)) / top.count;
450 pickNode(pickBox, top, chunk, wscale, width, offx, offy);
471 public void pickNode(Rectangle pickBox, BinaryNode node, float chunk,
472 double wscale, int width, int offx, int offy)
479 if ((node.left() == null) && (node.right() == null))
481 double height = node.height;
482 // double dist = node.dist;
483 // int xstart = (int) ((height - dist) * wscale) + offx;
484 int xend = (int) (height * wscale) + offx;
486 int ypos = (int) (node.ycount * chunk) + offy;
488 if (pickBox.contains(new Point(xend, ypos)))
490 if (node.element() instanceof SequenceI)
492 SequenceI seq = (SequenceI) node.element();
493 SequenceGroup sg = av.getSelectionGroup();
497 sg.addOrRemove(seq, true);
504 pickNode(pickBox, (BinaryNode) node.left(), chunk, wscale, width,
506 pickNode(pickBox, (BinaryNode) node.right(), chunk, wscale, width,
519 public void setColor(BinaryNode node, Color c)
527 if (node.element() instanceof SequenceI)
529 final SequenceI seq = (SequenceI) node.element();
530 AlignmentPanel[] aps = getAssociatedPanels();
533 for (int a = 0; a < aps.length; a++)
535 aps[a].av.setSequenceColour(seq, c);
539 setColor((BinaryNode) node.left(), c);
540 setColor((BinaryNode) node.right(), c);
548 Thread thread = new Thread(this);
552 // put printing in a thread to avoid painting problems
556 PrinterJob printJob = PrinterJob.getPrinterJob();
557 PageFormat defaultPage = printJob.defaultPage();
558 PageFormat pf = printJob.pageDialog(defaultPage);
560 if (defaultPage == pf)
568 printJob.setPrintable(this, pf);
570 if (printJob.printDialog())
575 } catch (Exception PrintException)
577 PrintException.printStackTrace();
592 * @return DOCUMENT ME!
594 * @throws PrinterException
598 public int print(Graphics pg, PageFormat pf, int pi)
599 throws PrinterException
602 pg.translate((int) pf.getImageableX(), (int) pf.getImageableY());
604 int pwidth = (int) pf.getImageableWidth();
605 int pheight = (int) pf.getImageableHeight();
607 int noPages = getHeight() / pheight;
611 return Printable.NO_SUCH_PAGE;
614 if (pwidth > getWidth())
621 if (pheight > getHeight())
623 pheight = getHeight();
630 FontMetrics fm = pg.getFontMetrics(font);
631 int height = fm.getHeight() * nameHash.size();
632 pg.translate(0, -pi * pheight);
633 pg.setClip(0, pi * pheight, pwidth, (pi * pheight) + pheight);
635 // translate number of pages,
636 // height is screen size as this is the
637 // non overlapping text size
641 draw(pg, pwidth, pheight);
643 return Printable.PAGE_EXISTS;
653 public void paintComponent(Graphics g)
655 super.paintComponent(g);
661 MessageManager.getString("label.calculating_tree") + "....",
662 20, getHeight() / 2);
666 fm = g.getFontMetrics(font);
668 int nameCount = nameHash.size();
674 if (fitToWindow || (!fitToWindow && (scrollPane
675 .getHeight() > ((fm.getHeight() * nameCount) + offy))))
677 draw(g, scrollPane.getWidth(), scrollPane.getHeight());
678 setPreferredSize(null);
682 setPreferredSize(new Dimension(scrollPane.getWidth(),
683 fm.getHeight() * nameCount));
684 draw(g, scrollPane.getWidth(), fm.getHeight() * nameCount);
687 scrollPane.revalidate();
698 public void setFont(Font font)
714 public void draw(Graphics g1, int width, int height)
716 Graphics2D g2 = (Graphics2D) g1;
717 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
718 RenderingHints.VALUE_ANTIALIAS_ON);
719 g2.setColor(Color.white);
720 g2.fillRect(0, 0, width, height);
723 if (longestName == null || tree == null)
725 g2.drawString("Calculating tree.", 20, 20);
728 offy = font.getSize() + 10;
730 fm = g2.getFontMetrics(font);
732 labelLength = fm.stringWidth(longestName) + 20; // 20 allows for scrollbar
734 double wscale = (width - labelLength - (offx * 2))
735 / tree.getMaxHeight();
737 BinaryNode top = tree.getTopNode();
741 top.count = ((BinaryNode) top.left()).count
742 + ((BinaryNode) top.right()).count;
745 float chunk = (float) (height - (offy)) / top.count;
747 drawNode(g2, tree.getTopNode(), chunk, wscale, width, offx, offy);
751 if (av.getCurrentTree() == tree)
753 g2.setColor(Color.red);
757 g2.setColor(Color.gray);
760 int x = (int) ((threshold * (getWidth() - labelLength - (2 * offx)))
763 g2.drawLine(x, 0, x, getHeight());
768 * Empty method to satisfy the MouseListener interface
773 public void mouseReleased(MouseEvent e)
776 * isPopupTrigger is set on mouseReleased on Windows
778 if (e.isPopupTrigger())
780 chooseSubtreeColour();
781 e.consume(); // prevent mouseClicked happening
786 * Empty method to satisfy the MouseListener interface
791 public void mouseEntered(MouseEvent e)
796 * Empty method to satisfy the MouseListener interface
801 public void mouseExited(MouseEvent e)
806 * Handles a mouse click on a tree node (clicks elsewhere are handled in
807 * mousePressed). Click selects the sub-tree, double-click swaps leaf nodes
808 * order, right-click opens a dialogue to choose colour for the sub-tree.
813 public void mouseClicked(MouseEvent evt)
815 if (highlightNode == null)
820 if (evt.getClickCount() > 1)
822 tree.swapNodes(highlightNode);
823 tree.reCount(tree.getTopNode());
824 tree.findHeight(tree.getTopNode());
828 Vector<BinaryNode> leaves = tree.findLeaves(highlightNode);
829 if (tp.isColumnWise()) {
830 markColumnsFor(getAssociatedPanels(), leaves, Color.red);
832 for (int i = 0; i < leaves.size(); i++)
834 SequenceI seq = (SequenceI) leaves.elementAt(i).element();
835 treeSelectionChanged(seq);
841 PaintRefresher.Refresh(tp, av.getSequenceSetId());
846 * Offer the user the option to choose a colour for the highlighted node and
847 * its children; this colour is also applied to the corresponding sequence ids
850 void chooseSubtreeColour()
852 String ttl = MessageManager.getString("label.select_subtree_colour");
853 ColourChooserListener listener = new ColourChooserListener()
856 public void colourSelected(Color c)
858 setColor(highlightNode, c);
859 PaintRefresher.Refresh(tp, ap.av.getSequenceSetId());
863 JalviewColourChooser.showColourChooser(this, ttl, highlightNode.color,
868 public void mouseMoved(MouseEvent evt)
870 av.setCurrentTree(tree);
872 Object ob = findElement(evt.getX(), evt.getY());
874 if (ob instanceof BinaryNode)
876 highlightNode = (BinaryNode) ob;
878 "<html>" + MessageManager.getString("label.highlightnode"));
884 if (highlightNode != null)
886 highlightNode = null;
887 setToolTipText(null);
894 public void mouseDragged(MouseEvent ect)
899 * Handles a mouse press on a sequence name or the tree background canvas
900 * (click on a node is handled in mouseClicked). The action is to create
901 * groups by partitioning the tree at the mouse position. Colours for the
902 * groups (and sequence names) are generated randomly.
907 public void mousePressed(MouseEvent e)
909 av.setCurrentTree(tree);
912 * isPopupTrigger is set for mousePressed (Mac)
913 * or mouseReleased (Windows)
915 if (e.isPopupTrigger())
917 if (highlightNode != null)
919 chooseSubtreeColour();
925 * defer right-click handling on Windows to
926 * mouseClicked; note isRightMouseButton
927 * also matches Cmd-click on Mac which should do
930 if (SwingUtilities.isRightMouseButton(e))
938 Object ob = findElement(x, y);
940 if (ob instanceof SequenceI)
942 treeSelectionChanged((Sequence) ob);
943 PaintRefresher.Refresh(tp,
944 getAssociatedPanel().av.getSequenceSetId());
949 else if (!(ob instanceof BinaryNode))
952 if (tree.getMaxHeight() != 0)
954 threshold = (float) (x - offx)
955 / (float) (getWidth() - labelLength - (2 * offx));
957 List<BinaryNode> groups = tree.groupNodes(threshold);
958 setColor(tree.getTopNode(), Color.black);
960 AlignmentPanel[] aps = getAssociatedPanels();
962 // TODO push calls below into a single AlignViewportI method?
963 // see also AlignViewController.deleteGroups
964 for (int a = 0; a < aps.length; a++)
966 aps[a].av.setSelectionGroup(null);
967 aps[a].av.getAlignment().deleteAllGroups();
968 aps[a].av.clearSequenceColours();
969 if (aps[a].av.getCodingComplement() != null)
971 aps[a].av.getCodingComplement().setSelectionGroup(null);
972 aps[a].av.getCodingComplement().getAlignment()
974 aps[a].av.getCodingComplement().clearSequenceColours();
976 aps[a].av.setUpdateStructures(true);
978 colourGroups(groups);
981 * clear partition (don't show vertical line) if
982 * it is to the right of all nodes
984 if (groups.isEmpty())
990 PaintRefresher.Refresh(tp,
991 getAssociatedPanel().av.getSequenceSetId());
997 void colourGroups(List<BinaryNode> groups)
999 AlignmentPanel[] aps = getAssociatedPanels();
1000 List<BitSet> colGroups = new ArrayList<>();
1001 Map<BitSet,Color> colors=new HashMap();
1002 for (int i = 0; i < groups.size(); i++)
1004 Color col = new Color((int) (Math.random() * 255),
1005 (int) (Math.random() * 255), (int) (Math.random() * 255));
1006 setColor(groups.get(i), col.brighter());
1008 Vector<BinaryNode> l = tree.findLeaves(groups.get(i));
1009 if (!tp.isColumnWise()) {
1010 createSeqGroupFor(aps, l, col);
1012 BitSet gp=createColumnGroupFor(l,col);
1015 colors.put(gp, col);
1018 if (tp.isColumnWise())
1020 AlignmentAnnotation aa = tp.getAssocAnnotation();
1022 ContactMatrixI cm = av.getContactMatrix(aa);
1025 cm.updateGroups(colGroups);
1026 for (BitSet gp:colors.keySet())
1028 cm.setColorForGroup(gp, colors.get(gp));
1034 // notify the panel(s) to redo any group specific stuff
1035 // also updates structure views if necessary
1036 for (int a = 0; a < aps.length; a++)
1038 aps[a].updateAnnotation();
1039 final AlignViewportI codingComplement = aps[a].av
1040 .getCodingComplement();
1041 if (codingComplement != null)
1043 ((AlignViewport) codingComplement).getAlignPanel()
1044 .updateAnnotation();
1049 private boolean isColumnForNodeSelected(BinaryNode bn)
1051 SequenceI rseq = tp.assocAnnotation.sequenceRef;
1055 colm = Integer.parseInt(
1056 bn.getName().substring(bn.getName().indexOf("c") + 1));
1057 } catch (Exception e)
1061 if (av==null||av.getAlignment()==null)
1063 // alignment is closed
1066 ColumnSelection cs = av.getColumnSelection();
1068 HiddenColumns hc = av.getAlignment().getHiddenColumns();
1069 int offp = (rseq != null) ? rseq.findIndex(rseq.getStart() + colm)
1072 if (!av.hasHiddenColumns())
1074 return cs.contains(offp-1);
1076 if (hc.isVisible(offp-1))
1078 return cs.contains(offp-1);
1079 // return cs.contains(hc.absoluteToVisibleColumn(offp));
1084 private BitSet createColumnGroupFor(Vector<BinaryNode> l,
1087 BitSet gp=new BitSet();
1088 for (BinaryNode bn:l)
1091 if (bn.element()!=null && bn.element()instanceof Integer)
1092 { colm = (Integer)bn.element();
1094 // parse out from nodename
1096 colm = Integer.parseInt(bn.getName().substring(bn.getName().indexOf("c")+1));
1097 } catch (Exception e)
1107 private void markColumnsFor(AlignmentPanel[] aps, Vector<BinaryNode> l,
1110 SequenceI rseq = tp.assocAnnotation.sequenceRef;
1111 if (av==null||av.getAlignment()==null)
1113 // alignment is closed
1117 for (BinaryNode bn:l)
1121 colm = Integer.parseInt(bn.getName().substring(bn.getName().indexOf("c")+1));
1122 } catch (Exception e)
1126 ColumnSelection cs = av.getColumnSelection();
1127 HiddenColumns hc = av.getAlignment().getHiddenColumns();
1129 int offp = (rseq!=null) ? rseq.findIndex(rseq.getStart()+colm) : colm;
1131 if (!av.hasHiddenColumns() || hc.isVisible(offp-1))
1133 if (cs.contains(offp-1))
1135 cs.removeElement(offp-1);
1137 cs.addElement(offp-1);
1144 public void createSeqGroupFor(AlignmentPanel[] aps, Vector<BinaryNode> l,
1148 Vector<SequenceI> sequences = new Vector<>();
1150 for (int j = 0; j < l.size(); j++)
1152 SequenceI s1 = (SequenceI) l.elementAt(j).element();
1154 if (!sequences.contains(s1))
1156 sequences.addElement(s1);
1160 ColourSchemeI cs = null;
1161 SequenceGroup _sg = new SequenceGroup(sequences, null, cs, true, true,
1162 false, 0, av.getAlignment().getWidth() - 1);
1164 _sg.setName("JTreeGroup:" + _sg.hashCode());
1165 _sg.setIdColour(col);
1167 for (int a = 0; a < aps.length; a++)
1169 SequenceGroup sg = new SequenceGroup(_sg);
1170 AlignViewport viewport = aps[a].av;
1172 // Propagate group colours in each view
1173 if (viewport.getGlobalColourScheme() != null)
1175 cs = viewport.getGlobalColourScheme().getInstance(viewport, sg);
1176 sg.setColourScheme(cs);
1177 sg.getGroupColourScheme().setThreshold(
1178 viewport.getResidueShading().getThreshold(),
1179 viewport.isIgnoreGapsConsensus());
1181 if (viewport.getResidueShading().conservationApplied())
1183 Conservation c = new Conservation("Group", sg.getSequences(null),
1184 sg.getStartRes(), sg.getEndRes());
1186 c.verdict(false, viewport.getConsPercGaps());
1187 sg.cs.setConservation(c);
1190 // indicate that associated structure views will need an update
1191 viewport.setUpdateStructures(true);
1192 // propagate structure view update and sequence group to complement view
1193 viewport.addSequenceGroup(sg);
1203 public void setShowDistances(boolean state)
1205 this.showDistances = state;
1215 public void setShowBootstrap(boolean state)
1217 this.showBootstrap = state;
1227 public void setMarkPlaceholders(boolean state)
1229 this.markPlaceholders = state;
1233 AlignmentPanel[] getAssociatedPanels()
1235 if (applyToAllViews)
1237 return PaintRefresher.getAssociatedPanels(av.getSequenceSetId());
1241 return new AlignmentPanel[] { getAssociatedPanel() };
1245 public AlignmentPanel getAssociatedPanel()
1250 public void setAssociatedPanel(AlignmentPanel ap)
1255 public AlignViewport getViewport()
1260 public void setViewport(AlignViewport av)
1265 public float getThreshold()
1270 public void setThreshold(float threshold)
1272 this.threshold = threshold;
1275 public boolean isApplyToAllViews()
1277 return this.applyToAllViews;
1280 public void setApplyToAllViews(boolean applyToAllViews)
1282 this.applyToAllViews = applyToAllViews;