/** Implementation of ActionListener interface. */ public void actionPerformed(ActionEvent e) { // Determine which button was pressed. Object source = e.getSource(); if (source instanceof Button) { Button bpressed = (Button)source; if(bpressed==bSyncAll) { if (wList == null) return; // Select all items on list. Vector v = new Vector(); Integer I; for(int i=0; i<wList.getItemCount();++i) { wList.select(i); I = (Integer)vListMap.elementAt(i); v.addElement(I); } addWindows(v); } else if(bpressed==bUnsyncAll) { removeAllWindows(); } } else if (wList != null && source == wList) { // Doubleclick on entry in wList addSelections(); } }
/** Implementation of ActionListener interface. */ public void actionPerformed(ActionEvent e) { // Determine which button was pressed. Object source = e.getSource(); if (source instanceof Button) { Button bpressed = (Button)source; if(bpressed==bSyncAll) { if (wList == null) return; // Select all items on list. Vector v = new Vector(); Integer I; for(int i=0; i<wList.getItemCount();++i) { wList.select(i); I = (Integer)vListMap.elementAt(i); v.addElement(I); } addWindows(v); } else if(bpressed==bUnsyncAll) { removeAllWindows(); } } else if (wList != null && source == wList) { // Doubleclick on entry in wList addSelections(); } }
/** Override parent windowClosing method to clean up synchronized resources on exit. */ public void windowClosing(WindowEvent e) { if(e.getSource() == this) { removeAllWindows(); ImagePlus.removeImageListener(this); Executer.removeCommandListener(this); close(); } }
/** Override parent windowClosing method to clean up synchronized resources on exit. */ public void windowClosing(WindowEvent e) { if(e.getSource() == this) { removeAllWindows(); ImagePlus.removeImageListener(this); Executer.removeCommandListener(this); close(); } }