| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
package jalview.appletgui; |
| 22 |
|
|
| 23 |
|
import jalview.api.AlignmentViewPanel; |
| 24 |
|
import jalview.datamodel.PDBEntry; |
| 25 |
|
import jalview.datamodel.SequenceI; |
| 26 |
|
import jalview.ext.jmol.JalviewJmolBinding; |
| 27 |
|
import jalview.io.DataSourceType; |
| 28 |
|
import jalview.structure.StructureSelectionManager; |
| 29 |
|
|
| 30 |
|
import java.awt.Container; |
| 31 |
|
import java.util.Map; |
| 32 |
|
|
| 33 |
|
import org.jmol.api.JmolAppConsoleInterface; |
| 34 |
|
import org.jmol.console.AppletConsole; |
| 35 |
|
import javajs.util.BS; |
| 36 |
|
|
| |
|
| 0% |
Uncovered Elements: 44 (44) |
Complexity: 23 |
Complexity Density: 1.05 |
|
| 37 |
|
class AppletJmolBinding extends JalviewJmolBinding |
| 38 |
|
{ |
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
private AppletJmol appletJmolBinding; |
| 44 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 45 |
0 |
public AppletJmolBinding(AppletJmol appletJmol,... |
| 46 |
|
StructureSelectionManager sSm, PDBEntry[] pdbentry, |
| 47 |
|
SequenceI[][] seq, DataSourceType protocol) |
| 48 |
|
{ |
| 49 |
0 |
super(sSm, pdbentry, seq, protocol); |
| 50 |
0 |
appletJmolBinding = appletJmol; |
| 51 |
|
} |
| 52 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 53 |
0 |
@Override... |
| 54 |
|
public jalview.api.SequenceRenderer getSequenceRenderer( |
| 55 |
|
AlignmentViewPanel alignment) |
| 56 |
|
{ |
| 57 |
0 |
return new SequenceRenderer(((AlignmentPanel) alignment).av); |
| 58 |
|
} |
| 59 |
|
|
| |
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 60 |
0 |
@Override... |
| 61 |
|
public void sendConsoleEcho(String strEcho) |
| 62 |
|
{ |
| 63 |
0 |
if (appletJmolBinding.scriptWindow == null) |
| 64 |
|
{ |
| 65 |
0 |
appletJmolBinding.showConsole(true); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
0 |
appletJmolBinding.addToHistory(strEcho); |
| 69 |
|
} |
| 70 |
|
|
| |
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 4 |
Complexity Density: 2 |
|
| 71 |
0 |
@Override... |
| 72 |
|
public void sendConsoleMessage(String strStatus) |
| 73 |
|
{ |
| 74 |
0 |
if (appletJmolBinding.history != null && strStatus != null |
| 75 |
|
&& !strStatus.equals("Script completed")) |
| 76 |
|
{ |
| 77 |
0 |
appletJmolBinding.addToHistory(strStatus); |
| 78 |
|
} |
| 79 |
|
} |
| 80 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 81 |
0 |
@Override... |
| 82 |
|
public void showUrl(String url, String target) |
| 83 |
|
{ |
| 84 |
0 |
appletJmolBinding.ap.alignFrame.showURL(url, target); |
| 85 |
|
|
| 86 |
|
} |
| 87 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 88 |
0 |
@Override... |
| 89 |
|
public void refreshGUI() |
| 90 |
|
{ |
| 91 |
0 |
appletJmolBinding.updateTitleAndMenus(); |
| 92 |
|
} |
| 93 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 94 |
0 |
@Override... |
| 95 |
|
public void updateColours(Object source) |
| 96 |
|
{ |
| 97 |
0 |
AlignmentPanel ap = (AlignmentPanel) source; |
| 98 |
0 |
colourBySequence(ap); |
| 99 |
|
} |
| 100 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 2 |
Complexity Density: 1 |
|
| 101 |
0 |
@Override... |
| 102 |
|
public void showUrl(String url) |
| 103 |
|
{ |
| 104 |
0 |
try |
| 105 |
|
{ |
| 106 |
0 |
appletJmolBinding.ap.av.applet.getAppletContext() |
| 107 |
|
.showDocument(new java.net.URL(url), "jmol"); |
| 108 |
|
} catch (java.net.MalformedURLException ex) |
| 109 |
|
{ |
| 110 |
|
} |
| 111 |
|
} |
| 112 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 113 |
0 |
public void newJmolPopup(boolean translateLocale, String menuName,... |
| 114 |
|
boolean asPopup) |
| 115 |
|
{ |
| 116 |
|
|
| 117 |
|
|
| 118 |
|
} |
| 119 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 120 |
0 |
@Override... |
| 121 |
|
public void notifyScriptTermination(String strStatus, int msWalltime) |
| 122 |
|
{ |
| 123 |
|
|
| 124 |
|
} |
| 125 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 126 |
0 |
@Override... |
| 127 |
|
public void selectionChanged(BS arg0) |
| 128 |
|
{ |
| 129 |
|
|
| 130 |
|
|
| 131 |
|
} |
| 132 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 133 |
0 |
@Override... |
| 134 |
|
public void refreshPdbEntries() |
| 135 |
|
{ |
| 136 |
|
|
| 137 |
|
} |
| 138 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 139 |
0 |
@Override... |
| 140 |
|
public void showConsole(boolean show) |
| 141 |
|
{ |
| 142 |
0 |
appletJmolBinding.showConsole(show); |
| 143 |
|
} |
| 144 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 145 |
0 |
@Override... |
| 146 |
|
protected JmolAppConsoleInterface createJmolConsole( |
| 147 |
|
Container consolePanel, String buttonsToShow) |
| 148 |
|
{ |
| 149 |
0 |
JmolAppConsoleInterface appc = new AppletConsole(); |
| 150 |
0 |
appc.start(jmolViewer); |
| 151 |
0 |
return appc; |
| 152 |
|
} |
| 153 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 154 |
0 |
@Override... |
| 155 |
|
protected void releaseUIResources() |
| 156 |
|
{ |
| 157 |
0 |
appletJmolBinding = null; |
| 158 |
0 |
closeConsole(); |
| 159 |
|
} |
| 160 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 161 |
0 |
@Override... |
| 162 |
|
public void releaseReferences(Object svl) |
| 163 |
|
{ |
| 164 |
|
} |
| 165 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 166 |
0 |
@Override... |
| 167 |
|
public int[] resizeInnerPanel(String data) |
| 168 |
|
{ |
| 169 |
0 |
return null; |
| 170 |
|
} |
| 171 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 172 |
0 |
@Override... |
| 173 |
|
public Map<String, Object> getJSpecViewProperty(String arg0) |
| 174 |
|
{ |
| 175 |
0 |
return null; |
| 176 |
|
} |
| 177 |
|
} |