public void actionPerformed(ActionEvent e) { final IComponentIdentifier paid = (IComponentIdentifier)parent; IComponentIdentifier newparent = agentselector.selectAgent(paid); if(newparent!=null) setParent(newparent); } });
public void actionPerformed(ActionEvent e) { addSelected(); } });
/** * */ protected void addSelected() { if(!isTreeViewSelectionEmpty()) { IComponentIdentifier cid = getSelectedObject(); if(cid!=null) { addSelectedAgent(new ComponentIdentifier(cid.getName(), cid.getAddresses()), list); } } }
/** * Open a modal dialog to select/enter an agent identifier. * @return The selected agent identifier or null, when dialog was aborted. */ public IComponentIdentifier selectAgent(final IComponentIdentifier def) { this.singleselection = true; // Pre-init list of selected agents. this.sels = new DefaultListModel(); if(def!=null) { sels.addElement(def); } // Create dialog. JDialog dia = createDialog(); aborted = false; dia.setVisible(true); this.singleselection = false; disposeTreeView(); return !aborted && sels.size()>0 ? (IComponentIdentifier)sels.get(0) : null; }
final ComponentSelectorDialog agentselector = new ComponentSelectorDialog(this, access, cmshandler, null, iconcache); setsender.addActionListener(new ActionListener()
public void run() final ComponentSelectorDialog agentselector = new ComponentSelectorDialog(null, agent.getExternalAccess(), agent.getExternalAccess(), new CMSUpdateHandler(agent.getExternalAccess()), null, new ComponentIconCache(agent.getExternalAccess())); final IComponentIdentifier cid = agentselector.selectAgent(null); if(cid!=null)
this.comptree = createTreeView(); treepanel.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), getTreeViewName())); treepanel.add(comptree, new GridBagConstraints(0,0, 1,GridBagConstraints.REMAINDER, 1,1,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0)); seltreepanel.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), getSelectedListName())); ? new JDialog((Frame)parent, getDialogName(), true) : new JDialog((Dialog)parent, getDialogName(), true);
public void actionPerformed(ActionEvent e) { IComponentIdentifier[] aids = agentselector.selectAgents(receivers); if(aids!=null) { if(aids.length>0) { receivers = aids; tfreceivers.setText(SUtil.arrayToString(receivers)); tfreceivers.setCaretPosition(0); } else { receivers = null; tfreceivers.setText(""); } } if(comptree!=null) comptree.repaint(); } });
public void actionPerformed(ActionEvent e) { addSelectedAgent(new ComponentIdentifier("@"+access.getComponentIdentifier().getPlatformName(), (String[])null), list); } });
final ComponentSelectorDialog agentselector = new ComponentSelectorDialog(this, access, jccaccess, cmshandler, null, iconcache); setsender.addActionListener(new ActionListener()
/** * Select/edit a list of agents. * @return The (possibly empty) list of agent identifiers or null, when dialog was aborted. */ public IComponentIdentifier[] selectAgents(IComponentIdentifier[] receivers) { // Pre-init list of selected agents. this.sels = new DefaultListModel(); for(int i=0; receivers!=null && i<receivers.length; i++) sels.addElement(receivers[i]); // Create dialog. JDialog dia = createDialog(); aborted = false; dia.setVisible(true); disposeTreeView(); IComponentIdentifier[] ret = null; if(!aborted) { ret = new IComponentIdentifier[sels.size()]; sels.copyInto(ret); } return ret; }
public void actionPerformed(ActionEvent e) { IComponentIdentifier[] aids = agentselector.selectAgents(receivers); if(aids!=null) { if(aids.length>0) { receivers = aids; tfreceivers.setText(SUtil.arrayToString(receivers)); tfreceivers.setCaretPosition(0); } else { receivers = null; tfreceivers.setText(""); } } if(comptree!=null) comptree.repaint(); } });
public void actionPerformed(ActionEvent e) { IComponentIdentifier aid = agentselector.selectAgent(sender); if(aid!=null) { sender = aid; tfsender.setText(aid.toString()); tfsender.setCaretPosition(0); } } });
componentpanel.add(chooseparent, new GridBagConstraints(3, 1, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(2, 2, 0, 2), 0, 0)); final ComponentSelectorDialog agentselector = new ComponentSelectorDialog(this, jcc.getPlatformAccess(), jcc.getCMSHandler(), jcc.getPropertyHandler(), jcc.getIconCache()); chooseparent.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e) { IComponentIdentifier aid = agentselector.selectAgent(replyto); if(aid!=null) { replyto = aid; tfreplyto.setText(aid.toString()); tfreplyto.setCaretPosition(0); } } });
componentpanel.add(chooseparent, new GridBagConstraints(3, 1, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(2, 2, 0, 2), 0, 0)); final ComponentSelectorDialog agentselector = new ComponentSelectorDialog(this, jcc.getPlatformAccess(), jcc.getJCCAccess(), jcc.getCMSHandler(), jcc.getPropertyHandler(), jcc.getIconCache()); chooseparent.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e) { IComponentIdentifier aid = agentselector.selectAgent(sender); if(aid!=null) { sender = aid; tfsender.setText(aid.toString()); tfsender.setCaretPosition(0); } } });
final ComponentSelectorDialog csd = new ComponentSelectorDialog(ManagerFrame.this, access, access, cmsuh, null, new ComponentIconCache(access)); JButton dealerbut = new JButton("..."); dealerbut.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e) { IComponentIdentifier aid = agentselector.selectAgent(replyto); if(aid!=null) { replyto = aid; tfreplyto.setText(aid.toString()); tfreplyto.setCaretPosition(0); } } });
public void actionPerformed(ActionEvent e) { IComponentIdentifier cid = csd.selectAgent(dealeraid); if(cid!=null) { dealeraid = cid; dealertf.setText(cid.getName()); } } });