{
// TODO refactor as required to pull up to an interface
AlignmentI alignment = avp.getAlignment();
- FeatureRenderer fr = getFeatureRenderer(avp);
-
- /*
- * fr is null if feature display is turned off
- */
- if (fr == null)
- {
- return 0;
- }
- String[] files = getPdbFile();
+ String[] files = getStructureFiles();
if (files == null)
{
return 0;
}
@Override
+ protected IProgressIndicator getIProgressIndicator()
+ {
+ return appJmolWindow.progressBar;
+ }
- @Override
- public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
- {
- AlignmentPanel ap = (alignment == null) ? appJmolWindow
- .getAlignmentPanel() : (AlignmentPanel) alignment;
- if (ap.av.isShowSequenceFeatures())
- {
- if (fr == null)
- {
- fr = (jalview.gui.FeatureRenderer) ap.cloneFeatureRenderer();
- }
- else
- {
- ap.updateFeatureRenderer(fr);
- }
- }
-
- return fr;
- }
+
+ @Override
public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
{
return new SequenceRenderer(((AlignmentPanel) alignment).av);
"A", testSeq, null);
Assert.assertEquals(testSeq.getStart(), 1);
Assert.assertEquals(testSeq.getEnd(), 147);
- // Assert.assertEquals(actualMapping, expectedMapping);
+ // Can't do Assert.assertEquals(actualMapping, expectedMapping);
+ // because this fails in our version of TestNG
Assert.assertEquals(actualMapping.size(), expectedMapping.size());
- // Test key set
- Assert.assertEquals(actualMapping.keySet(), expectedMapping.keySet());
- // Test entry set
- for (int key : expectedMapping.keySet())
+ Iterator<Map.Entry<Integer, int[]>> it = expectedMapping.entrySet()
+ .iterator();
+ while (it.hasNext())
{
- Assert.assertTrue(Arrays.equals(expectedMapping.get(key),
- actualMapping.get(key)));
+ Map.Entry<Integer, int[]> pair = it.next();
+ Assert.assertTrue(actualMapping.containsKey(pair.getKey()));
+ Assert.assertEquals(actualMapping.get(pair.getKey()),
+ pair.getValue());
}
-
} catch (Exception e)
{
e.printStackTrace();