public void actionPerformed(ActionEvent e) { String com = e.getActionCommand(); if (com.equals("user")) { String user1 = userField.getSelected(); String view1 = viewField.getSelected(); viewField.setValues(areas.get(user1)); if (areas.get(user1).contains(view1)) viewField.setSelected(view1); try { w = new Wrapper(user1, viewField.getSelected(), toolsetField.getSelected(), mclient); } catch (PipelineException e1) { e1.printStackTrace(); System.exit(1); } } else if (com.equals("wrap")) { try { w = new Wrapper( userField.getSelected(), viewField.getSelected(), toolsetField.getSelected(), mclient); } catch (PipelineException e1) { e1.printStackTrace(); System.exit(1); } } else if (com.equals("proj")) { project = projectField.getSelected(); } else if (com.equals("add")) { list.add(assetChoiceBox()); diag.validate(); } else if (com.equals("type")) { JCollectionField eventSrc = (JCollectionField) e.getSource(); Collection<String> curList = getCorrectList(eventSrc.getSelected()); Box can = (Box) eventSrc.getParent(); JCollectionField oldList = ((JCollectionField) can.getComponent(2)); oldList.setValues(curList); JCollectionField newList = (JCollectionField) can.getComponent(4); newList.setValues(curList); } } // end actionPerformed