List of usage examples for org.eclipse.jface.viewers ListViewer getElementAt
public Object getElementAt(int index)
From source file:de.thischwa.pmcms.gui.composite.UnusedImageComp.java
License:LGPL
private void move(ListViewer srcList, ListViewer destList, int[] indices) { List<Object> objsToMove = new ArrayList<Object>(indices.length); for (int index : indices) { objsToMove.add(srcList.getElementAt(index)); }/* w ww. ja v a 2 s .co m*/ for (Object obj : objsToMove) { destList.add(obj); srcList.remove(obj); } }
From source file:org.eclipse.osee.framework.ui.skynet.util.email.EmailWizardPage.java
License:Open Source License
public String[] getEmails(ListViewer list) throws OseeCoreException { ArrayList<String> emails = new ArrayList<String>(); for (int x = 0; x < list.getList().getItemCount(); x++) { Object obj = list.getElementAt(x); if (obj instanceof User) { emails.add(((User) obj).getEmail()); } else if (obj instanceof String) { emails.add(((String) obj)); } else if (obj instanceof EmailGroup) { emails.addAll(((EmailGroup) obj).getEmails()); }//from ww w.ja v a 2 s. com } return emails.toArray(new String[emails.size()]); }