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-3594 added BG and UoD logo and banner to splashscreens, and adjusted status text box
[jalview.git]
/
src
/
jalview
/
appletgui
/
PaintRefresher.java
diff --git
a/src/jalview/appletgui/PaintRefresher.java
b/src/jalview/appletgui/PaintRefresher.java
index
32507fe
..
ddf590e
100755
(executable)
--- a/
src/jalview/appletgui/PaintRefresher.java
+++ b/
src/jalview/appletgui/PaintRefresher.java
@@
-24,8
+24,8
@@
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import java.awt.Component;
import jalview.datamodel.SequenceI;
import java.awt.Component;
-import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Hashtable;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Vector;
import java.util.List;
import java.util.Map;
import java.util.Vector;
@@
-52,7
+52,7
@@
public class PaintRefresher
{
if (components == null)
{
{
if (components == null)
{
- components = new Hashtable<String, Vector<Component>>();
+ components = new Hashtable<>();
}
if (components.containsKey(seqSetId))
}
if (components.containsKey(seqSetId))
@@
-78,13
+78,14
@@
public class PaintRefresher
return;
}
return;
}
- for (String id : components.keySet())
+ Iterator<String> it = components.keySet().iterator();
+ while (it.hasNext())
{
{
- Vector<Component> comps = components.get(id);
+ Vector<Component> comps = components.get(it.next());
comps.removeElement(comp);
comps.removeElement(comp);
- if (comps.size() == 0)
+ if (comps.isEmpty())
{
{
- components.remove(id);
+ it.remove();
}
}
}
}
}
}
@@
-110,10
+111,10
@@
public class PaintRefresher
return;
}
return;
}
- Enumeration<Component> e = comps.elements();
- while (e.hasMoreElements())
+ Iterator<Component> it = comps.iterator();
+ while (it.hasNext())
{
{
- comp = e.nextElement();
+ comp = it.next();
if (comp == source)
{
if (comp == source)
{
@@
-122,7
+123,7
@@
public class PaintRefresher
if (!comp.isValid())
{
if (!comp.isValid())
{
- comps.removeElement(comp);
+ it.remove();
}
else if (validateSequences && comp instanceof AlignmentPanel
&& source instanceof AlignmentPanel)
}
else if (validateSequences && comp instanceof AlignmentPanel
&& source instanceof AlignmentPanel)
@@
-190,8
+191,8
@@
public class PaintRefresher
{
// TODO: the following does not trigger any recalculation of
// height/etc, or maintain the dataset
{
// TODO: the following does not trigger any recalculation of
// height/etc, or maintain the dataset
- List<SequenceI> alsq;
- synchronized (alsq = comp.getSequences())
+ List<SequenceI> alsq = comp.getSequences();
+ synchronized (alsq)
{
alsq.add(i, a1[i]);
}
{
alsq.add(i, a1[i]);
}