git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3210 Improvements to eclipse detection. New src tree and SwingJS updated from...
[jalview.git]
/
src
/
jalview
/
datamodel
/
Alignment.java
diff --git
a/src/jalview/datamodel/Alignment.java
b/src/jalview/datamodel/Alignment.java
index
c4098e2
..
98510e3
100755
(executable)
--- a/
src/jalview/datamodel/Alignment.java
+++ b/
src/jalview/datamodel/Alignment.java
@@
-47,7
+47,7
@@
import java.util.Vector;
* @author JimP
*
*/
* @author JimP
*
*/
-public class Alignment implements AlignmentI, AutoCloseable
+public class Alignment implements AlignmentI
{
private Alignment dataset;
{
private Alignment dataset;
@@
-125,8
+125,7
@@
public class Alignment implements AlignmentI, AutoCloseable
/**
* Make a new alignment from an array of SeqCigars
*
/**
* Make a new alignment from an array of SeqCigars
*
- * @param seqs
- * SeqCigar[]
+ * @param alseqs
*/
public Alignment(SeqCigar[] alseqs)
{
*/
public Alignment(SeqCigar[] alseqs)
{
@@
-303,20
+302,15
@@
public class Alignment implements AlignmentI, AutoCloseable
}
@Override
}
@Override
- public void close()
+ public void finalize() throws Throwable
{
if (getDataset() != null)
{
{
if (getDataset() != null)
{
- try
- {
- getDataset().removeAlignmentRef();
- } catch (Throwable e)
- {
- e.printStackTrace();
- }
+ getDataset().removeAlignmentRef();
}
nullReferences();
}
nullReferences();
+ super.finalize();
}
/**
}
/**
@@
-404,6
+398,10
@@
public class Alignment implements AlignmentI, AutoCloseable
return null;
}
return null;
}
+ private static final SequenceGroup[] noGroups = new SequenceGroup[0];
+
+ private ArrayList<SequenceGroup> temp = new ArrayList<>();
+
/*
* (non-Javadoc)
*
/*
* (non-Javadoc)
*
@@
-413,11
+411,15
@@
public class Alignment implements AlignmentI, AutoCloseable
@Override
public SequenceGroup[] findAllGroups(SequenceI s)
{
@Override
public SequenceGroup[] findAllGroups(SequenceI s)
{
- ArrayList<SequenceGroup> temp = new ArrayList<>();
synchronized (groups)
{
int gSize = groups.size();
synchronized (groups)
{
int gSize = groups.size();
+ if (gSize == 0)
+ {
+ return noGroups;
+ }
+ temp.clear();
for (int i = 0; i < gSize; i++)
{
SequenceGroup sg = groups.get(i);
for (int i = 0; i < gSize; i++)
{
SequenceGroup sg = groups.get(i);
@@
-2032,4
+2034,17
@@
public class Alignment implements AlignmentI, AutoCloseable
}
}
}
}
+ @Override
+ public void resetColors()
+ {
+ for (int i = getHeight(); --i >= 0;)
+ {
+ sequences.get(i).resetColors();
+ }
+ // if (dataset != null)
+ // {
+ // dataset.resetColors();
+ // }
+ }
+
}
}