if (predMap != null)\r
{\r
Object[] alandcolsel = input.getAlignmentAndColumnSelection(\r
- alignFrame.getViewport().getGapCharacter());\r
+ getGapChar());\r
sqs = (SequenceI[]) alandcolsel[0];\r
al = new Alignment(sqs);\r
alcsel = (ColumnSelection) alandcolsel[1];\r
FirstSeq = prediction.getQuerySeqPosition();\r
if (predMap != null)\r
{\r
- char gc = alignFrame.getViewport().getGapCharacter();\r
+ char gc = getGapChar();\r
SequenceI[] sqs = (SequenceI[]) ( (java.lang.Object[]) input.\r
getAlignmentAndColumnSelection(gc))[\r
0];\r
new jalview.commands.RemoveGapsCommand("Remove Gaps",\r
new SequenceI[]\r
{sqs[msaIndex]},\r
- alignFrame.getCurrentView().\r
- getAlignment());\r
+ currentView);\r
\r
SequenceI profileseq = al.getSequenceAt(FirstSeq);\r
profileseq.setSequence(sqs[msaIndex].getSequenceAsString());\r
results[j] = null;
}
}
- Object[] newview = input.getUpdatedView(results, orders, '-');
+ Object[] newview = input.getUpdatedView(results, orders, getGapChar());
// trash references to original result data
for (int j = 0; j < jobs.length; j++)
{
AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
- // >>>This is a fix for the moment, until a better solution is
- // found!!<<<
+ // initialise with same renderer settings as in parent alignframe.
af.getFeatureRenderer().transferSettings(
- alignFrame.getFeatureRenderer());
+ this.featureSettings);
// update orders
if (alorders.size() > 0)
{
}
}
-
public boolean canMergeResults()
{
return false;
import jalview.bin.*;
import jalview.datamodel.*;
import jalview.gui.*;
+import jalview.gui.FeatureRenderer.FeatureRendererSettings;
public abstract class WSThread
extends Thread
/**
* Generic properties for Web Service Client threads.
*/
- AlignFrame alignFrame = null;
+ AlignmentI currentView = null;
+ FeatureRendererSettings featureSettings = null;
WebserviceInfo wsInfo = null;
AlignmentView input = null;
AlignedCodonFrame[] codonframe = null;
this(alignFrame, wsinfo, input, wsUrl);
WebServiceName = webServiceName;
}
+ char defGapChar = '-';
+ /**
+ *
+ * @return gap character to use for any alignment generation
+ */
+ public char getGapChar()
+ {
+ return defGapChar;
+ }
/**
*
- * @param alframe - reference for copying mappings across
+ * @param alframe - reference for copying mappings and display styles across
* @param wsinfo2 - gui attachment point
* @param alview - input data for the calculation
* @param wsurl2 - url of the service being invoked
AlignmentView alview, String wsurl2)
{
super();
- this.alignFrame = alframe;
+ // this.alignFrame = alframe;
+ currentView = alframe.getCurrentView().getAlignment();
+ featureSettings = alframe.getFeatureRenderer().getSettings();
+ defGapChar = alframe.getViewport().getGapCharacter();
this.wsInfo = wsinfo2;
this.input = alview;
WsUrl = wsurl2;
- if (alignFrame!=null)
+ if (alframe!=null)
{
- AlignedCodonFrame[] cf = alignFrame.getViewport().getAlignment().getCodonFrames();
+ AlignedCodonFrame[] cf = alframe.getViewport().getAlignment().getCodonFrames();
if (cf!=null)
{
codonframe = new AlignedCodonFrame[cf.length];