public JMeterServerPanel(String srvName, ServersListPanel aOwner) { super(); owner = aOwner; setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE)); setBorder(BorderFactory.createEtchedBorder()); add(new JLabel("Server Address: ")); add(serverName = new JTextField(srvName, 32)); add(new JLabel("Status: ")); add(new JLabel("unknown")); add(new JButton("Get Status")); JButton btnRemove = new JButton("Remove"); btnRemove.addActionListener(new RemoveServerAction(this)); add(btnRemove); }
public void actionPerformed(ActionEvent actionEvent) { owner.remove(); } }
public void saveToTestElement(DistributedTestControl te) { ArrayList<String> names = new ArrayList<String>(getCount()); for(JMeterServerPanel srv:serversList) { names.add(srv.getServerName()); } log.debug("Saving: " + names.toString()); te.setData(names); }
public void add(String stringValue) { JMeterServerPanel panel = new JMeterServerPanel(stringValue, this); serversList.add(panel); add(panel); getParent().repaint(); }
public void saveToTestElement(DistributedTestControl te) { ArrayList<String> names = new ArrayList<String>(getCount()); for(JMeterServerPanel srv:serversList) { names.add(srv.getServerName()); } log.debug("Saving: " + names.toString()); te.setData(names); }
public void add(String stringValue) { JMeterServerPanel panel = new JMeterServerPanel(stringValue, this); serversList.add(panel); add(panel); getParent().repaint(); }
public JMeterServerPanel(String srvName, ServersListPanel aOwner) { super(); owner = aOwner; setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE)); setBorder(BorderFactory.createEtchedBorder()); add(new JLabel("Server Address: ")); add(serverName = new JTextField(srvName, 32)); add(new JLabel("Status: ")); add(new JLabel("unknown")); add(new JButton("Get Status")); JButton btnRemove = new JButton("Remove"); btnRemove.addActionListener(new RemoveServerAction(this)); add(btnRemove); }
public void actionPerformed(ActionEvent actionEvent) { owner.remove(); } }