/**
*
* @param alignmentId
+ * - if null, all sets are returned
* @return all AlignmentPanels concerning the alignmentId sequence set
*/
public static AlignmentPanel[] getAlignmentPanels(String alignmentId)
AlignFrame af = (AlignFrame) frames[t];
for (int a = 0; a < af.alignPanels.size(); a++)
{
- if (alignmentId.equals(((AlignmentPanel) af.alignPanels
+ if (alignmentId == null
+ || alignmentId.equals(((AlignmentPanel) af.alignPanels
.elementAt(a)).av.getSequenceSetId()))
{
aps.add(af.alignPanels.elementAt(a));
* get all the viewports on an alignment.
*
* @param sequenceSetId
- * unique alignment id
+ * unique alignment id (may be null - all viewports returned in that
+ * case)
* @return all viewports on the alignment bound to sequenceSetId
*/
public static AlignViewport[] getViewports(String sequenceSetId)
if (frames[t] instanceof AlignFrame)
{
AlignFrame afr = ((AlignFrame) frames[t]);
- if (afr.getViewport().getSequenceSetId().equals(sequenceSetId))
+ if (sequenceSetId == null
+ || afr.getViewport().getSequenceSetId()
+ .equals(sequenceSetId))
{
if (afr.alignPanels != null)
{
for (int a = 0; a < afr.alignPanels.size(); a++)
{
- if (sequenceSetId.equals(((AlignmentPanel) afr.alignPanels
+ if (sequenceSetId == null
+ || sequenceSetId
+ .equals(((AlignmentPanel) afr.alignPanels
.elementAt(a)).av.getSequenceSetId()))
{
viewp.addElement(((AlignmentPanel) afr.alignPanels