this);
}
+
+ public boolean getSortByTree()
+ {
+ return sortByTree;
+ }
+
+ public void setSortByTree(boolean sort)
+ {
+ sortByTree = sort;
+ }
/**
* return the alignPanel containing the given viewport. Use this to get the
* components currently handling the given viewport.
* @return null or an alignPanel guaranteed to have non-null alignFrame
* reference
*/
+
public AlignmentPanel getAlignPanel()
{
- AlignmentPanel[] aps = PaintRefresher
- .getAssociatedPanels(this.getSequenceSetId());
- for (int p = 0; aps != null && p < aps.length; p++)
- {
- if (aps[p].av == this)
- {
- return aps[p];
- }
- }
- return null;
- }
-
- public boolean getSortByTree()
- {
- return sortByTree;
+ return (AlignmentPanel) alignPanel;
}
-
- public void setSortByTree(boolean sort)
- {
- sortByTree = sort;
- }
-
/**
* Returns the (Desktop) instance of the StructureSelectionManager
*/
// setBackground(Color.white); // BH 2019
alignFrame = af;
this.av = av;
+ av.setAlignPanel(this);
setSeqPanel(new SeqPanel(av, this));
setIdPanel(new IdPanel(av, this));
ranges = new ViewportRanges(al);
}
+ protected AlignmentViewPanel alignPanel=null;
+ public void setAlignPanel(AlignmentViewPanel ap)
+ {
+ alignPanel = ap;
+ }
+ /**
+ * return the AlignmentViewPanel containing the given viewport. Use this to get the
+ * components currently handling the given viewport.
+ *
+ * @param av
+ * @return null or an alignPanel guaranteed to have non-null alignFrame
+ * reference
+ */
+
+ public AlignmentViewPanel getAlignPanel()
+ {
+ return alignPanel;
+ }
/**
* @param name
* @see jalview.api.ViewStyleI#setFontName(java.lang.String)
* defensively null out references to large objects in case
* this object is not garbage collected (as if!)
*/
+ alignPanel=null;
consensus = null;
complementConsensus = null;
strucConsensus = null;