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
Annotations.Graph can be bargraph, linegraph
[jalview.git]
/
src
/
jalview
/
gui
/
PaintRefresher.java
diff --git
a/src/jalview/gui/PaintRefresher.java
b/src/jalview/gui/PaintRefresher.java
index
e59ecd9
..
e05f44d
100755
(executable)
--- a/
src/jalview/gui/PaintRefresher.java
+++ b/
src/jalview/gui/PaintRefresher.java
@@
-16,53
+16,82
@@
* along with this program; if not, write to the Free Software
\r
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
*/
\r
* along with this program; if not, write to the Free Software
\r
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
*/
\r
-
\r
package jalview.gui;
\r
package jalview.gui;
\r
+
\r
+import jalview.datamodel.*;
\r
+
\r
import java.awt.*;
\r
import java.awt.*;
\r
+
\r
import java.util.*;
\r
import java.util.*;
\r
-import jalview.datamodel.*;
\r
\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 Hashtable components = new Hashtable();
\r
+ static Hashtable components = new Hashtable();
\r
\r
\r
- public static void Register(Component comp, AlignmentI al)
\r
- {
\r
- if(components.containsKey(al))
\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
- Vector comps = (Vector)components.get(al);
\r
- comps.addElement(comp);
\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
- Vector vcoms = new Vector();
\r
- vcoms.addElement(comp);
\r
- components.put(al, vcoms);
\r
+ Refresh(null, al);
\r
}
\r
}
\r
- }
\r
\r
\r
- public static void Refresh(AlignmentI al)
\r
- {
\r
- Refresh(null, al);
\r
- }
\r
-
\r
- public static void Refresh(Component c, AlignmentI al)
\r
- {
\r
- Component temp;
\r
- Vector coms = (Vector)components.get(al);
\r
- Enumeration e = coms.elements();
\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
+ Component temp;
\r
+ Vector coms = (Vector) components.get(al);
\r
+ Enumeration e = coms.elements();
\r
\r
\r
- if(!temp.isValid())
\r
- coms.removeElement( temp );
\r
- else if( temp == c )
\r
- continue;
\r
+ while (e.hasMoreElements())
\r
+ {
\r
+ temp = (Component) e.nextElement();
\r
\r
\r
- temp.repaint();
\r
+ if (!temp.isValid())
\r
+ {
\r
+ coms.removeElement(temp);
\r
+ }
\r
+ else if (temp == c)
\r
+ {
\r
+ continue;
\r
+ }
\r
+ else
\r
+ temp.repaint();
\r
+ }
\r
}
\r
}
\r
-
\r
- }
\r
-
\r
}
\r
}
\r