1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.jbgui; |
22 |
|
|
23 |
|
import jalview.bin.Jalview; |
24 |
|
import jalview.fts.core.FTSDataColumnPreferences; |
25 |
|
import jalview.fts.core.FTSDataColumnPreferences.PreferenceSource; |
26 |
|
import jalview.fts.service.pdb.PDBFTSRestClient; |
27 |
|
import jalview.gui.JvSwingUtils; |
28 |
|
import jalview.gui.StructureViewer.ViewerType; |
29 |
|
import jalview.util.MessageManager; |
30 |
|
|
31 |
|
import java.awt.BorderLayout; |
32 |
|
import java.awt.Color; |
33 |
|
import java.awt.Component; |
34 |
|
import java.awt.Dimension; |
35 |
|
import java.awt.FlowLayout; |
36 |
|
import java.awt.Font; |
37 |
|
import java.awt.GridBagConstraints; |
38 |
|
import java.awt.GridBagLayout; |
39 |
|
import java.awt.GridLayout; |
40 |
|
import java.awt.Insets; |
41 |
|
import java.awt.Rectangle; |
42 |
|
import java.awt.event.ActionEvent; |
43 |
|
import java.awt.event.ActionListener; |
44 |
|
import java.awt.event.FocusEvent; |
45 |
|
import java.awt.event.KeyEvent; |
46 |
|
import java.awt.event.MouseAdapter; |
47 |
|
import java.awt.event.MouseEvent; |
48 |
|
|
49 |
|
import javax.swing.AbstractCellEditor; |
50 |
|
import javax.swing.BorderFactory; |
51 |
|
import javax.swing.ButtonGroup; |
52 |
|
import javax.swing.DefaultListCellRenderer; |
53 |
|
import javax.swing.JButton; |
54 |
|
import javax.swing.JCheckBox; |
55 |
|
import javax.swing.JComboBox; |
56 |
|
import javax.swing.JFileChooser; |
57 |
|
import javax.swing.JLabel; |
58 |
|
import javax.swing.JPanel; |
59 |
|
import javax.swing.JRadioButton; |
60 |
|
import javax.swing.JScrollPane; |
61 |
|
import javax.swing.JTabbedPane; |
62 |
|
import javax.swing.JTable; |
63 |
|
import javax.swing.JTextField; |
64 |
|
import javax.swing.ListSelectionModel; |
65 |
|
import javax.swing.SwingConstants; |
66 |
|
import javax.swing.border.Border; |
67 |
|
import javax.swing.border.EmptyBorder; |
68 |
|
import javax.swing.border.EtchedBorder; |
69 |
|
import javax.swing.border.TitledBorder; |
70 |
|
import javax.swing.event.ChangeEvent; |
71 |
|
import javax.swing.event.ChangeListener; |
72 |
|
import javax.swing.table.TableCellEditor; |
73 |
|
import javax.swing.table.TableCellRenderer; |
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
@author |
79 |
|
@version |
80 |
|
|
|
|
| 0% |
Uncovered Elements: 885 (885) |
Complexity: 76 |
Complexity Density: 0.1 |
|
81 |
|
public class GPreferences extends JPanel |
82 |
|
{ |
83 |
|
private static final Font LABEL_FONT = JvSwingUtils.getLabelFont(); |
84 |
|
|
85 |
|
private static final Font LABEL_FONT_ITALIC = JvSwingUtils |
86 |
|
.getLabelFont(false, true); |
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
protected JCheckBox fullScreen = new JCheckBox(); |
92 |
|
|
93 |
|
protected JCheckBox openoverv = new JCheckBox(); |
94 |
|
|
95 |
|
protected JCheckBox seqLimit = new JCheckBox(); |
96 |
|
|
97 |
|
protected JCheckBox rightAlign = new JCheckBox(); |
98 |
|
|
99 |
|
protected JComboBox<String> fontSizeCB = new JComboBox<>(); |
100 |
|
|
101 |
|
protected JComboBox<String> fontStyleCB = new JComboBox<>(); |
102 |
|
|
103 |
|
protected JComboBox<String> fontNameCB = new JComboBox<>(); |
104 |
|
|
105 |
|
protected JCheckBox showOccupancy = new JCheckBox(); |
106 |
|
|
107 |
|
protected JCheckBox showUnconserved = new JCheckBox(); |
108 |
|
|
109 |
|
protected JCheckBox idItalics = new JCheckBox(); |
110 |
|
|
111 |
|
protected JCheckBox smoothFont = new JCheckBox(); |
112 |
|
|
113 |
|
protected JCheckBox scaleProteinToCdna = new JCheckBox(); |
114 |
|
|
115 |
|
protected JComboBox<String> gapSymbolCB = new JComboBox<>(); |
116 |
|
|
117 |
|
protected JCheckBox wrap = new JCheckBox(); |
118 |
|
|
119 |
|
protected JComboBox<String> sortby = new JComboBox<>(); |
120 |
|
|
121 |
|
protected JComboBox<String> sortAnnBy = new JComboBox<>(); |
122 |
|
|
123 |
|
protected JComboBox<String> sortAutocalc = new JComboBox<>(); |
124 |
|
|
125 |
|
protected JCheckBox startupCheckbox = new JCheckBox(); |
126 |
|
|
127 |
|
protected JTextField startupFileTextfield = new JTextField(); |
128 |
|
|
129 |
|
|
130 |
|
protected JCheckBox annotations = new JCheckBox(); |
131 |
|
|
132 |
|
protected JCheckBox quality = new JCheckBox(); |
133 |
|
|
134 |
|
protected JCheckBox conservation = new JCheckBox(); |
135 |
|
|
136 |
|
protected JCheckBox identity = new JCheckBox(); |
137 |
|
|
138 |
|
protected JCheckBox showGroupConsensus = new JCheckBox(); |
139 |
|
|
140 |
|
protected JCheckBox showGroupConservation = new JCheckBox(); |
141 |
|
|
142 |
|
protected JCheckBox showConsensHistogram = new JCheckBox(); |
143 |
|
|
144 |
|
protected JCheckBox showConsensLogo = new JCheckBox(); |
145 |
|
|
146 |
|
protected JCheckBox showDbRefTooltip = new JCheckBox(); |
147 |
|
|
148 |
|
protected JCheckBox showNpTooltip = new JCheckBox(); |
149 |
|
|
150 |
|
|
151 |
|
|
152 |
|
|
153 |
|
protected JPanel structureTab; |
154 |
|
|
155 |
|
protected JCheckBox structFromPdb = new JCheckBox(); |
156 |
|
|
157 |
|
protected JCheckBox useRnaView = new JCheckBox(); |
158 |
|
|
159 |
|
protected JCheckBox addSecondaryStructure = new JCheckBox(); |
160 |
|
|
161 |
|
protected JCheckBox addTempFactor = new JCheckBox(); |
162 |
|
|
163 |
|
protected JComboBox<String> structViewer = new JComboBox<>(); |
164 |
|
|
165 |
|
protected JTextField chimeraPath = new JTextField(); |
166 |
|
|
167 |
|
protected ButtonGroup mappingMethod = new ButtonGroup(); |
168 |
|
|
169 |
|
protected JRadioButton siftsMapping = new JRadioButton(); |
170 |
|
|
171 |
|
protected JRadioButton nwMapping = new JRadioButton(); |
172 |
|
|
173 |
|
|
174 |
|
|
175 |
|
|
176 |
|
protected JPanel minColour = new JPanel(); |
177 |
|
|
178 |
|
protected JPanel maxColour = new JPanel(); |
179 |
|
|
180 |
|
protected JComboBox<String> protColour = new JComboBox<>(); |
181 |
|
|
182 |
|
protected JComboBox<String> nucColour = new JComboBox<>(); |
183 |
|
|
184 |
|
|
185 |
|
|
186 |
|
|
187 |
|
protected JPanel gapColour = new JPanel(); |
188 |
|
|
189 |
|
protected JPanel hiddenColour = new JPanel(); |
190 |
|
|
191 |
|
protected JCheckBox useLegacyGap; |
192 |
|
|
193 |
|
protected JCheckBox showHiddenAtStart; |
194 |
|
|
195 |
|
protected JLabel gapLabel; |
196 |
|
|
197 |
|
|
198 |
|
|
199 |
|
|
200 |
|
protected JTable linkUrlTable = new JTable(); |
201 |
|
|
202 |
|
protected JButton editLink = new JButton(); |
203 |
|
|
204 |
|
protected JButton deleteLink = new JButton(); |
205 |
|
|
206 |
|
protected JTextField filterTB = new JTextField(); |
207 |
|
|
208 |
|
protected JButton doReset = new JButton(); |
209 |
|
|
210 |
|
protected JButton userOnly = new JButton(); |
211 |
|
|
212 |
|
protected JLabel portLabel = new JLabel(); |
213 |
|
|
214 |
|
protected JLabel serverLabel = new JLabel(); |
215 |
|
|
216 |
|
protected JTextField proxyServerTB = new JTextField(); |
217 |
|
|
218 |
|
protected JTextField proxyPortTB = new JTextField(); |
219 |
|
|
220 |
|
protected JTextField defaultBrowser = new JTextField(); |
221 |
|
|
222 |
|
protected JCheckBox useProxy = new JCheckBox(); |
223 |
|
|
224 |
|
protected JCheckBox usagestats = new JCheckBox(); |
225 |
|
|
226 |
|
protected JCheckBox questionnaire = new JCheckBox(); |
227 |
|
|
228 |
|
protected JCheckBox versioncheck = new JCheckBox(); |
229 |
|
|
230 |
|
|
231 |
|
|
232 |
|
|
233 |
|
protected JComboBox<Object> epsRendering = new JComboBox<>(); |
234 |
|
|
235 |
|
protected JComboBox<Object> htmlRendering = new JComboBox<>(); |
236 |
|
|
237 |
|
protected JComboBox<Object> svgRendering = new JComboBox<>(); |
238 |
|
|
239 |
|
protected JLabel userIdWidthlabel = new JLabel(); |
240 |
|
|
241 |
|
protected JCheckBox autoIdWidth = new JCheckBox(); |
242 |
|
|
243 |
|
protected JTextField userIdWidth = new JTextField(); |
244 |
|
|
245 |
|
protected JCheckBox blcjv = new JCheckBox(); |
246 |
|
|
247 |
|
protected JCheckBox pileupjv = new JCheckBox(); |
248 |
|
|
249 |
|
protected JCheckBox clustaljv = new JCheckBox(); |
250 |
|
|
251 |
|
protected JCheckBox msfjv = new JCheckBox(); |
252 |
|
|
253 |
|
protected JCheckBox fastajv = new JCheckBox(); |
254 |
|
|
255 |
|
protected JCheckBox pfamjv = new JCheckBox(); |
256 |
|
|
257 |
|
protected JCheckBox pirjv = new JCheckBox(); |
258 |
|
|
259 |
|
protected JCheckBox modellerOutput = new JCheckBox(); |
260 |
|
|
261 |
|
protected JCheckBox embbedBioJSON = new JCheckBox(); |
262 |
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
|
protected JCheckBox autoCalculateConsCheck = new JCheckBox(); |
267 |
|
|
268 |
|
protected JCheckBox padGaps = new JCheckBox(); |
269 |
|
|
270 |
|
protected JCheckBox sortByTree = new JCheckBox(); |
271 |
|
|
272 |
|
|
273 |
|
|
274 |
|
|
275 |
|
|
276 |
|
protected JPanel wsTab = new JPanel(); |
277 |
|
|
278 |
|
|
279 |
|
|
280 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
281 |
0 |
public GPreferences()... |
282 |
|
{ |
283 |
0 |
try |
284 |
|
{ |
285 |
0 |
jbInit(); |
286 |
|
} catch (Exception ex) |
287 |
|
{ |
288 |
0 |
ex.printStackTrace(); |
289 |
|
} |
290 |
|
} |
291 |
|
|
292 |
|
|
293 |
|
|
294 |
|
|
295 |
|
@throws |
296 |
|
|
|
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 2 |
Complexity Density: 0.12 |
|
297 |
0 |
private void jbInit() throws Exception... |
298 |
|
{ |
299 |
0 |
final JTabbedPane tabbedPane = jalview.jbgui.GDesktop.createTabbedPane(); |
300 |
0 |
this.setLayout(new BorderLayout()); |
301 |
0 |
JPanel okCancelPanel = initOkCancelPanel(); |
302 |
0 |
this.add(tabbedPane, BorderLayout.CENTER); |
303 |
0 |
this.add(okCancelPanel, BorderLayout.SOUTH); |
304 |
|
|
305 |
0 |
tabbedPane.add(initVisualTab(), |
306 |
|
MessageManager.getString("label.visual")); |
307 |
|
|
308 |
0 |
tabbedPane.add(initColoursTab(), |
309 |
|
MessageManager.getString("label.colours")); |
310 |
|
|
311 |
0 |
tabbedPane.add(initOverviewTab(), |
312 |
|
MessageManager.getString("label.overview")); |
313 |
|
|
314 |
0 |
tabbedPane.add(initStructureTab(), |
315 |
|
MessageManager.getString("label.structure")); |
316 |
|
|
317 |
0 |
tabbedPane.add(initConnectionsTab(), |
318 |
|
MessageManager.getString("label.connections")); |
319 |
|
|
320 |
0 |
tabbedPane.add(initLinksTab(), |
321 |
|
MessageManager.getString("label.urllinks")); |
322 |
|
|
323 |
0 |
tabbedPane.add(initOutputTab(), |
324 |
|
MessageManager.getString("label.output")); |
325 |
|
|
326 |
0 |
tabbedPane.add(initEditingTab(), |
327 |
|
MessageManager.getString("label.editing")); |
328 |
|
|
329 |
|
|
330 |
|
|
331 |
|
|
332 |
0 |
if (!Jalview.isJS()) |
333 |
|
{ |
334 |
0 |
wsTab.setLayout(new BorderLayout()); |
335 |
0 |
tabbedPane.add(wsTab, MessageManager.getString("label.web_services")); |
336 |
|
} |
337 |
|
|
338 |
|
|
339 |
|
|
340 |
|
|
341 |
|
|
342 |
0 |
tabbedPane.addChangeListener(new ChangeListener() |
343 |
|
{ |
344 |
|
private Component lastTab; |
345 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 4 |
Complexity Density: 0.8 |
|
346 |
0 |
@Override... |
347 |
|
public void stateChanged(ChangeEvent e) |
348 |
|
{ |
349 |
0 |
if (lastTab == structureTab |
350 |
|
&& tabbedPane.getSelectedComponent() != structureTab) |
351 |
|
{ |
352 |
0 |
if (!validateStructure()) |
353 |
|
{ |
354 |
0 |
tabbedPane.setSelectedComponent(structureTab); |
355 |
0 |
return; |
356 |
|
} |
357 |
|
} |
358 |
0 |
lastTab = tabbedPane.getSelectedComponent(); |
359 |
|
} |
360 |
|
|
361 |
|
}); |
362 |
|
} |
363 |
|
|
364 |
|
|
365 |
|
|
366 |
|
|
367 |
|
@return |
368 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 1 |
Complexity Density: 0.06 |
|
369 |
0 |
private JPanel initEditingTab()... |
370 |
|
{ |
371 |
0 |
JPanel editingTab = new JPanel(); |
372 |
0 |
editingTab.setLayout(null); |
373 |
0 |
autoCalculateConsCheck.setFont(LABEL_FONT); |
374 |
0 |
autoCalculateConsCheck.setText( |
375 |
|
MessageManager.getString("label.autocalculate_consensus")); |
376 |
0 |
autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23)); |
377 |
0 |
padGaps.setFont(LABEL_FONT); |
378 |
0 |
padGaps.setText( |
379 |
|
MessageManager.getString("label.pad_gaps_when_editing")); |
380 |
0 |
padGaps.setBounds(new Rectangle(22, 94, 168, 23)); |
381 |
0 |
sortByTree.setFont(LABEL_FONT); |
382 |
0 |
sortByTree |
383 |
|
.setText(MessageManager.getString("label.sort_with_new_tree")); |
384 |
0 |
sortByTree.setToolTipText(MessageManager.getString( |
385 |
|
"label.any_trees_calculated_or_loaded_alignment_automatically_sort")); |
386 |
0 |
sortByTree.setBounds(new Rectangle(22, 136, 168, 23)); |
387 |
0 |
editingTab.add(autoCalculateConsCheck); |
388 |
0 |
editingTab.add(padGaps); |
389 |
0 |
editingTab.add(sortByTree); |
390 |
0 |
return editingTab; |
391 |
|
} |
392 |
|
|
393 |
|
|
394 |
|
|
395 |
|
|
396 |
|
@return |
397 |
|
|
|
|
| 0% |
Uncovered Elements: 98 (98) |
Complexity: 2 |
Complexity Density: 0.02 |
|
398 |
0 |
private JPanel initOutputTab()... |
399 |
|
{ |
400 |
0 |
JPanel outputTab = new JPanel(); |
401 |
0 |
outputTab.setLayout(null); |
402 |
|
|
403 |
0 |
JLabel epsLabel = new JLabel( |
404 |
|
MessageManager.formatMessage("label.rendering_style", "EPS")); |
405 |
0 |
epsLabel.setFont(LABEL_FONT); |
406 |
0 |
epsLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
407 |
0 |
epsLabel.setBounds(new Rectangle(9, 31, 160, 24)); |
408 |
0 |
epsRendering.setFont(LABEL_FONT); |
409 |
0 |
epsRendering.setBounds(new Rectangle(174, 34, 187, 21)); |
410 |
0 |
JLabel htmlLabel = new JLabel( |
411 |
|
MessageManager.formatMessage("label.rendering_style", "HTML")); |
412 |
0 |
htmlLabel.setFont(LABEL_FONT); |
413 |
0 |
htmlLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
414 |
0 |
htmlLabel.setBounds(new Rectangle(9, 55, 160, 24)); |
415 |
0 |
htmlRendering.setFont(LABEL_FONT); |
416 |
0 |
htmlRendering.setBounds(new Rectangle(174, 58, 187, 21)); |
417 |
0 |
JLabel svgLabel = new JLabel( |
418 |
|
MessageManager.formatMessage("label.rendering_style", "SVG")); |
419 |
0 |
svgLabel.setFont(LABEL_FONT); |
420 |
0 |
svgLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
421 |
0 |
svgLabel.setBounds(new Rectangle(9, 79, 160, 24)); |
422 |
0 |
svgRendering.setFont(LABEL_FONT); |
423 |
0 |
svgRendering.setBounds(new Rectangle(174, 82, 187, 21)); |
424 |
|
|
425 |
0 |
JLabel jLabel1 = new JLabel(); |
426 |
0 |
jLabel1.setFont(LABEL_FONT); |
427 |
0 |
jLabel1.setHorizontalAlignment(SwingConstants.CENTER); |
428 |
0 |
jLabel1.setText(MessageManager.getString("label.append_start_end")); |
429 |
0 |
jLabel1.setFont(LABEL_FONT); |
430 |
|
|
431 |
0 |
fastajv.setFont(LABEL_FONT); |
432 |
0 |
fastajv.setHorizontalAlignment(SwingConstants.LEFT); |
433 |
0 |
clustaljv.setText(MessageManager.getString("label.clustal") + " "); |
434 |
0 |
blcjv.setText(MessageManager.getString("label.blc") + " "); |
435 |
0 |
fastajv.setText(MessageManager.getString("label.fasta") + " "); |
436 |
0 |
msfjv.setText(MessageManager.getString("label.msf") + " "); |
437 |
0 |
pfamjv.setText(MessageManager.getString("label.pfam") + " "); |
438 |
0 |
pileupjv.setText(MessageManager.getString("label.pileup") + " "); |
439 |
0 |
msfjv.setFont(LABEL_FONT); |
440 |
0 |
msfjv.setHorizontalAlignment(SwingConstants.LEFT); |
441 |
0 |
pirjv.setText(MessageManager.getString("label.pir") + " "); |
442 |
0 |
JPanel jPanel11 = new JPanel(); |
443 |
0 |
jPanel11.setFont(LABEL_FONT); |
444 |
0 |
TitledBorder titledBorder2 = new TitledBorder( |
445 |
|
MessageManager.getString("label.file_output")); |
446 |
0 |
jPanel11.setBorder(titledBorder2); |
447 |
0 |
jPanel11.setBounds(new Rectangle(30, 120, 196, 182)); |
448 |
0 |
GridLayout gridLayout3 = new GridLayout(); |
449 |
0 |
jPanel11.setLayout(gridLayout3); |
450 |
0 |
gridLayout3.setRows(8); |
451 |
0 |
blcjv.setFont(LABEL_FONT); |
452 |
0 |
blcjv.setHorizontalAlignment(SwingConstants.LEFT); |
453 |
0 |
clustaljv.setFont(LABEL_FONT); |
454 |
0 |
clustaljv.setHorizontalAlignment(SwingConstants.LEFT); |
455 |
0 |
pfamjv.setFont(LABEL_FONT); |
456 |
0 |
pfamjv.setHorizontalAlignment(SwingConstants.LEFT); |
457 |
0 |
pileupjv.setFont(LABEL_FONT); |
458 |
0 |
pileupjv.setHorizontalAlignment(SwingConstants.LEFT); |
459 |
0 |
pirjv.setFont(LABEL_FONT); |
460 |
0 |
pirjv.setHorizontalAlignment(SwingConstants.LEFT); |
461 |
0 |
autoIdWidth.setFont(LABEL_FONT); |
462 |
0 |
autoIdWidth.setText( |
463 |
|
MessageManager.getString("label.automatically_set_id_width")); |
464 |
0 |
autoIdWidth.setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager |
465 |
|
.getString("label.adjusts_width_generated_eps_png"))); |
466 |
0 |
autoIdWidth.setBounds(new Rectangle(228, 144, 320, 23)); |
467 |
0 |
autoIdWidth.addActionListener(new ActionListener() |
468 |
|
{ |
469 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
470 |
0 |
@Override... |
471 |
|
public void actionPerformed(ActionEvent e) |
472 |
|
{ |
473 |
0 |
autoIdWidth_actionPerformed(); |
474 |
|
} |
475 |
|
}); |
476 |
0 |
userIdWidthlabel.setFont(LABEL_FONT); |
477 |
0 |
userIdWidthlabel.setText( |
478 |
|
MessageManager.getString("label.figure_id_column_width")); |
479 |
0 |
userIdWidth.setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager |
480 |
|
.getString("label.manually_specify_width_left_column"))); |
481 |
0 |
userIdWidthlabel.setToolTipText( |
482 |
|
JvSwingUtils.wrapTooltip(true, MessageManager.getString( |
483 |
|
"label.manually_specify_width_left_column"))); |
484 |
0 |
userIdWidthlabel.setBounds(new Rectangle(236, 168, 320, 23)); |
485 |
0 |
userIdWidth.setFont(JvSwingUtils.getTextAreaFont()); |
486 |
0 |
userIdWidth.setText(""); |
487 |
0 |
userIdWidth.setBounds(new Rectangle(232, 192, 84, 23)); |
488 |
0 |
userIdWidth.addActionListener(new ActionListener() |
489 |
|
{ |
490 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
491 |
0 |
@Override... |
492 |
|
public void actionPerformed(ActionEvent e) |
493 |
|
{ |
494 |
0 |
userIdWidth_actionPerformed(); |
495 |
|
} |
496 |
|
}); |
497 |
0 |
modellerOutput.setFont(LABEL_FONT); |
498 |
0 |
modellerOutput |
499 |
|
.setText(MessageManager.getString("label.use_modeller_output")); |
500 |
0 |
modellerOutput.setBounds(new Rectangle(228, 274, 320, 23)); |
501 |
0 |
embbedBioJSON.setFont(LABEL_FONT); |
502 |
0 |
embbedBioJSON.setText(MessageManager.getString("label.embbed_biojson")); |
503 |
0 |
embbedBioJSON.setBounds(new Rectangle(228, 248, 250, 23)); |
504 |
|
|
505 |
0 |
jPanel11.add(jLabel1); |
506 |
0 |
jPanel11.add(blcjv); |
507 |
0 |
jPanel11.add(clustaljv); |
508 |
0 |
jPanel11.add(fastajv); |
509 |
0 |
jPanel11.add(msfjv); |
510 |
0 |
jPanel11.add(pfamjv); |
511 |
0 |
jPanel11.add(pileupjv); |
512 |
0 |
jPanel11.add(pirjv); |
513 |
0 |
outputTab.add(autoIdWidth); |
514 |
0 |
outputTab.add(userIdWidth); |
515 |
0 |
outputTab.add(userIdWidthlabel); |
516 |
0 |
outputTab.add(modellerOutput); |
517 |
0 |
if (!Jalview.isJS()) |
518 |
|
{ |
519 |
|
|
520 |
|
|
521 |
|
|
522 |
0 |
outputTab.add(embbedBioJSON); |
523 |
0 |
outputTab.add(epsLabel); |
524 |
0 |
outputTab.add(epsRendering); |
525 |
0 |
outputTab.add(htmlLabel); |
526 |
0 |
outputTab.add(htmlRendering); |
527 |
0 |
outputTab.add(svgLabel); |
528 |
0 |
outputTab.add(svgRendering); |
529 |
|
} |
530 |
0 |
outputTab.add(jPanel11); |
531 |
0 |
return outputTab; |
532 |
|
} |
533 |
|
|
534 |
|
|
535 |
|
|
536 |
|
|
537 |
|
@return |
538 |
|
|
|
|
| 0% |
Uncovered Elements: 24 (24) |
Complexity: 1 |
Complexity Density: 0.04 |
|
539 |
0 |
private JPanel initConnectionsTab()... |
540 |
|
{ |
541 |
0 |
JPanel connectTab = new JPanel(); |
542 |
0 |
connectTab.setLayout(new GridBagLayout()); |
543 |
|
|
544 |
|
|
545 |
0 |
JLabel browserLabel = new JLabel(); |
546 |
0 |
browserLabel.setFont(LABEL_FONT); |
547 |
0 |
browserLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
548 |
0 |
browserLabel.setText( |
549 |
|
MessageManager.getString("label.default_browser_unix")); |
550 |
0 |
defaultBrowser.setFont(LABEL_FONT); |
551 |
0 |
defaultBrowser.setText(""); |
552 |
0 |
final String tooltip = JvSwingUtils.wrapTooltip(true, |
553 |
|
MessageManager.getString("label.double_click_to_browse")); |
554 |
0 |
defaultBrowser.setToolTipText(tooltip); |
555 |
0 |
defaultBrowser.addMouseListener(new MouseAdapter() |
556 |
|
{ |
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
557 |
0 |
@Override... |
558 |
|
public void mouseClicked(MouseEvent e) |
559 |
|
{ |
560 |
0 |
if (e.getClickCount() > 1) |
561 |
|
{ |
562 |
0 |
defaultBrowser_mouseClicked(e); |
563 |
|
} |
564 |
|
} |
565 |
|
}); |
566 |
|
|
567 |
0 |
JPanel proxyPanel = initConnTabProxyPanel(); |
568 |
0 |
initConnTabCheckboxes(); |
569 |
|
|
570 |
|
|
571 |
0 |
connectTab.add(browserLabel, |
572 |
|
new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, |
573 |
|
GridBagConstraints.WEST, GridBagConstraints.NONE, |
574 |
|
new Insets(10, 0, 5, 5), 5, 1)); |
575 |
0 |
defaultBrowser.setFont(LABEL_FONT); |
576 |
0 |
defaultBrowser.setText(""); |
577 |
|
|
578 |
0 |
connectTab.add(defaultBrowser, new GridBagConstraints(1, 0, 1, 1, 1.0, |
579 |
|
0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, |
580 |
|
new Insets(10, 0, 5, 10), 30, 1)); |
581 |
|
|
582 |
|
|
583 |
0 |
connectTab.add(proxyPanel, new GridBagConstraints(0, 1, 2, 1, 1.0, 0.0, |
584 |
|
GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, |
585 |
|
new Insets(10, 0, 5, 12), 4, 10)); |
586 |
|
|
587 |
|
|
588 |
0 |
connectTab.add(usagestats, |
589 |
|
new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, |
590 |
|
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, |
591 |
|
new Insets(0, 2, 5, 5), 70, 1)); |
592 |
0 |
connectTab.add(questionnaire, |
593 |
|
new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, |
594 |
|
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, |
595 |
|
new Insets(0, 2, 5, 10), 70, 1)); |
596 |
0 |
connectTab.add(versioncheck, |
597 |
|
new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0, |
598 |
|
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, |
599 |
|
new Insets(0, 2, 5, 5), 70, 1)); |
600 |
|
|
601 |
|
|
602 |
0 |
JPanel spacePanel = new JPanel(); |
603 |
0 |
connectTab.add(spacePanel, |
604 |
|
new GridBagConstraints(0, 4, 1, 1, 1.0, 1.0, |
605 |
|
GridBagConstraints.WEST, GridBagConstraints.BOTH, |
606 |
|
new Insets(0, 0, 0, 5), 70, 1)); |
607 |
|
|
608 |
0 |
return connectTab; |
609 |
|
} |
610 |
|
|
611 |
|
|
612 |
|
|
613 |
|
|
614 |
|
@return |
615 |
|
|
|
|
| 0% |
Uncovered Elements: 37 (37) |
Complexity: 1 |
Complexity Density: 0.03 |
|
616 |
0 |
private JPanel initLinksTab()... |
617 |
|
{ |
618 |
0 |
JPanel linkTab = new JPanel(); |
619 |
0 |
linkTab.setLayout(new GridBagLayout()); |
620 |
|
|
621 |
|
|
622 |
0 |
linkUrlTable.setFillsViewportHeight(true); |
623 |
0 |
linkUrlTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); |
624 |
0 |
linkUrlTable.setAutoCreateRowSorter(true); |
625 |
0 |
linkUrlTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
626 |
|
|
627 |
|
|
628 |
|
|
629 |
|
|
630 |
0 |
JRadioButton temp = new JRadioButton(); |
631 |
0 |
linkUrlTable.setRowHeight(temp.getMinimumSize().height); |
632 |
|
|
633 |
|
|
634 |
0 |
JScrollPane linkScrollPane = new JScrollPane(linkUrlTable); |
635 |
0 |
linkScrollPane.setBorder(null); |
636 |
|
|
637 |
|
|
638 |
0 |
JPanel linkPanel = new JPanel(new GridBagLayout()); |
639 |
0 |
linkPanel.setBorder(new TitledBorder( |
640 |
|
MessageManager.getString("label.url_linkfrom_sequence_id"))); |
641 |
|
|
642 |
|
|
643 |
|
|
644 |
|
|
645 |
0 |
JPanel buttonPanel = initLinkTabUrlButtons(); |
646 |
0 |
GridBagConstraints linkConstraints1 = new GridBagConstraints(); |
647 |
0 |
linkConstraints1.insets = new Insets(0, 0, 5, 0); |
648 |
0 |
linkConstraints1.gridx = 0; |
649 |
0 |
linkConstraints1.gridy = 0; |
650 |
0 |
linkConstraints1.weightx = 1.0; |
651 |
0 |
linkConstraints1.fill = GridBagConstraints.HORIZONTAL; |
652 |
0 |
linkTab.add(buttonPanel, linkConstraints1); |
653 |
|
|
654 |
|
|
655 |
0 |
GridBagConstraints linkConstraints2 = new GridBagConstraints(); |
656 |
0 |
linkConstraints2.insets = new Insets(0, 0, 5, 5); |
657 |
0 |
linkConstraints2.gridx = 0; |
658 |
0 |
linkConstraints2.gridy = 1; |
659 |
0 |
linkConstraints2.weightx = 1.0; |
660 |
0 |
linkConstraints2.weighty = 1.0; |
661 |
0 |
linkConstraints2.fill = GridBagConstraints.BOTH; |
662 |
0 |
linkTab.add(linkScrollPane, linkConstraints2); |
663 |
|
|
664 |
|
|
665 |
0 |
JPanel filterPanel = initLinkTabFilterPanel(); |
666 |
0 |
GridBagConstraints linkConstraints3 = new GridBagConstraints(); |
667 |
0 |
linkConstraints3.insets = new Insets(0, 0, 0, 5); |
668 |
0 |
linkConstraints3.gridx = 0; |
669 |
0 |
linkConstraints3.gridy = 2; |
670 |
0 |
linkConstraints3.weightx = 1.0; |
671 |
0 |
linkConstraints3.fill = GridBagConstraints.HORIZONTAL; |
672 |
0 |
linkTab.add(filterPanel, linkConstraints3); |
673 |
|
|
674 |
0 |
return linkTab; |
675 |
|
} |
676 |
|
|
|
|
| 0% |
Uncovered Elements: 34 (34) |
Complexity: 1 |
Complexity Density: 0.03 |
|
677 |
0 |
private JPanel initLinkTabFilterPanel()... |
678 |
|
{ |
679 |
|
|
680 |
0 |
JLabel filterLabel = new JLabel( |
681 |
|
MessageManager.getString("label.filter")); |
682 |
0 |
filterLabel.setFont(LABEL_FONT); |
683 |
0 |
filterLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
684 |
0 |
filterLabel.setHorizontalTextPosition(SwingConstants.LEADING); |
685 |
|
|
686 |
0 |
filterTB.setFont(LABEL_FONT); |
687 |
0 |
filterTB.setText(""); |
688 |
|
|
689 |
0 |
doReset.setText(MessageManager.getString("action.showall")); |
690 |
0 |
userOnly.setText(MessageManager.getString("action.customfilter")); |
691 |
|
|
692 |
|
|
693 |
0 |
JPanel filterPanel = new JPanel(new GridBagLayout()); |
694 |
0 |
filterPanel.setBorder(new TitledBorder("Filter")); |
695 |
0 |
GridBagConstraints gbc = new GridBagConstraints(); |
696 |
0 |
gbc.gridx = 0; |
697 |
0 |
gbc.gridy = 0; |
698 |
0 |
gbc.fill = GridBagConstraints.NONE; |
699 |
0 |
gbc.anchor = GridBagConstraints.WEST; |
700 |
|
|
701 |
0 |
filterPanel.add(filterLabel, gbc); |
702 |
|
|
703 |
0 |
GridBagConstraints gbc1 = new GridBagConstraints(); |
704 |
0 |
gbc1.gridx = 1; |
705 |
0 |
gbc1.gridwidth = 2; |
706 |
0 |
gbc1.fill = GridBagConstraints.HORIZONTAL; |
707 |
0 |
gbc1.anchor = GridBagConstraints.WEST; |
708 |
0 |
gbc1.weightx = 1.0; |
709 |
0 |
filterPanel.add(filterTB, gbc1); |
710 |
|
|
711 |
0 |
GridBagConstraints gbc2 = new GridBagConstraints(); |
712 |
0 |
gbc2.gridx = 3; |
713 |
0 |
gbc2.fill = GridBagConstraints.NONE; |
714 |
0 |
gbc2.anchor = GridBagConstraints.WEST; |
715 |
0 |
filterPanel.add(doReset, gbc2); |
716 |
|
|
717 |
0 |
GridBagConstraints gbc3 = new GridBagConstraints(); |
718 |
0 |
gbc3.gridx = 4; |
719 |
0 |
gbc3.fill = GridBagConstraints.NONE; |
720 |
0 |
gbc3.anchor = GridBagConstraints.WEST; |
721 |
0 |
filterPanel.add(userOnly, gbc3); |
722 |
|
|
723 |
0 |
return filterPanel; |
724 |
|
} |
725 |
|
|
|
|
| 0% |
Uncovered Elements: 37 (37) |
Complexity: 1 |
Complexity Density: 0.03 |
|
726 |
0 |
private JPanel initLinkTabUrlButtons()... |
727 |
|
{ |
728 |
|
|
729 |
0 |
JButton newLink = new JButton(); |
730 |
0 |
newLink.setText(MessageManager.getString("action.new")); |
731 |
|
|
732 |
0 |
editLink.setText(MessageManager.getString("action.edit")); |
733 |
|
|
734 |
0 |
deleteLink.setText(MessageManager.getString("action.delete")); |
735 |
|
|
736 |
|
|
737 |
0 |
editLink.setEnabled(false); |
738 |
0 |
deleteLink.setEnabled(false); |
739 |
|
|
740 |
0 |
newLink.addActionListener(new java.awt.event.ActionListener() |
741 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
742 |
0 |
@Override... |
743 |
|
public void actionPerformed(ActionEvent e) |
744 |
|
{ |
745 |
0 |
newLink_actionPerformed(e); |
746 |
|
} |
747 |
|
}); |
748 |
|
|
749 |
0 |
editLink.setText(MessageManager.getString("action.edit")); |
750 |
0 |
editLink.addActionListener(new java.awt.event.ActionListener() |
751 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
752 |
0 |
@Override... |
753 |
|
public void actionPerformed(ActionEvent e) |
754 |
|
{ |
755 |
0 |
editLink_actionPerformed(e); |
756 |
|
} |
757 |
|
}); |
758 |
|
|
759 |
0 |
deleteLink.setText(MessageManager.getString("action.delete")); |
760 |
0 |
deleteLink.addActionListener(new java.awt.event.ActionListener() |
761 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
762 |
0 |
@Override... |
763 |
|
public void actionPerformed(ActionEvent e) |
764 |
|
{ |
765 |
0 |
deleteLink_actionPerformed(e); |
766 |
|
} |
767 |
|
}); |
768 |
|
|
769 |
0 |
JPanel buttonPanel = new JPanel(new GridBagLayout()); |
770 |
0 |
buttonPanel.setBorder(new TitledBorder("Edit links")); |
771 |
0 |
GridBagConstraints gbc = new GridBagConstraints(); |
772 |
0 |
gbc.gridx = 0; |
773 |
0 |
gbc.gridy = 0; |
774 |
0 |
gbc.fill = GridBagConstraints.NONE; |
775 |
0 |
buttonPanel.add(newLink, gbc); |
776 |
|
|
777 |
0 |
GridBagConstraints gbc1 = new GridBagConstraints(); |
778 |
0 |
gbc1.gridx = 1; |
779 |
0 |
gbc1.gridy = 0; |
780 |
0 |
gbc1.fill = GridBagConstraints.NONE; |
781 |
0 |
buttonPanel.add(editLink, gbc1); |
782 |
|
|
783 |
0 |
GridBagConstraints gbc2 = new GridBagConstraints(); |
784 |
0 |
gbc2.gridx = 2; |
785 |
0 |
gbc2.gridy = 0; |
786 |
0 |
gbc2.fill = GridBagConstraints.NONE; |
787 |
0 |
buttonPanel.add(deleteLink, gbc2); |
788 |
|
|
789 |
0 |
GridBagConstraints gbc3 = new GridBagConstraints(); |
790 |
0 |
gbc3.gridx = 3; |
791 |
0 |
gbc3.gridy = 0; |
792 |
0 |
gbc3.fill = GridBagConstraints.HORIZONTAL; |
793 |
0 |
gbc3.weightx = 1.0; |
794 |
0 |
JPanel spacePanel = new JPanel(); |
795 |
0 |
spacePanel.setBorder(null); |
796 |
0 |
buttonPanel.add(spacePanel, gbc3); |
797 |
|
|
798 |
0 |
return buttonPanel; |
799 |
|
} |
800 |
|
|
801 |
|
|
802 |
|
|
803 |
|
|
804 |
|
@return |
805 |
|
|
|
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 1 |
Complexity Density: 0.04 |
|
806 |
0 |
private JPanel initConnTabProxyPanel()... |
807 |
|
{ |
808 |
|
|
809 |
0 |
serverLabel.setText(MessageManager.getString("label.address")); |
810 |
0 |
serverLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
811 |
0 |
serverLabel.setFont(LABEL_FONT); |
812 |
|
|
813 |
|
|
814 |
0 |
proxyServerTB.setFont(LABEL_FONT); |
815 |
0 |
proxyPortTB.setFont(LABEL_FONT); |
816 |
|
|
817 |
|
|
818 |
0 |
portLabel.setFont(LABEL_FONT); |
819 |
0 |
portLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
820 |
0 |
portLabel.setText(MessageManager.getString("label.port")); |
821 |
|
|
822 |
|
|
823 |
0 |
useProxy.setFont(LABEL_FONT); |
824 |
0 |
useProxy.setHorizontalAlignment(SwingConstants.RIGHT); |
825 |
0 |
useProxy.setHorizontalTextPosition(SwingConstants.LEADING); |
826 |
0 |
useProxy.setText(MessageManager.getString("label.use_proxy_server")); |
827 |
0 |
useProxy.addActionListener(new ActionListener() |
828 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
829 |
0 |
@Override... |
830 |
|
public void actionPerformed(ActionEvent e) |
831 |
|
{ |
832 |
0 |
useProxy_actionPerformed(); |
833 |
|
} |
834 |
|
}); |
835 |
|
|
836 |
|
|
837 |
0 |
JPanel proxyPanel = new JPanel(); |
838 |
0 |
TitledBorder titledBorder1 = new TitledBorder( |
839 |
|
MessageManager.getString("label.proxy_server")); |
840 |
0 |
proxyPanel.setBorder(titledBorder1); |
841 |
0 |
proxyPanel.setLayout(new GridBagLayout()); |
842 |
0 |
proxyPanel.add(serverLabel, |
843 |
|
new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, |
844 |
|
GridBagConstraints.WEST, GridBagConstraints.NONE, |
845 |
|
new Insets(0, 2, 2, 0), 5, 0)); |
846 |
0 |
proxyPanel.add(portLabel, |
847 |
|
new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, |
848 |
|
GridBagConstraints.WEST, GridBagConstraints.NONE, |
849 |
|
new Insets(0, 0, 2, 0), 11, 0)); |
850 |
0 |
proxyPanel.add(useProxy, |
851 |
|
new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0, |
852 |
|
GridBagConstraints.WEST, GridBagConstraints.NONE, |
853 |
|
new Insets(0, 2, 5, 185), 2, -4)); |
854 |
0 |
proxyPanel.add(proxyPortTB, |
855 |
|
new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0, |
856 |
|
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, |
857 |
|
new Insets(0, 2, 2, 2), 54, 1)); |
858 |
0 |
proxyPanel.add(proxyServerTB, |
859 |
|
new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, |
860 |
|
GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, |
861 |
|
new Insets(0, 2, 2, 0), 263, 1)); |
862 |
|
|
863 |
0 |
return proxyPanel; |
864 |
|
} |
865 |
|
|
866 |
|
|
867 |
|
|
868 |
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
|
869 |
0 |
private void initConnTabCheckboxes()... |
870 |
|
{ |
871 |
|
|
872 |
0 |
usagestats.setText( |
873 |
|
MessageManager.getString("label.send_usage_statistics")); |
874 |
0 |
usagestats.setFont(LABEL_FONT); |
875 |
0 |
usagestats.setHorizontalAlignment(SwingConstants.RIGHT); |
876 |
0 |
usagestats.setHorizontalTextPosition(SwingConstants.LEADING); |
877 |
|
|
878 |
|
|
879 |
0 |
questionnaire.setText( |
880 |
|
MessageManager.getString("label.check_for_questionnaires")); |
881 |
0 |
questionnaire.setFont(LABEL_FONT); |
882 |
0 |
questionnaire.setHorizontalAlignment(SwingConstants.RIGHT); |
883 |
0 |
questionnaire.setHorizontalTextPosition(SwingConstants.LEADING); |
884 |
|
|
885 |
|
|
886 |
0 |
versioncheck.setText( |
887 |
|
MessageManager.getString("label.check_for_latest_version")); |
888 |
0 |
versioncheck.setFont(LABEL_FONT); |
889 |
0 |
versioncheck.setHorizontalAlignment(SwingConstants.RIGHT); |
890 |
0 |
versioncheck.setHorizontalTextPosition(SwingConstants.LEADING); |
891 |
|
} |
892 |
|
|
893 |
|
|
894 |
|
|
895 |
|
|
896 |
|
@return |
897 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 1 |
Complexity Density: 0.1 |
|
898 |
0 |
private JPanel initOkCancelPanel()... |
899 |
|
{ |
900 |
0 |
JButton ok = new JButton(); |
901 |
0 |
ok.setText(MessageManager.getString("action.ok")); |
902 |
0 |
ok.addActionListener(new ActionListener() |
903 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
904 |
0 |
@Override... |
905 |
|
public void actionPerformed(ActionEvent e) |
906 |
|
{ |
907 |
0 |
ok_actionPerformed(e); |
908 |
|
} |
909 |
|
}); |
910 |
0 |
JButton cancel = new JButton(); |
911 |
0 |
cancel.setText(MessageManager.getString("action.cancel")); |
912 |
0 |
cancel.addActionListener(new ActionListener() |
913 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
914 |
0 |
@Override... |
915 |
|
public void actionPerformed(ActionEvent e) |
916 |
|
{ |
917 |
0 |
cancel_actionPerformed(e); |
918 |
|
} |
919 |
|
}); |
920 |
0 |
JPanel okCancelPanel = new JPanel(); |
921 |
0 |
okCancelPanel.add(ok); |
922 |
0 |
okCancelPanel.add(cancel); |
923 |
0 |
return okCancelPanel; |
924 |
|
} |
925 |
|
|
926 |
|
|
927 |
|
|
928 |
|
|
929 |
|
@return |
930 |
|
|
|
|
| 0% |
Uncovered Elements: 40 (40) |
Complexity: 1 |
Complexity Density: 0.03 |
|
931 |
0 |
private JPanel initColoursTab()... |
932 |
|
{ |
933 |
0 |
JPanel coloursTab = new JPanel(); |
934 |
0 |
coloursTab.setBorder(new TitledBorder( |
935 |
|
MessageManager.getString("action.open_new_alignment"))); |
936 |
0 |
coloursTab.setLayout(new FlowLayout()); |
937 |
0 |
JLabel mincolourLabel = new JLabel(); |
938 |
0 |
mincolourLabel.setFont(LABEL_FONT); |
939 |
0 |
mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
940 |
0 |
mincolourLabel.setText(MessageManager.getString("label.min_colour")); |
941 |
0 |
minColour.setFont(LABEL_FONT); |
942 |
0 |
minColour.setBorder(BorderFactory.createEtchedBorder()); |
943 |
0 |
minColour.setPreferredSize(new Dimension(40, 20)); |
944 |
0 |
minColour.addMouseListener(new MouseAdapter() |
945 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
946 |
0 |
@Override... |
947 |
|
public void mousePressed(MouseEvent e) |
948 |
|
{ |
949 |
0 |
minColour_actionPerformed(minColour); |
950 |
|
} |
951 |
|
}); |
952 |
0 |
JLabel maxcolourLabel = new JLabel(); |
953 |
0 |
maxcolourLabel.setFont(LABEL_FONT); |
954 |
0 |
maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
955 |
0 |
maxcolourLabel.setText(MessageManager.getString("label.max_colour")); |
956 |
0 |
maxColour.setFont(LABEL_FONT); |
957 |
0 |
maxColour.setBorder(BorderFactory.createEtchedBorder()); |
958 |
0 |
maxColour.setPreferredSize(new Dimension(40, 20)); |
959 |
0 |
maxColour.addMouseListener(new MouseAdapter() |
960 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
961 |
0 |
@Override... |
962 |
|
public void mousePressed(MouseEvent e) |
963 |
|
{ |
964 |
0 |
maxColour_actionPerformed(maxColour); |
965 |
|
} |
966 |
|
}); |
967 |
|
|
968 |
0 |
protColour.setFont(LABEL_FONT); |
969 |
0 |
protColour.setBounds(new Rectangle(172, 225, 155, 21)); |
970 |
0 |
JLabel protColourLabel = new JLabel(); |
971 |
0 |
protColourLabel.setFont(LABEL_FONT); |
972 |
0 |
protColourLabel.setHorizontalAlignment(SwingConstants.LEFT); |
973 |
0 |
protColourLabel.setText( |
974 |
|
MessageManager.getString("label.prot_alignment_colour") + " "); |
975 |
0 |
JvSwingUtils.addtoLayout(coloursTab, |
976 |
|
MessageManager |
977 |
|
.getString("label.default_colour_scheme_for_alignment"), |
978 |
|
protColourLabel, protColour); |
979 |
|
|
980 |
0 |
nucColour.setFont(LABEL_FONT); |
981 |
0 |
nucColour.setBounds(new Rectangle(172, 240, 155, 21)); |
982 |
0 |
JLabel nucColourLabel = new JLabel(); |
983 |
0 |
nucColourLabel.setFont(LABEL_FONT); |
984 |
0 |
nucColourLabel.setHorizontalAlignment(SwingConstants.LEFT); |
985 |
0 |
nucColourLabel.setText( |
986 |
|
MessageManager.getString("label.nuc_alignment_colour") + " "); |
987 |
0 |
JvSwingUtils.addtoLayout(coloursTab, |
988 |
|
MessageManager |
989 |
|
.getString("label.default_colour_scheme_for_alignment"), |
990 |
|
nucColourLabel, nucColour); |
991 |
|
|
992 |
0 |
JPanel annotationShding = new JPanel(); |
993 |
0 |
annotationShding.setBorder(new TitledBorder( |
994 |
|
MessageManager.getString("label.annotation_shading_default"))); |
995 |
0 |
annotationShding.setLayout(new GridLayout(1, 2)); |
996 |
0 |
JvSwingUtils.addtoLayout(annotationShding, |
997 |
|
MessageManager.getString( |
998 |
|
"label.default_minimum_colour_annotation_shading"), |
999 |
|
mincolourLabel, minColour); |
1000 |
0 |
JvSwingUtils.addtoLayout(annotationShding, |
1001 |
|
MessageManager.getString( |
1002 |
|
"label.default_maximum_colour_annotation_shading"), |
1003 |
|
maxcolourLabel, maxColour); |
1004 |
0 |
coloursTab.add(annotationShding); |
1005 |
0 |
return coloursTab; |
1006 |
|
} |
1007 |
|
|
1008 |
|
|
1009 |
|
|
1010 |
|
|
1011 |
|
@return |
1012 |
|
|
|
|
| 0% |
Uncovered Elements: 78 (78) |
Complexity: 1 |
Complexity Density: 0.01 |
|
1013 |
0 |
private JPanel initOverviewTab()... |
1014 |
|
{ |
1015 |
0 |
JPanel overviewPanel = new JPanel(); |
1016 |
0 |
overviewPanel.setBorder(new TitledBorder( |
1017 |
|
MessageManager.getString("label.overview_settings"))); |
1018 |
|
|
1019 |
0 |
gapColour.setFont(LABEL_FONT); |
1020 |
|
|
1021 |
0 |
gapColour.setBorder( |
1022 |
|
BorderFactory.createEtchedBorder(Color.white, Color.lightGray)); |
1023 |
0 |
gapColour.setPreferredSize(new Dimension(40, 20)); |
1024 |
0 |
gapColour.addMouseListener(new MouseAdapter() |
1025 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1026 |
0 |
@Override... |
1027 |
|
public void mousePressed(MouseEvent e) |
1028 |
|
{ |
1029 |
0 |
gapColour_actionPerformed(gapColour); |
1030 |
|
} |
1031 |
|
}); |
1032 |
|
|
1033 |
0 |
hiddenColour.setFont(LABEL_FONT); |
1034 |
|
|
1035 |
0 |
hiddenColour.setBorder( |
1036 |
|
BorderFactory.createEtchedBorder(Color.white, Color.lightGray)); |
1037 |
0 |
hiddenColour.setPreferredSize(new Dimension(40, 20)); |
1038 |
0 |
hiddenColour.addMouseListener(new MouseAdapter() |
1039 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1040 |
0 |
@Override... |
1041 |
|
public void mousePressed(MouseEvent e) |
1042 |
|
{ |
1043 |
0 |
hiddenColour_actionPerformed(hiddenColour); |
1044 |
|
} |
1045 |
|
}); |
1046 |
|
|
1047 |
0 |
useLegacyGap = new JCheckBox( |
1048 |
|
MessageManager.getString("label.ov_legacy_gap")); |
1049 |
0 |
useLegacyGap.setFont(LABEL_FONT); |
1050 |
0 |
useLegacyGap.setHorizontalAlignment(SwingConstants.LEFT); |
1051 |
0 |
useLegacyGap.setVerticalTextPosition(SwingConstants.TOP); |
1052 |
0 |
gapLabel = new JLabel( |
1053 |
|
MessageManager.getString("label.gap_colour")); |
1054 |
0 |
gapLabel.setFont(LABEL_FONT); |
1055 |
0 |
gapLabel.setHorizontalAlignment(SwingConstants.LEFT); |
1056 |
0 |
gapLabel.setVerticalTextPosition(SwingConstants.TOP); |
1057 |
0 |
showHiddenAtStart = new JCheckBox( |
1058 |
|
MessageManager.getString("label.ov_show_hide_default")); |
1059 |
0 |
showHiddenAtStart.setFont(LABEL_FONT); |
1060 |
0 |
showHiddenAtStart.setHorizontalAlignment(SwingConstants.LEFT); |
1061 |
0 |
showHiddenAtStart.setVerticalTextPosition(SwingConstants.TOP); |
1062 |
0 |
JLabel hiddenLabel = new JLabel( |
1063 |
|
MessageManager.getString("label.hidden_colour")); |
1064 |
0 |
hiddenLabel.setFont(LABEL_FONT); |
1065 |
0 |
hiddenLabel.setHorizontalAlignment(SwingConstants.LEFT); |
1066 |
0 |
hiddenLabel.setVerticalTextPosition(SwingConstants.TOP); |
1067 |
|
|
1068 |
0 |
useLegacyGap.addActionListener(new ActionListener() |
1069 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1070 |
0 |
@Override... |
1071 |
|
public void actionPerformed(ActionEvent e) |
1072 |
|
{ |
1073 |
0 |
useLegacyGaps_actionPerformed(e); |
1074 |
|
} |
1075 |
|
}); |
1076 |
|
|
1077 |
0 |
overviewPanel.setLayout(new GridBagLayout()); |
1078 |
0 |
GridBagConstraints c1 = new GridBagConstraints(); |
1079 |
|
|
1080 |
0 |
c1.fill = GridBagConstraints.HORIZONTAL; |
1081 |
0 |
c1.gridx = 0; |
1082 |
0 |
c1.gridy = 0; |
1083 |
0 |
c1.weightx = 1; |
1084 |
0 |
c1.ipady = 20; |
1085 |
0 |
c1.anchor = GridBagConstraints.FIRST_LINE_START; |
1086 |
0 |
overviewPanel.add(useLegacyGap, c1); |
1087 |
|
|
1088 |
0 |
GridBagConstraints c2 = new GridBagConstraints(); |
1089 |
0 |
c2.fill = GridBagConstraints.HORIZONTAL; |
1090 |
0 |
c2.gridx = 1; |
1091 |
0 |
c2.gridy = 0; |
1092 |
0 |
c2.insets = new Insets(0, 15, 0, 10); |
1093 |
0 |
overviewPanel.add(gapLabel, c2); |
1094 |
|
|
1095 |
0 |
GridBagConstraints c3 = new GridBagConstraints(); |
1096 |
0 |
c3.fill = GridBagConstraints.HORIZONTAL; |
1097 |
0 |
c3.gridx = 2; |
1098 |
0 |
c3.gridy = 0; |
1099 |
0 |
c3.insets = new Insets(0, 0, 0, 15); |
1100 |
0 |
overviewPanel.add(gapColour, c3); |
1101 |
|
|
1102 |
0 |
GridBagConstraints c4 = new GridBagConstraints(); |
1103 |
0 |
c4.fill = GridBagConstraints.HORIZONTAL; |
1104 |
0 |
c4.gridx = 0; |
1105 |
0 |
c4.gridy = 1; |
1106 |
0 |
c4.weightx = 1; |
1107 |
0 |
overviewPanel.add(showHiddenAtStart, c4); |
1108 |
|
|
1109 |
0 |
GridBagConstraints c5 = new GridBagConstraints(); |
1110 |
0 |
c5.fill = GridBagConstraints.HORIZONTAL; |
1111 |
0 |
c5.gridx = 1; |
1112 |
0 |
c5.gridy = 1; |
1113 |
0 |
c5.insets = new Insets(0, 15, 0, 10); |
1114 |
0 |
overviewPanel.add(hiddenLabel, c5); |
1115 |
|
|
1116 |
0 |
GridBagConstraints c6 = new GridBagConstraints(); |
1117 |
0 |
c6.fill = GridBagConstraints.HORIZONTAL; |
1118 |
0 |
c6.gridx = 2; |
1119 |
0 |
c6.gridy = 1; |
1120 |
0 |
c6.insets = new Insets(0, 0, 0, 15); |
1121 |
0 |
overviewPanel.add(hiddenColour, c6); |
1122 |
|
|
1123 |
0 |
JButton resetButton = new JButton( |
1124 |
|
MessageManager.getString("label.reset_to_defaults")); |
1125 |
|
|
1126 |
0 |
resetButton.addActionListener(new ActionListener() |
1127 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1128 |
0 |
@Override... |
1129 |
|
public void actionPerformed(ActionEvent e) |
1130 |
|
{ |
1131 |
0 |
resetOvDefaults_actionPerformed(e); |
1132 |
|
} |
1133 |
|
}); |
1134 |
|
|
1135 |
0 |
GridBagConstraints c7 = new GridBagConstraints(); |
1136 |
0 |
c7.fill = GridBagConstraints.NONE; |
1137 |
0 |
c7.gridx = 0; |
1138 |
0 |
c7.gridy = 2; |
1139 |
0 |
c7.insets = new Insets(10, 0, 0, 0); |
1140 |
0 |
c7.anchor = GridBagConstraints.WEST; |
1141 |
0 |
overviewPanel.add(resetButton, c7); |
1142 |
|
|
1143 |
|
|
1144 |
0 |
JPanel spacePanel = new JPanel(); |
1145 |
0 |
overviewPanel.add(spacePanel, |
1146 |
|
new GridBagConstraints(0, 3, 1, 1, 1.0, 1.0, |
1147 |
|
GridBagConstraints.WEST, GridBagConstraints.BOTH, |
1148 |
|
new Insets(0, 0, 0, 5), 0, 0)); |
1149 |
|
|
1150 |
0 |
return overviewPanel; |
1151 |
|
} |
1152 |
|
|
1153 |
|
|
1154 |
|
|
1155 |
|
|
1156 |
|
@return |
1157 |
|
|
|
|
| 0% |
Uncovered Elements: 84 (84) |
Complexity: 2 |
Complexity Density: 0.02 |
|
1158 |
0 |
private JPanel initStructureTab()... |
1159 |
|
{ |
1160 |
0 |
structureTab = new JPanel(); |
1161 |
|
|
1162 |
0 |
structureTab.setBorder(new TitledBorder( |
1163 |
|
MessageManager.getString("label.structure_options"))); |
1164 |
0 |
structureTab.setLayout(null); |
1165 |
0 |
final int width = 400; |
1166 |
0 |
final int height = 22; |
1167 |
0 |
final int lineSpacing = 25; |
1168 |
0 |
int ypos = 15; |
1169 |
|
|
1170 |
0 |
structFromPdb.setFont(LABEL_FONT); |
1171 |
0 |
structFromPdb |
1172 |
|
.setText(MessageManager.getString("label.struct_from_pdb")); |
1173 |
0 |
structFromPdb.setBounds(new Rectangle(5, ypos, width, height)); |
1174 |
0 |
structFromPdb.addActionListener(new ActionListener() |
1175 |
|
{ |
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
1176 |
0 |
@Override... |
1177 |
|
public void actionPerformed(ActionEvent e) |
1178 |
|
{ |
1179 |
0 |
boolean selected = structFromPdb.isSelected(); |
1180 |
|
|
1181 |
0 |
useRnaView.setEnabled(selected); |
1182 |
0 |
addSecondaryStructure.setEnabled(selected); |
1183 |
0 |
addTempFactor.setEnabled(selected); |
1184 |
|
} |
1185 |
|
}); |
1186 |
0 |
structureTab.add(structFromPdb); |
1187 |
|
|
1188 |
|
|
1189 |
0 |
ypos += lineSpacing; |
1190 |
0 |
useRnaView.setFont(LABEL_FONT); |
1191 |
0 |
useRnaView.setText(MessageManager.getString("label.use_rnaview")); |
1192 |
0 |
useRnaView.setBounds(new Rectangle(25, ypos, width, height)); |
1193 |
0 |
structureTab.add(useRnaView); |
1194 |
|
|
1195 |
0 |
ypos += lineSpacing; |
1196 |
0 |
addSecondaryStructure.setFont(LABEL_FONT); |
1197 |
0 |
addSecondaryStructure |
1198 |
|
.setText(MessageManager.getString("label.autoadd_secstr")); |
1199 |
0 |
addSecondaryStructure.setBounds(new Rectangle(25, ypos, width, height)); |
1200 |
0 |
structureTab.add(addSecondaryStructure); |
1201 |
|
|
1202 |
0 |
ypos += lineSpacing; |
1203 |
0 |
addTempFactor.setFont(LABEL_FONT); |
1204 |
0 |
addTempFactor.setText(MessageManager.getString("label.autoadd_temp")); |
1205 |
0 |
addTempFactor.setBounds(new Rectangle(25, ypos, width, height)); |
1206 |
0 |
structureTab.add(addTempFactor); |
1207 |
|
|
1208 |
0 |
ypos += lineSpacing; |
1209 |
0 |
JLabel viewerLabel = new JLabel(); |
1210 |
0 |
viewerLabel.setFont(LABEL_FONT); |
1211 |
0 |
viewerLabel.setHorizontalAlignment(SwingConstants.LEFT); |
1212 |
0 |
viewerLabel.setText(MessageManager.getString("label.structure_viewer")); |
1213 |
0 |
viewerLabel.setBounds(new Rectangle(10, ypos, 200, height)); |
1214 |
0 |
structureTab.add(viewerLabel); |
1215 |
|
|
1216 |
0 |
structViewer.setFont(LABEL_FONT); |
1217 |
0 |
structViewer.setBounds(new Rectangle(160, ypos, 120, height)); |
1218 |
0 |
structViewer.addItem(ViewerType.JMOL.name()); |
1219 |
0 |
structViewer.addItem(ViewerType.CHIMERA.name()); |
1220 |
0 |
structViewer.addActionListener(new ActionListener() |
1221 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1222 |
0 |
@Override... |
1223 |
|
public void actionPerformed(ActionEvent e) |
1224 |
|
{ |
1225 |
0 |
structureViewer_actionPerformed( |
1226 |
|
(String) structViewer.getSelectedItem()); |
1227 |
|
} |
1228 |
|
}); |
1229 |
0 |
structureTab.add(structViewer); |
1230 |
|
|
1231 |
0 |
ypos += lineSpacing; |
1232 |
0 |
JLabel pathLabel = new JLabel(); |
1233 |
0 |
pathLabel.setFont(new java.awt.Font("SansSerif", 0, 11)); |
1234 |
0 |
pathLabel.setHorizontalAlignment(SwingConstants.LEFT); |
1235 |
0 |
pathLabel.setText(MessageManager.getString("label.chimera_path")); |
1236 |
0 |
pathLabel.setBounds(new Rectangle(10, ypos, 140, height)); |
1237 |
0 |
structureTab.add(pathLabel); |
1238 |
|
|
1239 |
0 |
chimeraPath.setFont(LABEL_FONT); |
1240 |
0 |
chimeraPath.setText(""); |
1241 |
0 |
final String tooltip = JvSwingUtils.wrapTooltip(true, |
1242 |
|
MessageManager.getString("label.chimera_path_tip")); |
1243 |
0 |
chimeraPath.setToolTipText(tooltip); |
1244 |
0 |
chimeraPath.setBounds(new Rectangle(160, ypos, 300, height)); |
1245 |
0 |
chimeraPath.addMouseListener(new MouseAdapter() |
1246 |
|
{ |
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
1247 |
0 |
@Override... |
1248 |
|
public void mouseClicked(MouseEvent e) |
1249 |
|
{ |
1250 |
0 |
if (e.getClickCount() == 2) |
1251 |
|
{ |
1252 |
0 |
String chosen = openFileChooser(); |
1253 |
0 |
if (chosen != null) |
1254 |
|
{ |
1255 |
0 |
chimeraPath.setText(chosen); |
1256 |
|
} |
1257 |
|
} |
1258 |
|
} |
1259 |
|
}); |
1260 |
0 |
structureTab.add(chimeraPath); |
1261 |
|
|
1262 |
0 |
ypos += lineSpacing; |
1263 |
0 |
nwMapping.setFont(LABEL_FONT); |
1264 |
0 |
nwMapping.setText(MessageManager.getString("label.nw_mapping")); |
1265 |
0 |
siftsMapping.setFont(LABEL_FONT); |
1266 |
0 |
siftsMapping.setText(MessageManager.getString("label.sifts_mapping")); |
1267 |
0 |
mappingMethod.add(nwMapping); |
1268 |
0 |
mappingMethod.add(siftsMapping); |
1269 |
0 |
JPanel mappingPanel = new JPanel(); |
1270 |
0 |
mappingPanel.setFont(LABEL_FONT); |
1271 |
0 |
TitledBorder mmTitledBorder = new TitledBorder( |
1272 |
|
MessageManager.getString("label.mapping_method")); |
1273 |
0 |
mmTitledBorder.setTitleFont(LABEL_FONT); |
1274 |
0 |
mappingPanel.setBorder(mmTitledBorder); |
1275 |
0 |
mappingPanel.setBounds(new Rectangle(10, ypos, 452, 45)); |
1276 |
|
|
1277 |
0 |
mappingPanel.setLayout(new GridLayout()); |
1278 |
0 |
mappingPanel.add(nwMapping); |
1279 |
0 |
mappingPanel.add(siftsMapping); |
1280 |
0 |
structureTab.add(mappingPanel); |
1281 |
|
|
1282 |
0 |
ypos += lineSpacing; |
1283 |
0 |
ypos += lineSpacing; |
1284 |
0 |
FTSDataColumnPreferences docFieldPref = new FTSDataColumnPreferences( |
1285 |
|
PreferenceSource.PREFERENCES, PDBFTSRestClient.getInstance()); |
1286 |
0 |
docFieldPref.setBounds(new Rectangle(10, ypos, 450, 120)); |
1287 |
0 |
structureTab.add(docFieldPref); |
1288 |
|
|
1289 |
|
|
1290 |
|
|
1291 |
|
|
1292 |
0 |
if (Jalview.isJS()) |
1293 |
|
{ |
1294 |
0 |
pathLabel.setVisible(false); |
1295 |
0 |
chimeraPath.setVisible(false); |
1296 |
0 |
viewerLabel.setVisible(false); |
1297 |
0 |
structViewer.setVisible(false); |
1298 |
|
} |
1299 |
|
|
1300 |
0 |
return structureTab; |
1301 |
|
} |
1302 |
|
|
1303 |
|
|
1304 |
|
|
1305 |
|
|
1306 |
|
@param |
1307 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1308 |
0 |
protected void structureViewer_actionPerformed(String selectedItem)... |
1309 |
|
{ |
1310 |
|
} |
1311 |
|
|
1312 |
|
|
1313 |
|
|
1314 |
|
|
1315 |
|
|
1316 |
|
@return |
1317 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 2 |
Complexity Density: 0.25 |
|
1318 |
0 |
protected String openFileChooser()... |
1319 |
|
{ |
1320 |
0 |
String choice = null; |
1321 |
0 |
JFileChooser chooser = new JFileChooser(); |
1322 |
|
|
1323 |
|
|
1324 |
0 |
chooser.setDialogTitle( |
1325 |
|
MessageManager.getString("label.open_local_file")); |
1326 |
0 |
chooser.setToolTipText(MessageManager.getString("action.open")); |
1327 |
|
|
1328 |
0 |
int value = chooser.showOpenDialog(this); |
1329 |
|
|
1330 |
0 |
if (value == JFileChooser.APPROVE_OPTION) |
1331 |
|
{ |
1332 |
0 |
choice = chooser.getSelectedFile().getPath(); |
1333 |
|
} |
1334 |
0 |
return choice; |
1335 |
|
} |
1336 |
|
|
1337 |
|
|
1338 |
|
|
1339 |
|
|
1340 |
|
@param |
1341 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
1342 |
0 |
protected boolean validateStructure(FocusEvent e)... |
1343 |
|
{ |
1344 |
0 |
if (!validateStructure()) |
1345 |
|
{ |
1346 |
0 |
e.getComponent().requestFocusInWindow(); |
1347 |
0 |
return false; |
1348 |
|
} |
1349 |
0 |
return true; |
1350 |
|
} |
1351 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1352 |
0 |
protected boolean validateStructure()... |
1353 |
|
{ |
1354 |
0 |
return false; |
1355 |
|
} |
1356 |
|
|
1357 |
|
|
1358 |
|
|
1359 |
|
|
1360 |
|
@return |
1361 |
|
|
|
|
| 0% |
Uncovered Elements: 238 (238) |
Complexity: 2 |
Complexity Density: 0.01 |
|
1362 |
0 |
private JPanel initVisualTab()... |
1363 |
|
{ |
1364 |
0 |
JPanel visualTab = new JPanel(); |
1365 |
0 |
visualTab.setBorder(new TitledBorder( |
1366 |
|
MessageManager.getString("action.open_new_alignment"))); |
1367 |
0 |
visualTab.setLayout(null); |
1368 |
0 |
fullScreen.setFont(LABEL_FONT); |
1369 |
0 |
fullScreen.setHorizontalAlignment(SwingConstants.RIGHT); |
1370 |
0 |
fullScreen.setHorizontalTextPosition(SwingConstants.LEFT); |
1371 |
0 |
fullScreen.setText(MessageManager.getString("label.maximize_window")); |
1372 |
0 |
quality.setEnabled(false); |
1373 |
0 |
quality.setFont(LABEL_FONT); |
1374 |
0 |
quality.setHorizontalAlignment(SwingConstants.RIGHT); |
1375 |
0 |
quality.setHorizontalTextPosition(SwingConstants.LEFT); |
1376 |
0 |
quality.setSelected(true); |
1377 |
0 |
quality.setText(MessageManager.getString("label.quality")); |
1378 |
0 |
conservation.setEnabled(false); |
1379 |
0 |
conservation.setFont(LABEL_FONT); |
1380 |
0 |
conservation.setHorizontalAlignment(SwingConstants.RIGHT); |
1381 |
0 |
conservation.setHorizontalTextPosition(SwingConstants.LEFT); |
1382 |
0 |
conservation.setSelected(true); |
1383 |
0 |
conservation.setText(MessageManager.getString("label.conservation")); |
1384 |
0 |
identity.setEnabled(false); |
1385 |
0 |
identity.setFont(LABEL_FONT); |
1386 |
0 |
identity.setHorizontalAlignment(SwingConstants.RIGHT); |
1387 |
0 |
identity.setHorizontalTextPosition(SwingConstants.LEFT); |
1388 |
0 |
identity.setSelected(true); |
1389 |
0 |
identity.setText(MessageManager.getString("label.consensus")); |
1390 |
0 |
showOccupancy.setFont(LABEL_FONT); |
1391 |
0 |
showOccupancy.setEnabled(false); |
1392 |
0 |
showOccupancy.setHorizontalAlignment(SwingConstants.RIGHT); |
1393 |
0 |
showOccupancy.setHorizontalTextPosition(SwingConstants.LEFT); |
1394 |
0 |
showOccupancy.setSelected(true); |
1395 |
0 |
showOccupancy.setText(MessageManager.getString("label.occupancy")); |
1396 |
|
|
1397 |
0 |
JLabel showGroupbits = new JLabel(); |
1398 |
0 |
showGroupbits.setFont(LABEL_FONT); |
1399 |
0 |
showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT); |
1400 |
0 |
showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT); |
1401 |
0 |
showGroupbits |
1402 |
|
.setText(MessageManager.getString("action.show_group") + ":"); |
1403 |
0 |
JLabel showConsensbits = new JLabel(); |
1404 |
0 |
showConsensbits.setFont(LABEL_FONT); |
1405 |
0 |
showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT); |
1406 |
0 |
showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT); |
1407 |
0 |
showConsensbits |
1408 |
|
.setText(MessageManager.getString("label.consensus") + ":"); |
1409 |
0 |
showConsensHistogram.setEnabled(false); |
1410 |
0 |
showConsensHistogram.setFont(LABEL_FONT); |
1411 |
0 |
showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT); |
1412 |
0 |
showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT); |
1413 |
0 |
showConsensHistogram.setSelected(true); |
1414 |
0 |
showConsensHistogram |
1415 |
|
.setText(MessageManager.getString("label.histogram")); |
1416 |
0 |
showConsensLogo.setEnabled(false); |
1417 |
0 |
showConsensLogo.setFont(LABEL_FONT); |
1418 |
0 |
showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT); |
1419 |
0 |
showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT); |
1420 |
0 |
showConsensLogo.setSelected(true); |
1421 |
0 |
showConsensLogo.setText(MessageManager.getString("label.logo")); |
1422 |
0 |
showGroupConsensus.setEnabled(false); |
1423 |
0 |
showGroupConsensus.setFont(LABEL_FONT); |
1424 |
0 |
showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT); |
1425 |
0 |
showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT); |
1426 |
0 |
showGroupConsensus.setSelected(true); |
1427 |
0 |
showGroupConsensus.setText(MessageManager.getString("label.consensus")); |
1428 |
0 |
showGroupConservation.setEnabled(false); |
1429 |
0 |
showGroupConservation.setFont(LABEL_FONT); |
1430 |
0 |
showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT); |
1431 |
0 |
showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT); |
1432 |
0 |
showGroupConservation.setSelected(true); |
1433 |
0 |
showGroupConservation |
1434 |
|
.setText(MessageManager.getString("label.conservation")); |
1435 |
0 |
showNpTooltip.setEnabled(true); |
1436 |
0 |
showNpTooltip.setFont(LABEL_FONT); |
1437 |
0 |
showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT); |
1438 |
0 |
showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT); |
1439 |
0 |
showNpTooltip.setSelected(true); |
1440 |
0 |
showNpTooltip.setText( |
1441 |
|
MessageManager.getString("label.non_positional_features")); |
1442 |
0 |
showDbRefTooltip.setEnabled(true); |
1443 |
0 |
showDbRefTooltip.setFont(LABEL_FONT); |
1444 |
0 |
showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT); |
1445 |
0 |
showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT); |
1446 |
0 |
showDbRefTooltip.setSelected(true); |
1447 |
0 |
showDbRefTooltip |
1448 |
|
.setText(MessageManager.getString("label.database_references")); |
1449 |
0 |
annotations.setFont(LABEL_FONT); |
1450 |
0 |
annotations.setHorizontalAlignment(SwingConstants.RIGHT); |
1451 |
0 |
annotations.setHorizontalTextPosition(SwingConstants.LEFT); |
1452 |
0 |
annotations.setSelected(true); |
1453 |
0 |
annotations.setText(MessageManager.getString("label.show_annotations")); |
1454 |
|
|
1455 |
0 |
annotations.addActionListener(new ActionListener() |
1456 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1457 |
0 |
@Override... |
1458 |
|
public void actionPerformed(ActionEvent e) |
1459 |
|
{ |
1460 |
0 |
annotations_actionPerformed(e); |
1461 |
|
} |
1462 |
|
}); |
1463 |
0 |
identity.addActionListener(new ActionListener() |
1464 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1465 |
0 |
@Override... |
1466 |
|
public void actionPerformed(ActionEvent e) |
1467 |
|
{ |
1468 |
0 |
annotations_actionPerformed(e); |
1469 |
|
} |
1470 |
|
}); |
1471 |
0 |
showGroupConsensus.addActionListener(new ActionListener() |
1472 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1473 |
0 |
@Override... |
1474 |
|
public void actionPerformed(ActionEvent e) |
1475 |
|
{ |
1476 |
0 |
annotations_actionPerformed(e); |
1477 |
|
} |
1478 |
|
}); |
1479 |
0 |
showUnconserved.setFont(LABEL_FONT); |
1480 |
0 |
showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT); |
1481 |
0 |
showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT); |
1482 |
0 |
showUnconserved.setSelected(true); |
1483 |
0 |
showUnconserved |
1484 |
|
.setText(MessageManager.getString("action.show_unconserved")); |
1485 |
0 |
showUnconserved.addActionListener(new ActionListener() |
1486 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1487 |
0 |
@Override... |
1488 |
|
public void actionPerformed(ActionEvent e) |
1489 |
|
{ |
1490 |
0 |
showunconserved_actionPerformed(e); |
1491 |
|
} |
1492 |
|
}); |
1493 |
|
|
1494 |
|
|
1495 |
|
|
1496 |
|
|
1497 |
|
|
1498 |
|
|
1499 |
|
|
1500 |
|
|
1501 |
|
|
1502 |
|
|
1503 |
|
|
1504 |
|
|
1505 |
|
|
1506 |
|
|
1507 |
|
|
1508 |
|
|
1509 |
|
|
1510 |
|
|
1511 |
0 |
seqLimit.setFont(LABEL_FONT); |
1512 |
0 |
seqLimit.setHorizontalAlignment(SwingConstants.RIGHT); |
1513 |
0 |
seqLimit.setHorizontalTextPosition(SwingConstants.LEFT); |
1514 |
0 |
seqLimit.setText(MessageManager.getString("label.full_sequence_id")); |
1515 |
0 |
smoothFont.setFont(LABEL_FONT); |
1516 |
0 |
smoothFont.setHorizontalAlignment(SwingConstants.RIGHT); |
1517 |
0 |
smoothFont.setHorizontalTextPosition(SwingConstants.LEADING); |
1518 |
0 |
smoothFont.setText(MessageManager.getString("label.smooth_font")); |
1519 |
0 |
scaleProteinToCdna.setFont(LABEL_FONT); |
1520 |
0 |
scaleProteinToCdna.setHorizontalAlignment(SwingConstants.RIGHT); |
1521 |
0 |
scaleProteinToCdna.setHorizontalTextPosition(SwingConstants.LEADING); |
1522 |
0 |
scaleProteinToCdna.setText( |
1523 |
|
MessageManager.getString("label.scale_protein_to_cdna")); |
1524 |
0 |
scaleProteinToCdna.setToolTipText( |
1525 |
|
MessageManager.getString("label.scale_protein_to_cdna_tip")); |
1526 |
0 |
JLabel gapLabel = new JLabel(); |
1527 |
0 |
gapLabel.setFont(LABEL_FONT); |
1528 |
0 |
gapLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
1529 |
0 |
gapLabel.setText(MessageManager.getString("label.gap_symbol") + " "); |
1530 |
0 |
JLabel fontLabel = new JLabel(); |
1531 |
0 |
fontLabel.setFont(LABEL_FONT); |
1532 |
0 |
fontLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
1533 |
0 |
fontLabel.setText(MessageManager.getString("label.font")); |
1534 |
0 |
fontSizeCB.setFont(LABEL_FONT); |
1535 |
0 |
fontSizeCB.setBounds(new Rectangle(320, 112, 65, 23)); |
1536 |
0 |
fontStyleCB.setFont(LABEL_FONT); |
1537 |
0 |
fontStyleCB.setBounds(new Rectangle(382, 112, 80, 23)); |
1538 |
0 |
fontNameCB.setFont(LABEL_FONT); |
1539 |
0 |
fontNameCB.setBounds(new Rectangle(172, 112, 147, 23)); |
1540 |
0 |
gapSymbolCB.setFont(LABEL_FONT); |
1541 |
0 |
gapSymbolCB.setBounds(new Rectangle(172, 215, 69, 23)); |
1542 |
0 |
DefaultListCellRenderer dlcr = new DefaultListCellRenderer(); |
1543 |
0 |
dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER); |
1544 |
0 |
gapSymbolCB.setRenderer(dlcr); |
1545 |
|
|
1546 |
0 |
startupCheckbox.setText(MessageManager.getString("action.open_file")); |
1547 |
0 |
startupCheckbox.setFont(LABEL_FONT); |
1548 |
0 |
startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT); |
1549 |
0 |
startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT); |
1550 |
0 |
startupCheckbox.setSelected(true); |
1551 |
0 |
startupFileTextfield.setFont(LABEL_FONT); |
1552 |
0 |
startupFileTextfield.setBounds(new Rectangle(172, 310, 330, 20)); |
1553 |
0 |
final String tooltip = JvSwingUtils.wrapTooltip(true, |
1554 |
|
MessageManager.getString("label.double_click_to_browse")); |
1555 |
0 |
startupFileTextfield.setToolTipText(tooltip); |
1556 |
0 |
startupFileTextfield.addMouseListener(new MouseAdapter() |
1557 |
|
{ |
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
1558 |
0 |
@Override... |
1559 |
|
public void mouseClicked(MouseEvent e) |
1560 |
|
{ |
1561 |
0 |
if (e.getClickCount() > 1) |
1562 |
|
{ |
1563 |
0 |
startupFileTextfield_mouseClicked(); |
1564 |
|
} |
1565 |
|
} |
1566 |
|
}); |
1567 |
|
|
1568 |
0 |
sortby.setFont(LABEL_FONT); |
1569 |
0 |
sortby.setBounds(new Rectangle(172, 260, 155, 21)); |
1570 |
0 |
JLabel sortLabel = new JLabel(); |
1571 |
0 |
sortLabel.setFont(LABEL_FONT); |
1572 |
0 |
sortLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
1573 |
0 |
sortLabel.setText(MessageManager.getString("label.sort_by")); |
1574 |
0 |
sortAnnBy.setFont(LABEL_FONT); |
1575 |
0 |
sortAnnBy.setBounds(new Rectangle(172, 285, 110, 21)); |
1576 |
0 |
JLabel sortAnnLabel = new JLabel(); |
1577 |
0 |
sortAnnLabel.setFont(LABEL_FONT); |
1578 |
0 |
sortAnnLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
1579 |
0 |
sortAnnLabel.setText(MessageManager.getString("label.sort_ann_by")); |
1580 |
0 |
sortAutocalc.setFont(LABEL_FONT); |
1581 |
0 |
sortAutocalc.setBounds(new Rectangle(290, 285, 165, 21)); |
1582 |
|
|
1583 |
0 |
JPanel annsettingsPanel = new JPanel(); |
1584 |
0 |
annsettingsPanel.setBounds(new Rectangle(173, 13, 320, 96)); |
1585 |
0 |
annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
1586 |
0 |
annsettingsPanel.setBorder(new EtchedBorder()); |
1587 |
0 |
visualTab.add(annsettingsPanel); |
1588 |
0 |
Border jb = new EmptyBorder(1, 1, 4, 5); |
1589 |
0 |
annotations.setBorder(jb); |
1590 |
0 |
showOccupancy.setBorder(jb); |
1591 |
0 |
quality.setBorder(jb); |
1592 |
0 |
conservation.setBorder(jb); |
1593 |
0 |
identity.setBorder(jb); |
1594 |
0 |
showConsensbits.setBorder(jb); |
1595 |
0 |
showGroupbits.setBorder(jb); |
1596 |
0 |
showGroupConsensus.setBorder(jb); |
1597 |
0 |
showGroupConservation.setBorder(jb); |
1598 |
0 |
showConsensHistogram.setBorder(jb); |
1599 |
0 |
showConsensLogo.setBorder(jb); |
1600 |
|
|
1601 |
0 |
JPanel autoAnnotSettings = new JPanel(); |
1602 |
0 |
annsettingsPanel.add(autoAnnotSettings); |
1603 |
0 |
autoAnnotSettings.setLayout(new GridLayout(0, 2)); |
1604 |
0 |
autoAnnotSettings.add(annotations); |
1605 |
0 |
autoAnnotSettings.add(quality); |
1606 |
|
|
1607 |
0 |
autoAnnotSettings = new JPanel(); |
1608 |
0 |
annsettingsPanel.add(autoAnnotSettings); |
1609 |
|
|
1610 |
0 |
autoAnnotSettings.setLayout(new GridLayout(0, 3)); |
1611 |
0 |
autoAnnotSettings.add(conservation); |
1612 |
0 |
autoAnnotSettings.add(identity); |
1613 |
0 |
autoAnnotSettings.add(showOccupancy); |
1614 |
0 |
autoAnnotSettings.add(showGroupbits); |
1615 |
0 |
autoAnnotSettings.add(showGroupConservation); |
1616 |
0 |
autoAnnotSettings.add(showGroupConsensus); |
1617 |
0 |
autoAnnotSettings.add(showConsensbits); |
1618 |
0 |
autoAnnotSettings.add(showConsensHistogram); |
1619 |
0 |
autoAnnotSettings.add(showConsensLogo); |
1620 |
|
|
1621 |
0 |
JPanel tooltipSettings = new JPanel(); |
1622 |
0 |
tooltipSettings.setBorder(new TitledBorder( |
1623 |
|
MessageManager.getString("label.sequence_id_tooltip"))); |
1624 |
0 |
tooltipSettings.setBounds(173, 140, 220, 62); |
1625 |
0 |
tooltipSettings.setLayout(new GridLayout(2, 1)); |
1626 |
0 |
tooltipSettings.add(showDbRefTooltip); |
1627 |
0 |
tooltipSettings.add(showNpTooltip); |
1628 |
0 |
visualTab.add(tooltipSettings); |
1629 |
|
|
1630 |
0 |
wrap.setFont(LABEL_FONT); |
1631 |
0 |
wrap.setHorizontalAlignment(SwingConstants.TRAILING); |
1632 |
0 |
wrap.setHorizontalTextPosition(SwingConstants.LEADING); |
1633 |
0 |
wrap.setText(MessageManager.getString("label.wrap_alignment")); |
1634 |
0 |
rightAlign.setFont(LABEL_FONT); |
1635 |
0 |
rightAlign.setForeground(Color.black); |
1636 |
0 |
rightAlign.setHorizontalAlignment(SwingConstants.RIGHT); |
1637 |
0 |
rightAlign.setHorizontalTextPosition(SwingConstants.LEFT); |
1638 |
0 |
rightAlign.setText(MessageManager.getString("label.right_align_ids")); |
1639 |
0 |
idItalics.setFont(LABEL_FONT_ITALIC); |
1640 |
0 |
idItalics.setHorizontalAlignment(SwingConstants.RIGHT); |
1641 |
0 |
idItalics.setHorizontalTextPosition(SwingConstants.LEADING); |
1642 |
0 |
idItalics.setText( |
1643 |
|
MessageManager.getString("label.sequence_name_italics")); |
1644 |
0 |
openoverv.setFont(LABEL_FONT); |
1645 |
0 |
openoverv.setActionCommand( |
1646 |
|
MessageManager.getString("label.open_overview")); |
1647 |
0 |
openoverv.setHorizontalAlignment(SwingConstants.RIGHT); |
1648 |
0 |
openoverv.setHorizontalTextPosition(SwingConstants.LEFT); |
1649 |
0 |
openoverv.setText(MessageManager.getString("label.open_overview")); |
1650 |
0 |
JPanel jPanel2 = new JPanel(); |
1651 |
0 |
jPanel2.setBounds(new Rectangle(7, 17, 158, 310)); |
1652 |
0 |
jPanel2.setLayout(new GridLayout(14, 1)); |
1653 |
0 |
jPanel2.add(fullScreen); |
1654 |
0 |
jPanel2.add(openoverv); |
1655 |
0 |
jPanel2.add(seqLimit); |
1656 |
0 |
jPanel2.add(rightAlign); |
1657 |
0 |
jPanel2.add(fontLabel); |
1658 |
0 |
jPanel2.add(showUnconserved); |
1659 |
0 |
jPanel2.add(idItalics); |
1660 |
0 |
jPanel2.add(smoothFont); |
1661 |
0 |
jPanel2.add(scaleProteinToCdna); |
1662 |
0 |
jPanel2.add(gapLabel); |
1663 |
0 |
jPanel2.add(wrap); |
1664 |
0 |
jPanel2.add(sortLabel); |
1665 |
0 |
jPanel2.add(sortAnnLabel); |
1666 |
0 |
jPanel2.add(startupCheckbox); |
1667 |
0 |
visualTab.add(jPanel2); |
1668 |
0 |
visualTab.add(startupFileTextfield); |
1669 |
0 |
visualTab.add(sortby); |
1670 |
0 |
visualTab.add(sortAnnBy); |
1671 |
0 |
visualTab.add(sortAutocalc); |
1672 |
0 |
visualTab.add(gapSymbolCB); |
1673 |
0 |
visualTab.add(fontNameCB); |
1674 |
0 |
visualTab.add(fontSizeCB); |
1675 |
0 |
visualTab.add(fontStyleCB); |
1676 |
|
|
1677 |
0 |
if (Jalview.isJS()) |
1678 |
|
{ |
1679 |
0 |
startupCheckbox.setVisible(false); |
1680 |
0 |
startupFileTextfield.setVisible(false); |
1681 |
|
} |
1682 |
|
|
1683 |
0 |
return visualTab; |
1684 |
|
} |
1685 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1686 |
0 |
protected void autoIdWidth_actionPerformed()... |
1687 |
|
{ |
1688 |
|
|
1689 |
|
|
1690 |
|
} |
1691 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1692 |
0 |
protected void userIdWidth_actionPerformed()... |
1693 |
|
{ |
1694 |
|
|
1695 |
|
|
1696 |
|
} |
1697 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1698 |
0 |
protected void maxColour_actionPerformed(JPanel panel)... |
1699 |
|
{ |
1700 |
|
} |
1701 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1702 |
0 |
protected void minColour_actionPerformed(JPanel panel)... |
1703 |
|
{ |
1704 |
|
} |
1705 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1706 |
0 |
protected void gapColour_actionPerformed(JPanel panel)... |
1707 |
|
{ |
1708 |
|
} |
1709 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1710 |
0 |
protected void hiddenColour_actionPerformed(JPanel panel)... |
1711 |
|
{ |
1712 |
|
} |
1713 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1714 |
0 |
protected void showunconserved_actionPerformed(ActionEvent e)... |
1715 |
|
{ |
1716 |
|
|
1717 |
|
|
1718 |
|
} |
1719 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1720 |
0 |
protected void useLegacyGaps_actionPerformed(ActionEvent e)... |
1721 |
|
{ |
1722 |
|
} |
1723 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1724 |
0 |
protected void resetOvDefaults_actionPerformed(ActionEvent e)... |
1725 |
|
{ |
1726 |
|
} |
1727 |
|
|
1728 |
|
|
1729 |
|
|
1730 |
|
|
1731 |
|
@param |
1732 |
|
|
1733 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1734 |
0 |
public void ok_actionPerformed(ActionEvent e)... |
1735 |
|
{ |
1736 |
|
} |
1737 |
|
|
1738 |
|
|
1739 |
|
|
1740 |
|
|
1741 |
|
@param |
1742 |
|
|
1743 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1744 |
0 |
public void cancel_actionPerformed(ActionEvent e)... |
1745 |
|
{ |
1746 |
|
} |
1747 |
|
|
1748 |
|
|
1749 |
|
|
1750 |
|
|
1751 |
|
@param |
1752 |
|
|
1753 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1754 |
0 |
public void annotations_actionPerformed(ActionEvent e)... |
1755 |
|
{ |
1756 |
|
} |
1757 |
|
|
1758 |
|
|
1759 |
|
|
1760 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1761 |
0 |
public void startupFileTextfield_mouseClicked()... |
1762 |
|
{ |
1763 |
|
} |
1764 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1765 |
0 |
public void newLink_actionPerformed(ActionEvent e)... |
1766 |
|
{ |
1767 |
|
|
1768 |
|
} |
1769 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1770 |
0 |
public void editLink_actionPerformed(ActionEvent e)... |
1771 |
|
{ |
1772 |
|
|
1773 |
|
} |
1774 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1775 |
0 |
public void deleteLink_actionPerformed(ActionEvent e)... |
1776 |
|
{ |
1777 |
|
|
1778 |
|
} |
1779 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1780 |
0 |
public void defaultBrowser_mouseClicked(MouseEvent e)... |
1781 |
|
{ |
1782 |
|
|
1783 |
|
} |
1784 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
1785 |
0 |
public void linkURLList_keyTyped(KeyEvent e)... |
1786 |
|
{ |
1787 |
|
|
1788 |
|
} |
1789 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
1790 |
0 |
public void useProxy_actionPerformed()... |
1791 |
|
{ |
1792 |
0 |
boolean enabled = useProxy.isSelected(); |
1793 |
0 |
portLabel.setEnabled(enabled); |
1794 |
0 |
serverLabel.setEnabled(enabled); |
1795 |
0 |
proxyServerTB.setEnabled(enabled); |
1796 |
0 |
proxyPortTB.setEnabled(enabled); |
1797 |
|
} |
1798 |
|
|
1799 |
|
|
1800 |
|
|
1801 |
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 3 |
Complexity Density: 0.33 |
|
1802 |
|
public class RadioButtonRenderer extends JRadioButton |
1803 |
|
implements TableCellRenderer |
1804 |
|
{ |
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1805 |
0 |
public RadioButtonRenderer()... |
1806 |
|
{ |
1807 |
0 |
setHorizontalAlignment(CENTER); |
1808 |
0 |
setToolTipText(MessageManager.getString("label.urltooltip")); |
1809 |
|
} |
1810 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
1811 |
0 |
@Override... |
1812 |
|
public Component getTableCellRendererComponent(JTable table, |
1813 |
|
Object value, boolean isSelected, boolean hasFocus, int row, |
1814 |
|
int column) |
1815 |
|
{ |
1816 |
0 |
setSelected((boolean) value); |
1817 |
|
|
1818 |
|
|
1819 |
0 |
if (isSelected) |
1820 |
|
{ |
1821 |
0 |
setBackground(table.getSelectionBackground()); |
1822 |
0 |
setForeground(table.getSelectionForeground()); |
1823 |
|
} |
1824 |
|
else |
1825 |
|
{ |
1826 |
0 |
setBackground(table.getBackground()); |
1827 |
0 |
setForeground(table.getForeground()); |
1828 |
|
} |
1829 |
0 |
return this; |
1830 |
|
} |
1831 |
|
} |
1832 |
|
|
1833 |
|
|
1834 |
|
|
1835 |
|
|
1836 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
1837 |
|
public class RadioButtonEditor extends AbstractCellEditor |
1838 |
|
implements TableCellEditor |
1839 |
|
{ |
1840 |
|
private JRadioButton button = new JRadioButton(); |
1841 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1842 |
0 |
public RadioButtonEditor()... |
1843 |
|
{ |
1844 |
0 |
button.setHorizontalAlignment(SwingConstants.CENTER); |
1845 |
0 |
this.button.addActionListener(new ActionListener() |
1846 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1847 |
0 |
@Override... |
1848 |
|
public void actionPerformed(ActionEvent e) |
1849 |
|
{ |
1850 |
0 |
fireEditingStopped(); |
1851 |
|
} |
1852 |
|
}); |
1853 |
|
} |
1854 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
1855 |
0 |
@Override... |
1856 |
|
public Component getTableCellEditorComponent(JTable table, Object value, |
1857 |
|
boolean isSelected, int row, int column) |
1858 |
|
{ |
1859 |
0 |
button.setSelected((boolean) value); |
1860 |
0 |
return button; |
1861 |
|
} |
1862 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
1863 |
0 |
@Override... |
1864 |
|
public Object getCellEditorValue() |
1865 |
|
{ |
1866 |
0 |
return button.isSelected(); |
1867 |
|
} |
1868 |
|
|
1869 |
|
} |
1870 |
|
} |