|
@@ -55,7 +55,7 @@ public class UIAttachDialog extends JDialog implements ActionListener,
|
55
|
55
|
/** Sensible component gap. */
|
56
|
56
|
private static final int GAP = 5;
|
57
|
57
|
/** Services list. */
|
58
|
|
- private final JList list;
|
|
58
|
+ private final JList<Service> list;
|
59
|
59
|
/** Main instance. */
|
60
|
60
|
private final Main main;
|
61
|
61
|
|
|
@@ -70,9 +70,9 @@ public class UIAttachDialog extends JDialog implements ActionListener,
|
70
|
70
|
}
|
71
|
71
|
|
72
|
72
|
/** Initialises the model with a list of UIs. */
|
73
|
|
- private JList initList() {
|
74
|
|
- final DefaultListModel model = new DefaultListModel();
|
75
|
|
- final JList newList = new JList(model);
|
|
73
|
+ private JList<Service> initList() {
|
|
74
|
+ final DefaultListModel<Service> model = new DefaultListModel<Service>();
|
|
75
|
+ final JList<Service> newList = new JList<Service>(model);
|
76
|
76
|
newList.setCellRenderer(new ServiceRenderer());
|
77
|
77
|
newList.addListSelectionListener(this);
|
78
|
78
|
final List<Service> services = main.getPluginManager()
|
|
@@ -149,7 +149,7 @@ public class UIAttachDialog extends JDialog implements ActionListener,
|
149
|
149
|
|
150
|
150
|
/** {@inheritDoc} */
|
151
|
151
|
@Override
|
152
|
|
- public Component getListCellRendererComponent(final JList list,
|
|
152
|
+ public Component getListCellRendererComponent(final JList<?> list,
|
153
|
153
|
final Object value, final int index, final boolean isSelected,
|
154
|
154
|
final boolean cellHasFocus) {
|
155
|
155
|
final Component label = super.getListCellRendererComponent(list,
|