Clover icon

Coverage Report

  1. Project Clover database Wed Nov 5 2025 13:15:40 GMT
  2. Package jalview.api.structures

File JalviewStructureDisplayI.java

 

Coverage histogram

../../../img/srcFileCovDistChart0.png
60% of files have more coverage

Code metrics

0
1
1
1
229
51
1
1
1
1
1

Classes

Class Line # Actions
JalviewStructureDisplayI 33 1 1
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.api.structures;
22   
23    import java.io.File;
24    import java.util.Collections;
25    import java.util.List;
26   
27    import jalview.api.AlignmentViewPanel;
28    import jalview.datamodel.PDBEntry;
29    import jalview.datamodel.SequenceI;
30    import jalview.gui.StructureViewer;
31    import jalview.structures.models.AAStructureBindingModel;
32   
 
33    public interface JalviewStructureDisplayI
34    {
35   
36    AAStructureBindingModel getBinding();
37   
38    /**
39    * @return true if there is an active GUI handling a structure display
40    */
41    boolean isVisible();
42   
43    /**
44    * enable or disable the structure display - note this might just hide or show
45    * a GUI element, but not actually reset the display
46    *
47    * @param b
48    */
49    void setVisible(boolean b);
50   
51    /**
52    * free up any external resources that were used by this display and collect
53    * garbage
54    */
55    void dispose();
56   
57    /**
58    * Shutdown any Jalview structure viewing processes started by this display
59    *
60    * @param closeExternalViewer
61    * if true, force close any linked external viewer process
62    */
63    void closeViewer(boolean closeExternalViewer);
64   
65    /**
66    * Check if the external viewer is still running
67    */
68    boolean stillRunning();
69   
70    /**
71    *
72    * @return true if all background sequence/structure binding threads have
73    * completed for this viewer instance
74    */
75    boolean hasMapping();
76   
77    /**
78    * Checks if the PDB file is already loaded in this viewer, if so just adds
79    * mappings as necessary and answers true, else answers false. This supports
80    * the use case of adding additional chains of the same structure to a viewer.
81    *
82    * @param seq
83    * @param chains
84    * @param apanel
85    * @param pdbId
86    * @return
87    */
88    boolean addAlreadyLoadedFile(SequenceI[] seq, String[] chains,
89    AlignmentViewPanel apanel, String pdbId);
90   
91    /**
92    * Adds one or more chains (sequences) of a PDB structure to this structure
93    * viewer
94    *
95    * @param pdbentry
96    * @param seq
97    * @param chains
98    * @param apanel
99    * @param pdbId
100    * @return
101    */
102    void addToExistingViewer(PDBEntry pdbentry, SequenceI[] seq,
103    String[] chains, AlignmentViewPanel apanel, String pdbId);
104   
105    /**
106    * refresh GUI after reconfiguring structure(s) and alignment panels
107    */
108    void updateTitleAndMenus();
109   
110    /**
111    * Answers true if the viewer should attempt to align any added structures,
112    * else false
113    *
114    * @return
115    */
116    boolean isAlignAddedStructures();
117   
118    /**
119    * Sets the flag for whether added structures should be aligned
120    *
121    * @param alignAdded
122    */
123    void setAlignAddedStructures(boolean alignAdded);
124   
125    /**
126    * Raise the panel to the top of the stack...
127    */
128    void raiseViewer();
129   
130    AlignmentViewPanel getAlignmentPanel();
131   
132    /**
133    * Answers true if the given alignment view is used to colour structures by
134    * sequence, false if not
135    *
136    * @param ap
137    * @return
138    */
139    boolean isUsedForColourBy(AlignmentViewPanel ap);
140   
141    /**
142    * If implemented, shows a command line console in the structure viewer
143    *
144    * @param show
145    * true to show, false to hide
146    */
147    void showConsole(boolean show);
148   
149    /**
150    * Remove references to the given alignment view for this structure viewer
151    *
152    * @param avp
153    */
154    void removeAlignmentPanel(AlignmentViewPanel avp);
155   
156    /**
157    * Updates the progress bar if there is one. Call stopProgressBar with the
158    * returned handle to remove the message.
159    *
160    * @param msg
161    * @return handle
162    */
163    long startProgressBar(String msg);
164   
165    /**
166    * Ends the progress bar with the specified handle, leaving a message (if not
167    * null) on the status bar
168    *
169    * @param msg
170    * @param handle
171    */
172    void stopProgressBar(String msg, long handle);
173   
174    /**
175    *
176    * @return true if the actions menu is shown for this viewer
177    */
178    boolean hasViewerActionsMenu();
179   
180    /**
181    * Show all chains in the structure viewer
182    */
183    public void showAllChains();
184   
185    String getViewId();
186   
187    StructureViewer.ViewerType getViewerType();
188   
189    boolean isUsedforaligment(AlignmentViewPanel ap);
190   
191    boolean isColouredByViewer();
192   
193    int getHeight();
194   
195    int getWidth();
196   
197    int getX();
198   
199    int getY();
200   
201    File saveSession();
202   
203    /**
204    *
205    * @return heteroatoms in a form suitable for display and passing to command
206    * generator to display hetatms
207    */
 
208  0 toggle default List<String> getHetatms()
209    {
210  0 return Collections.EMPTY_LIST;
211    }
212   
213    /**
214    * Set a permanent viewer title. Can be changed by calling setPermanentTitle
215    * again.
216    */
217    public void setPermanentTitle(String title);
218   
219    /**
220    * Get the actual title displayed on the JInternalFrame
221    */
222    public String getActualTitle();
223   
224    /**
225    * Get the string we think should be used as the title for this viewer
226    * (permanent or dynamic)
227    */
228    public String getViewerTitle();
229    }