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-3066 Fix NullPointerException thrown when showing HMMER run dialog
[jalview.git]
/
src
/
jalview
/
gui
/
JalviewChimeraBindingModel.java
diff --git
a/src/jalview/gui/JalviewChimeraBindingModel.java
b/src/jalview/gui/JalviewChimeraBindingModel.java
index
6b02bf5
..
9d63c6a
100644
(file)
--- a/
src/jalview/gui/JalviewChimeraBindingModel.java
+++ b/
src/jalview/gui/JalviewChimeraBindingModel.java
@@
-21,44
+21,39
@@
package jalview.gui;
import jalview.api.AlignmentViewPanel;
package jalview.gui;
import jalview.api.AlignmentViewPanel;
+import jalview.api.structures.JalviewStructureDisplayI;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
import jalview.ext.rbvi.chimera.JalviewChimeraBinding;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
import jalview.ext.rbvi.chimera.JalviewChimeraBinding;
+import jalview.io.DataSourceType;
import jalview.structure.StructureSelectionManager;
import jalview.structure.StructureSelectionManager;
+import jalview.viewmodel.seqfeatures.FeatureRendererModel;
+
+import javax.swing.SwingUtilities;
public class JalviewChimeraBindingModel extends JalviewChimeraBinding
{
private ChimeraViewFrame cvf;
public class JalviewChimeraBindingModel extends JalviewChimeraBinding
{
private ChimeraViewFrame cvf;
- private FeatureRenderer fr = null;
-
-
public JalviewChimeraBindingModel(ChimeraViewFrame chimeraViewFrame,
StructureSelectionManager ssm, PDBEntry[] pdbentry,
public JalviewChimeraBindingModel(ChimeraViewFrame chimeraViewFrame,
StructureSelectionManager ssm, PDBEntry[] pdbentry,
- SequenceI[][] sequenceIs, String protocol)
+ SequenceI[][] sequenceIs, DataSourceType protocol)
{
super(ssm, pdbentry, sequenceIs, protocol);
cvf = chimeraViewFrame;
}
@Override
{
super(ssm, pdbentry, sequenceIs, protocol);
cvf = chimeraViewFrame;
}
@Override
- public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
+ public FeatureRendererModel getFeatureRenderer(AlignmentViewPanel alignment)
{
AlignmentPanel ap = (alignment == null) ? cvf.getAlignmentPanel()
: (AlignmentPanel) alignment;
if (ap.av.isShowSequenceFeatures())
{
{
AlignmentPanel ap = (alignment == null) ? cvf.getAlignmentPanel()
: (AlignmentPanel) alignment;
if (ap.av.isShowSequenceFeatures())
{
- if (fr == null)
- {
- fr = (jalview.gui.FeatureRenderer) ap.cloneFeatureRenderer();
- }
- else
- {
- ap.updateFeatureRenderer(fr);
- }
+ return ap.getSeqPanel().seqCanvas.fr;
}
}
- return fr;
+ return null;
}
@Override
}
@Override
@@
-93,7
+88,7
@@
public class JalviewChimeraBindingModel extends JalviewChimeraBinding
}
if (!isLoadingFromArchive())
{
}
if (!isLoadingFromArchive())
{
- colourBySequence(ap.av.isShowSequenceFeatures(), ap);
+ colourBySequence(ap);
}
}
}
}
@@
-120,17
+115,13
@@
public class JalviewChimeraBindingModel extends JalviewChimeraBinding
protected void sendAsynchronousCommand(final String command,
final String progressMsg)
{
protected void sendAsynchronousCommand(final String command,
final String progressMsg)
{
- Thread thread = new Thread(new Runnable()
+ final long handle = progressMsg == null ? 0
+ : cvf.startProgressBar(progressMsg);
+ SwingUtilities.invokeLater(new Runnable()
{
{
-
@Override
public void run()
{
@Override
public void run()
{
- long handle = 0;
- if (progressMsg != null)
- {
- handle = cvf.startProgressBar(progressMsg);
- }
try
{
sendChimeraCommand(command, false);
try
{
sendChimeraCommand(command, false);
@@
-143,9
+134,11
@@
public class JalviewChimeraBindingModel extends JalviewChimeraBinding
}
}
});
}
}
});
- thread.start();
-
}
}
-
+ @Override
+ public JalviewStructureDisplayI getViewer()
+ {
+ return cvf;
+ }
}
}