*/
Map<String, SequenceI> seqRefIds = null;
- Vector frefedSequence = null;
+ Vector<Object[]> frefedSequence = null;
boolean raiseGUI = true; // whether errors are raised in dialog boxes or not
int r = 0, rSize = frefedSequence.size();
while (r < rSize)
{
- Object[] ref = (Object[]) frefedSequence.elementAt(r);
+ Object[] ref = frefedSequence.elementAt(r);
if (ref != null)
{
String sref = (String) ref[0];
if (sf[index].otherDetails != null)
{
String key;
- Enumeration keys = sf[index].otherDetails.keys();
- while (keys.hasMoreElements())
+ Iterator<String> keys = sf[index].otherDetails.keySet()
+ .iterator();
+ while (keys.hasNext())
{
- key = keys.nextElement().toString();
+ key = keys.next();
OtherData keyValue = new OtherData();
keyValue.setKey(key);
keyValue.setValue(sf[index].otherDetails.get(key).toString());
// SAVE MAPPINGS
if (jal.getCodonFrames() != null)
{
- Set<AlignedCodonFrame> jac = jal.getCodonFrames();
+ List<AlignedCodonFrame> jac = jal.getCodonFrames();
for (AlignedCodonFrame acf : jac)
{
AlcodonFrame alc = new AlcodonFrame();
view.setViewName(av.viewName);
view.setGatheredViews(av.isGatherViewsHere());
- Rectangle position = ap.av.getExplodedGeometry();
- if (position == null)
+ Rectangle size = ap.av.getExplodedGeometry();
+ Rectangle position = size;
+ if (size == null)
{
- position = ap.alignFrame.getBounds();
+ size = ap.alignFrame.getBounds();
+ if (av.getCodingComplement() != null)
+ {
+ position = ((SplitFrame) ap.alignFrame.getSplitViewContainer())
+ .getBounds();
+ }
+ else
+ {
+ position = size;
+ }
}
view.setXpos(position.x);
view.setYpos(position.y);
- view.setWidth(position.width);
- view.setHeight(position.height);
+
+ view.setWidth(size.width);
+ view.setHeight(size.height);
view.setStartRes(av.startRes);
view.setStartSeq(av.startSeq);
if (jds.getDatasetSequence() != null)
{
vamsasSeq.setDsseqid(seqHash(jds.getDatasetSequence()));
- if (jds.getDatasetSequence().getDBRef() != null)
+ if (jds.getDatasetSequence().getDBRefs() != null)
{
- dbrefs = jds.getDatasetSequence().getDBRef();
+ dbrefs = jds.getDatasetSequence().getDBRefs();
}
}
else
{
vamsasSeq.setDsseqid(id); // so we can tell which sequences really are
// dataset sequences only
- dbrefs = jds.getDBRef();
+ dbrefs = jds.getDBRefs();
}
if (dbrefs != null)
{
{
SwingUtilities.invokeAndWait(new Runnable()
{
+ @Override
public void run()
{
setLoadingFinishedForNewStructureViewers();
}
if (frefedSequence == null)
{
- frefedSequence = new Vector();
+ frefedSequence = new Vector<Object[]>();
}
AlignFrame af = null, _af = null;
int width = (int) dnaFrame.getBounds().getWidth();
int height = (int) (dnaFrame.getBounds().getHeight()
+ proteinFrame.getBounds().getHeight() + 50);
+
+ /*
+ * SplitFrame location is saved to both enclosed frames
+ */
+ splitFrame.setLocation(dnaFrame.getX(), dnaFrame.getY());
Desktop.addInternalFrame(splitFrame, title, width, height);
/*
{
mapping = addMapping(maps[m].getMapping());
}
- if (dnaseq != null)
+ if (dnaseq != null && mapping.getTo() != null)
{
cf.addMap(dnaseq, mapping.getTo(), mapping.getMap());
}
* indicate that annotation colours are applied across all groups (pre
* Jalview 2.8.1 behaviour)
*/
- boolean doGroupAnnColour = isVersionStringLaterThan("2.8.1",
- object.getVersion());
+ boolean doGroupAnnColour = Jalview2XML.isVersionStringLaterThan(
+ "2.8.1", object.getVersion());
AlignmentPanel ap = null;
boolean isnewview = true;
* @return true if version is development/null or evaluates to the same or
* later X.Y.Z (where X,Y,Z are like [0-9]+b?[0-9]*)
*/
- protected boolean isVersionStringLaterThan(String supported,
+ public static boolean isVersionStringLaterThan(String supported,
String version)
{
if (version == null || version.equalsIgnoreCase("DEVELOPMENT BUILD")
String fileT = fileV.nextToken().toLowerCase().replace('b', '.');
try
{
- if (Float.valueOf(curT) > Float.valueOf(fileT))
+ float supportedVersionToken = Float.parseFloat(curT);
+ float myVersiontoken = Float.parseFloat(fileT);
+ if (supportedVersionToken > myVersiontoken)
{
// current version is newer than the version that wrote the file
return false;
}
+ if (supportedVersionToken < myVersiontoken)
+ {
+ // current version is older than the version that wrote the file
+ return true;
+ }
} catch (NumberFormatException nfe)
{
System.err