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
Merge branch 'Jalview-BH/JAL-3026-JAL-3063-JAXB' of https://source.jalview.org/git...
[jalview.git]
/
src
/
jalview
/
javascript
/
JsSelectionSender.java
diff --git
a/src/jalview/javascript/JsSelectionSender.java
b/src/jalview/javascript/JsSelectionSender.java
index
cc293b1
..
c2a963e
100644
(file)
--- a/
src/jalview/javascript/JsSelectionSender.java
+++ b/
src/jalview/javascript/JsSelectionSender.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-23,11
+23,12
@@
package jalview.javascript;
import jalview.appletgui.AlignFrame;
import jalview.bin.JalviewLite;
import jalview.datamodel.ColumnSelection;
import jalview.appletgui.AlignFrame;
import jalview.bin.JalviewLite;
import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.HiddenColumns;
import jalview.datamodel.SequenceGroup;
import jalview.structure.SelectionSource;
import jalview.datamodel.SequenceGroup;
import jalview.structure.SelectionSource;
-public class JsSelectionSender extends JSFunctionExec implements
- jalview.structure.SelectionListener, JsCallBack
+public class JsSelectionSender extends JSFunctionExec
+ implements jalview.structure.SelectionListener, JsCallBack
{
AlignFrame _af;
{
AlignFrame _af;
@@
-44,13
+45,13
@@
public class JsSelectionSender extends JSFunctionExec implements
@Override
public void selection(SequenceGroup seqsel, ColumnSelection colsel,
@Override
public void selection(SequenceGroup seqsel, ColumnSelection colsel,
- SelectionSource source)
+ HiddenColumns hidden, SelectionSource source)
{
{
- // System.err.println("Testing selection event relay to jsfunction:"+_listener);
+ // System.err.println("Testing selection event relay to
+ // jsfunction:"+_listener);
try
{
String setid = "";
try
{
String setid = "";
- String viewid = "";
AlignFrame src = _af;
if (source != null)
{
AlignFrame src = _af;
if (source != null)
{
@@
-64,8
+65,8
@@
public class JsSelectionSender extends JSFunctionExec implements
}
String[] seqs = new String[] {};
String[] cols = new String[] {};
}
String[] seqs = new String[] {};
String[] cols = new String[] {};
- int strt = 0, end = (src == null) ? -1 : src.alignPanel.av
- .getAlignment().getWidth();
+ int strt = 0, end = (src == null) ? -1
+ : src.alignPanel.av.getAlignment().getWidth();
if (seqsel != null && seqsel.getSize() > 0)
{
seqs = new String[seqsel.getSize()];
if (seqsel != null && seqsel.getSize() > 0)
{
seqs = new String[seqsel.getSize()];
@@
-82,19
+83,16
@@
public class JsSelectionSender extends JSFunctionExec implements
end = seqsel.getEndRes();
}
}
end = seqsel.getEndRes();
}
}
- if (colsel != null && colsel.size() > 0)
+ if (colsel != null && !colsel.isEmpty())
{
if (end == -1)
{
end = colsel.getMax() + 1;
}
cols = new String[colsel.getSelected().size()];
{
if (end == -1)
{
end = colsel.getMax() + 1;
}
cols = new String[colsel.getSelected().size()];
- int d = 0, r = -1;
for (int i = 0; i < cols.length; i++)
{
for (int i = 0; i < cols.length; i++)
{
- cols[i] = ""
- + (1 + ((Integer) colsel.getSelected().elementAt(i))
- .intValue());
+ cols[i] = "" + (1 + colsel.getSelected().get(i).intValue());
}
}
else
}
}
else
@@
-110,12
+108,13
@@
public class JsSelectionSender extends JSFunctionExec implements
}
System.err.println("Relaying selection to jsfunction:" + _listener);
executeJavascriptFunction(_listener,
}
System.err.println("Relaying selection to jsfunction:" + _listener);
executeJavascriptFunction(_listener,
- new Object[] { src, setid, jvlite.arrayToSeparatorList(seqs),
+ new Object[]
+ { src, setid, jvlite.arrayToSeparatorList(seqs),
jvlite.arrayToSeparatorList(cols) });
} catch (Exception ex)
{
jvlite.arrayToSeparatorList(cols) });
} catch (Exception ex)
{
- System.err
- .println("Jalview Javascript exec error: Couldn't send selection message using function '"
+ System.err.println(
+ "Jalview Javascript exec error: Couldn't send selection message using function '"
+ _listener + "'");
ex.printStackTrace();
if (ex instanceof netscape.javascript.JSException)
+ _listener + "'");
ex.printStackTrace();
if (ex instanceof netscape.javascript.JSException)