Generic type support

This commit is contained in:
ebner 2013-04-16 13:14:18 +02:00
parent b3d3ea7b6c
commit df80d7b007

View File

@ -56,7 +56,7 @@ public class ZeroMQViewer implements PlugIn {
private Semaphore semaphore = new Semaphore(1);
private JLabel lblMethod;
private JComboBox comboBoxMethod;
private JComboBox<String> comboBoxMethod;
public void run(String arg) {
IJ.showStatus("Running ZeroMQ Viewer");
@ -100,6 +100,8 @@ public class ZeroMQViewer implements PlugIn {
}
socket.connect("tcp://"+hostname+":"+port);
logger.info("Connected to: tcp://"+hostname+":"+port);
while(collect){
byte[] message = socket.recv();
byte[] content = null;
@ -218,8 +220,8 @@ public class ZeroMQViewer implements PlugIn {
gbc_lblMethod.gridy = 2;
panel_1.add(lblMethod, gbc_lblMethod);
comboBoxMethod = new JComboBox();
comboBoxMethod.setModel(new DefaultComboBoxModel(new String[] {"PULL", "SUB"}));
comboBoxMethod = new JComboBox<String>();
comboBoxMethod.setModel(new DefaultComboBoxModel<String>(new String[] {"PULL", "SUB"}));
comboBoxMethod.setSelectedIndex(0);
GridBagConstraints gbc_comboBoxMethod = new GridBagConstraints();
gbc_comboBoxMethod.insets = new Insets(0, 0, 5, 0);