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
TreePanel takes viewport
[jalview.git]
/
src
/
jalview
/
gui
/
PaintRefresher.java
diff --git
a/src/jalview/gui/PaintRefresher.java
b/src/jalview/gui/PaintRefresher.java
index
6bec8fd
..
0fe4b85
100755
(executable)
--- a/
src/jalview/gui/PaintRefresher.java
+++ b/
src/jalview/gui/PaintRefresher.java
@@
-18,45
+18,80
@@
*/
\r
package jalview.gui;
\r
\r
*/
\r
package jalview.gui;
\r
\r
-import java.util.*;
\r
+import jalview.datamodel.*;
\r
\r
import java.awt.*;
\r
\r
\r
import java.awt.*;
\r
\r
+import java.util.*;
\r
+
\r
+
\r
+/**
\r
+ * DOCUMENT ME!
\r
+ *
\r
+ * @author $author$
\r
+ * @version $Revision$
\r
+ */
\r
public class PaintRefresher
\r
{
\r
public class PaintRefresher
\r
{
\r
- static Vector components = new Vector();
\r
+ static Hashtable components = new Hashtable();
\r
\r
\r
- public static void Register(Component c)
\r
- {
\r
- if (!components.contains(c))
\r
+ /**
\r
+ * DOCUMENT ME!
\r
+ *
\r
+ * @param comp DOCUMENT ME!
\r
+ * @param al DOCUMENT ME!
\r
+ */
\r
+ public static void Register(Component comp, AlignmentI al)
\r
{
\r
{
\r
- components.add(c);
\r
+ if (components.containsKey(al))
\r
+ {
\r
+ Vector comps = (Vector) components.get(al);
\r
+ comps.addElement(comp);
\r
+ }
\r
+ else
\r
+ {
\r
+ Vector vcoms = new Vector();
\r
+ vcoms.addElement(comp);
\r
+ components.put(al, vcoms);
\r
+ }
\r
}
\r
}
\r
- else
\r
+
\r
+ /**
\r
+ * DOCUMENT ME!
\r
+ *
\r
+ * @param al DOCUMENT ME!
\r
+ */
\r
+ public static void Refresh(AlignmentI al)
\r
{
\r
{
\r
- components.remove(c);
\r
+ Refresh(null, al);
\r
}
\r
}
\r
- }
\r
-
\r
- public static void Refresh(Component c)
\r
- {
\r
- Component temp;
\r
- Enumeration e = components.elements();
\r
\r
\r
- while (e.hasMoreElements())
\r
+ /**
\r
+ * DOCUMENT ME!
\r
+ *
\r
+ * @param c DOCUMENT ME!
\r
+ * @param al DOCUMENT ME!
\r
+ */
\r
+ public static void Refresh(Component c, AlignmentI al)
\r
{
\r
{
\r
- temp = (Component) e.nextElement();
\r
-
\r
- if (!temp.isValid())
\r
- {
\r
- components.removeElement(temp);
\r
- }
\r
- else if (temp == c)
\r
- {
\r
- continue;
\r
- }
\r
-
\r
- temp.repaint();
\r
+ Component temp;
\r
+ Vector coms = (Vector) components.get(al);
\r
+ Enumeration e = coms.elements();
\r
+
\r
+ while (e.hasMoreElements())
\r
+ {
\r
+ temp = (Component) e.nextElement();
\r
+
\r
+ if (!temp.isValid())
\r
+ {
\r
+ coms.removeElement(temp);
\r
+ }
\r
+ else if (temp == c)
\r
+ {
\r
+ continue;
\r
+ }
\r
+
\r
+ temp.repaint();
\r
+ }
\r
}
\r
}
\r
- }
\r
}
\r
}
\r