| 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.gui.JvSwingUtils; |
| 24 |
|
import jalview.gui.OptsAndParamsPage; |
| 25 |
|
import jalview.util.MessageManager; |
| 26 |
|
|
| 27 |
|
import java.awt.Dimension; |
| 28 |
|
import java.awt.event.KeyEvent; |
| 29 |
|
import java.awt.event.KeyListener; |
| 30 |
|
|
| 31 |
|
import javax.swing.JLabel; |
| 32 |
|
import javax.swing.JList; |
| 33 |
|
import javax.swing.JPanel; |
| 34 |
|
import javax.swing.JScrollPane; |
| 35 |
|
import javax.swing.JTextField; |
| 36 |
|
import javax.swing.ListSelectionModel; |
| 37 |
|
import javax.swing.border.TitledBorder; |
| 38 |
|
import javax.swing.event.ListSelectionEvent; |
| 39 |
|
import javax.swing.event.ListSelectionListener; |
| 40 |
|
|
| 41 |
|
import net.miginfocom.swing.MigLayout; |
| 42 |
|
|
| |
|
| 0% |
Uncovered Elements: 34 (34) |
Complexity: 8 |
Complexity Density: 0.31 |
|
| 43 |
|
public class GRestInputParamEditDialog |
| 44 |
|
{ |
| 45 |
|
|
| 46 |
|
protected JPanel dpane; |
| 47 |
|
|
| 48 |
|
protected JPanel okcancel; |
| 49 |
|
|
| 50 |
|
protected JList typeList; |
| 51 |
|
|
| 52 |
|
protected JTextField tok; |
| 53 |
|
|
| 54 |
|
protected JPanel options; |
| 55 |
|
|
| 56 |
|
protected JPanel optionsPanel; |
| 57 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 58 |
0 |
public GRestInputParamEditDialog()... |
| 59 |
|
{ |
| 60 |
0 |
jbInit(); |
| 61 |
|
} |
| 62 |
|
|
| |
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 1 |
Complexity Density: 0.04 |
|
| 63 |
0 |
protected void jbInit()... |
| 64 |
|
{ |
| 65 |
0 |
dpane = new JPanel(new MigLayout("", "[][][fill]", "[][fill][]")); |
| 66 |
0 |
dpane.setPreferredSize( |
| 67 |
|
new Dimension(110 + 100 + OptsAndParamsPage.PARAM_WIDTH, 400)); |
| 68 |
0 |
typeList = new JList(); |
| 69 |
0 |
typeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
| 70 |
0 |
typeList.getSelectionModel() |
| 71 |
|
.addListSelectionListener(new ListSelectionListener() |
| 72 |
|
{ |
| 73 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 74 |
0 |
@Override... |
| 75 |
|
public void valueChanged(ListSelectionEvent e) |
| 76 |
|
{ |
| 77 |
0 |
type_SelectionChangedActionPerformed(e); |
| 78 |
|
}; |
| 79 |
|
}); |
| 80 |
|
|
| 81 |
0 |
tok = new JTextField(); |
| 82 |
0 |
tok.addKeyListener(new KeyListener() |
| 83 |
|
{ |
| 84 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 85 |
0 |
@Override... |
| 86 |
|
public void keyTyped(KeyEvent e) |
| 87 |
|
{ |
| 88 |
|
} |
| 89 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 90 |
0 |
@Override... |
| 91 |
|
public void keyReleased(KeyEvent e) |
| 92 |
|
{ |
| 93 |
0 |
tokChanged_actionPerformed(); |
| 94 |
|
} |
| 95 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 96 |
0 |
@Override... |
| 97 |
|
public void keyPressed(KeyEvent e) |
| 98 |
|
{ |
| 99 |
|
|
| 100 |
|
} |
| 101 |
|
}); |
| 102 |
0 |
options = new JPanel(new MigLayout("", "[grow 100,fill]", "")); |
| 103 |
0 |
optionsPanel = new JPanel(new MigLayout("", "[fill]", "[fill]")); |
| 104 |
0 |
JScrollPane optionView = new JScrollPane(); |
| 105 |
0 |
optionView.setViewportView(options); |
| 106 |
0 |
JvSwingUtils.mgAddtoLayout(dpane, |
| 107 |
|
MessageManager.getString("label.input_parameter_name"), |
| 108 |
|
new JLabel(MessageManager.getString("label.name")), tok, |
| 109 |
|
"grow,spanx 3,wrap"); |
| 110 |
0 |
JPanel paramsType = new JPanel( |
| 111 |
|
new MigLayout("", "[grow 100,fill]", "[grow 100,fill]")); |
| 112 |
0 |
paramsType.setBorder(new TitledBorder( |
| 113 |
|
MessageManager.getString("label.select_input_type"))); |
| 114 |
0 |
JScrollPane jlistScroller = new JScrollPane(); |
| 115 |
0 |
jlistScroller.setViewportView(typeList); |
| 116 |
0 |
paramsType.add(jlistScroller, "spanx 2,spany 2"); |
| 117 |
0 |
dpane.add(paramsType); |
| 118 |
0 |
optionsPanel.setBorder(new TitledBorder( |
| 119 |
|
MessageManager.getString("label.set_options_for_type"))); |
| 120 |
0 |
optionsPanel.add(optionView); |
| 121 |
0 |
dpane.add(optionsPanel, "wrap"); |
| 122 |
0 |
okcancel = new JPanel(new MigLayout("", "[center][center]", "[]")); |
| 123 |
0 |
dpane.add(okcancel, "spanx 3,wrap"); |
| 124 |
|
|
| 125 |
|
} |
| 126 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 127 |
0 |
protected void tokChanged_actionPerformed()... |
| 128 |
|
{ |
| 129 |
|
|
| 130 |
|
} |
| 131 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 132 |
0 |
protected void type_SelectionChangedActionPerformed(ListSelectionEvent e)... |
| 133 |
|
{ |
| 134 |
|
} |
| 135 |
|
|
| 136 |
|
} |