toString
null
This class may be used as is, or subclassed to provide richer labels. Subclasses may override any of the following methods:
isLabelProperty
getImage
getText
dispose
180181182183184185186187188189190
edit.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); remove.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); // Table Viewer viewer = new TableViewer(table); viewer.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { IPackageImport pi = (IPackageImport) element;
7071727374757677787980
Table table = new Table(composite, SWT.MULTI | SWT.BORDER); // Table Viewer Setup repositoryView = new TableViewer(table); repositoryView.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { IRepositoryModel rep = (IRepositoryModel) element;
6768697071727374757677
control.setLayout(new GridLayout(1, true)); table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); // view repositoryView = new TableViewer(table); repositoryView.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { IRepositoryType rep = (IRepositoryType) element;
294295296297298299300301302303304
} super.okPressed(); } private ILabelProvider createLabelPrivder() { return new LabelProvider() { @Override public Image getImage(final Object element) { return null; }
6162636465666768697071
checkboxTableViewer = CheckboxTableViewer.newCheckList(this, SWT.BORDER); layoutData = new GridData(GridData.FILL_BOTH); layoutData.heightHint = 90; layoutData.widthHint = 180; checkboxTableViewer.getTable().setLayoutData(layoutData); checkboxTableViewer.setLabelProvider(new LabelProvider() { @Override public String getText(final Object element) { if (element instanceof String) { return (String) element;
267268269270271272273274275276277
@Override public Object[] getElements(final Object inputElement) { return fProviderDescriptors.values().toArray(); } }); viewer.setLabelProvider(new LabelProvider() { /* * @see * org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object * )
446447448449450451452453454455456
loadConfigButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { final ElementListSelectionDialog dialog = new SelectConfigurationDialog( parent.getShell(), new LabelProvider()); dialog.setElements(ConfigurationManager.getTPConfigs()); dialog.open(); final String result = (String) dialog.getFirstResult(); if (result != null) { patternsConfigName = result;
675676677678679680681682683684685
loadConfigButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { final ElementListSelectionDialog dialog = new SelectConfigurationDialog( parent.getShell(), new LabelProvider()); dialog.setElements(ConfigurationManager.getNodesConfig()); dialog.open(); final String result = (String) dialog.getFirstResult(); if (result != null) { nodesConfigName = result;
276277278279280281282283284285286
e.printStackTrace(); } } }); viewer.setLabelProvider(new LabelProvider() { public Image getImage(Object element) { return getDefaultImage(); }
36373839404142
* dynamically to reflect chances to the source {@link EventList}. The * {@link String} values displayed in the {@link Combo} compoment will be * the result of calling toString() on the Objects found in source. */ public EventComboViewer(EventList<E> source, Combo combo) { this(source, combo, new LabelProvider()); }