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-1989 tightened up use of flag for 'column selection changed'
[jalview.git]
/
src
/
jalview
/
appletgui
/
AnnotationPanel.java
diff --git
a/src/jalview/appletgui/AnnotationPanel.java
b/src/jalview/appletgui/AnnotationPanel.java
index
32d528c
..
77700d0
100755
(executable)
--- a/
src/jalview/appletgui/AnnotationPanel.java
+++ b/
src/jalview/appletgui/AnnotationPanel.java
@@
-150,7
+150,7
@@
public class AnnotationPanel extends Panel implements AwtRenderPanelI,
String label = "";
if (av.getColumnSelection() != null
String label = "";
if (av.getColumnSelection() != null
- && av.getColumnSelection().size() > 0
+ && !av.getColumnSelection().isEmpty()
&& anot[av.getColumnSelection().getMin()] != null)
{
label = anot[av.getColumnSelection().getMin()].displayCharacter;
&& anot[av.getColumnSelection().getMin()] != null)
{
label = anot[av.getColumnSelection().getMin()].displayCharacter;
@@
-158,9
+158,12
@@
public class AnnotationPanel extends Panel implements AwtRenderPanelI,
if (evt.getActionCommand().equals(REMOVE))
{
if (evt.getActionCommand().equals(REMOVE))
{
- for (int i = 0; i < av.getColumnSelection().size(); i++)
+ for (int sel : av.getColumnSelection().getSelected())
{
{
- anot[av.getColumnSelection().columnAt(i)] = null;
+ // TODO: JAL-2001 check if applet has faulty 'REMOVE' selected columns
+ // of
+ // annotation if selection includes hidden columns
+ anot[sel] = null;
}
}
else if (evt.getActionCommand().equals(LABEL))
}
}
else if (evt.getActionCommand().equals(LABEL))
@@
-177,10
+180,10
@@
public class AnnotationPanel extends Panel implements AwtRenderPanelI,
aa[activeRow].hasText = true;
}
aa[activeRow].hasText = true;
}
- for (int i = 0; i < av.getColumnSelection().size(); i++)
+ for (int index : av.getColumnSelection().getSelected())
{
{
- int index = av.getColumnSelection().columnAt(i);
-
+ // TODO: JAL-2001 - provide a fast method to list visible selected
+ // columns
if (!av.getColumnSelection().isVisible(index))
{
continue;
if (!av.getColumnSelection().isVisible(index))
{
continue;
@@
-201,10
+204,8
@@
public class AnnotationPanel extends Panel implements AwtRenderPanelI,
Color col = udc.getColor();
Color col = udc.getColor();
- for (int i = 0; i < av.getColumnSelection().size(); i++)
+ for (int index : av.getColumnSelection().getSelected())
{
{
- int index = av.getColumnSelection().columnAt(i);
-
if (!av.getColumnSelection().isVisible(index))
{
continue;
if (!av.getColumnSelection().isVisible(index))
{
continue;
@@
-262,10
+263,8
@@
public class AnnotationPanel extends Panel implements AwtRenderPanelI,
}
}
}
}
- for (int i = 0; i < av.getColumnSelection().size(); i++)
+ for (int index : av.getColumnSelection().getSelected())
{
{
- int index = av.getColumnSelection().columnAt(i);
-
if (!av.getColumnSelection().isVisible(index))
{
continue;
if (!av.getColumnSelection().isVisible(index))
{
continue;