< prev index next >

## src/com/sun/javatest/agent/AgentMonitorTool.java

Print this page

    *** 176,186 ****
                  fc.gridwidth = GridBagConstraints.REMAINDER;
                  fc.weightx = 1;
                  add(timeoutField, fc);
                  timeoutLabel.setLabelFor(timeoutField);

    !             listData = new DefaultListModel();
                  list = uif.createList("tool.pool", listData);
                  list.setPrototypeCellValue("abcdefghiklmnopqrstuvwxyz");
                  list.setVisibleRowCount(3);
                  GridBagConstraints c = new GridBagConstraints();
                  c.fill = GridBagConstraints.BOTH;
    --- 176,186 ----
                  fc.gridwidth = GridBagConstraints.REMAINDER;
                  fc.weightx = 1;
                  add(timeoutField, fc);
                  timeoutLabel.setLabelFor(timeoutField);

    !             listData = new DefaultListModel<>();
                  list = uif.createList("tool.pool", listData);
                  list.setPrototypeCellValue("abcdefghiklmnopqrstuvwxyz");
                  list.setVisibleRowCount(3);
                  GridBagConstraints c = new GridBagConstraints();
                  c.fill = GridBagConstraints.BOTH;
    *** 337,348 ****
              private JCheckBox listeningCheck;
              private JLabel portLabel;
              private JTextField portField;
              private JLabel timeoutLabel;
              private JTextField timeoutField;
    !         private JList list;
    !         private DefaultListModel listData;
          }

          private class CurrentAgentsSubpanel extends JPanel
              implements ListSelectionListener, AgentManager.Observer
          {
    --- 337,348 ----
              private JCheckBox listeningCheck;
              private JLabel portLabel;
              private JTextField portField;
              private JLabel timeoutLabel;
              private JTextField timeoutField;
    !         private JList<String> list;
    !         private DefaultListModel<String> listData;
          }

          private class CurrentAgentsSubpanel extends JPanel
              implements ListSelectionListener, AgentManager.Observer
          {
    *** 350,366 ****
                  setName("tool.curr");
                  setBorder(uif.createTitledBorder("tool.curr"));
                  setLayout(new GridBagLayout());
                  uif.setToolTip(this, "tool.curr");

    !             listData = new DefaultListModel();
                  list = uif.createList("tool.list.curr", listData);
                  list.setVisibleRowCount(5);

                  list.setCellRenderer(new DefaultListCellRenderer() {
                      public Component getListCellRendererComponent(JList list, Object o, int index, boolean isSelected, boolean cellHasFocus) {
    !                     String name = ((Entry)o).toString();
                          return super.getListCellRendererComponent(list, name, index, isSelected, cellHasFocus);
                      }
                  });

                  list.addListSelectionListener(this);
    --- 350,366 ----
                  setName("tool.curr");
                  setBorder(uif.createTitledBorder("tool.curr"));
                  setLayout(new GridBagLayout());
                  uif.setToolTip(this, "tool.curr");

    !             listData = new DefaultListModel<>();
                  list = uif.createList("tool.list.curr", listData);
                  list.setVisibleRowCount(5);

                  list.setCellRenderer(new DefaultListCellRenderer() {
                      public Component getListCellRendererComponent(JList list, Object o, int index, boolean isSelected, boolean cellHasFocus) {
    !                     String name = o.toString();
                          return super.getListCellRendererComponent(list, name, index, isSelected, cellHasFocus);
                      }
                  });

                  list.addListSelectionListener(this);
    *** 419,429 ****

                  agentManager.addObserver(this);
              }

              public synchronized void valueChanged(ListSelectionEvent ev) {
    !             Entry e = (Entry)(list.getSelectedValue());
                  if (e == null) {
                      addressField.setText("");
                      tagField.setText("");
                      requestField.setText("");
                      execField.setText("");
    --- 419,429 ----

                  agentManager.addObserver(this);
              }

              public synchronized void valueChanged(ListSelectionEvent ev) {
    !             Entry e = list.getSelectedValue();
                  if (e == null) {
                      addressField.setText("");
                      tagField.setText("");
                      requestField.setText("");
                      execField.setText("");
    *** 468,478 ****

                      EventQueue.invokeLater(cmd);
                  }
                  else {
                      for (int i = 0; i < listData.size(); i++) {
    !                     Entry e = (Entry)(listData.elementAt(i));
                          if (e.connection == c) {
                              listData.removeElement(e);
                              break;
                          }
                      }   // for
    --- 468,478 ----

                      EventQueue.invokeLater(cmd);
                  }
                  else {
                      for (int i = 0; i < listData.size(); i++) {
    !                     Entry e = listData.elementAt(i);
                          if (e.connection == c) {
                              listData.removeElement(e);
                              break;
                          }
                      }   // for
    *** 502,513 ****
                  String executable;
                  String[] args;
                  boolean localizeArgs;
              }

    !         private JList list;
    !         private DefaultListModel listData;
              private Entry selectedEntry;
              private JLabel addressLabel;
              private JTextField addressField;
              private JLabel tagLabel;
              private JTextField tagField;
    --- 502,513 ----
                  String executable;
                  String[] args;
                  boolean localizeArgs;
              }

    !         private JList<Entry> list;
    !         private DefaultListModel<Entry> listData;
              private Entry selectedEntry;
              private JLabel addressLabel;
              private JTextField addressField;
              private JLabel tagLabel;
              private JTextField tagField;

< prev index next >