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
108109110111112113114115116117118
} public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) { } }); stylesViewer.setLabelProvider(new LabelProvider(){ public Image getImage( Object element ) { if (element instanceof StyleWrapper) { StyleWrapper styleWrapper = (StyleWrapper) element; List<FeatureTypeStyleWrapper> featureTypeStyles = styleWrapper.getFeatureTypeStylesWrapperList(); int iconSize = 48;
556557558559560561562563564565566
private File openSelectTemplateDialog() { final ListDialog selectDialog = new ListDialog(infoNewBtn.getShell()); selectDialog.setTitle(Messages.DocumentDialog_selectTemplateTitle); selectDialog.setMessage(Messages.DocumentDialog_selectTemplateMsg); selectDialog.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { final IDocument doc = (IDocument) element; return DocUtils.getLabelAndDescDisplay(DocUtils.getDocStr(doc), doc.getDescription());
641642643644645646647648649650651
infoGoActionLbl.setText(getLabel(Messages.DocumentDialog_actionLabel)); infoGoActionLbl.setLayoutData(""); //$NON-NLS-1$ infoGoAction = new ComboViewer(composite, SWT.READ_ONLY | SWT.DROP_DOWN); infoGoAction.getControl().setLayoutData("split 2"); //$NON-NLS-1$ infoGoAction.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { final HotlinkDescriptor descriptor = (HotlinkDescriptor) element; return descriptor.getLabel(); }
695696697698699700701702703704705
typeLbl.setLayoutData(""); //$NON-NLS-1$ type = new ComboViewer(composite, SWT.READ_ONLY | SWT.DROP_DOWN); type.getControl().setLayoutData(""); //$NON-NLS-1$ type.setContentProvider(ArrayContentProvider.getInstance()); type.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { return DocUtils.toCamelCase(element.toString()); } });
883884885886887888889890891892893
if (descriptors.size() > 1) { final ListDialog dialog = new ListDialog(openButton.getShell()); dialog.setTitle(Messages.DocumentView_openActionDialogTitle); dialog.setMessage(Messages.DocumentView_openActionDialogMessage); dialog.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { final HotlinkDescriptor descriptor = (HotlinkDescriptor) element; return DocUtils.getLabelAndDescDisplay(descriptor.getLabel(), descriptor.getDescription());
8485868788899091929394
// gridData = new GridData(SWT.FILL, SWT.FILL, true, true); // gridData.horizontalSpan = 2; // gridData.heightHint = 150; // gridData.widthHint = 175; paletteTable.setLabelProvider(new LabelProvider() { public Image getImage(Object element) { if (element instanceof BrewerPalette) { BrewerPalette palette = (BrewerPalette) element; return Glyph.palette(palette.getColors(palette.getMaxColors())).createImage(); }
240241242243244245246247248249250
} public void dispose() { // Nothing } }); colorMap.setLabelProvider(new LabelProvider(){ public String getText( Object element ) { return " " + element + " color"; } }); colorMap.setInput(COLOR_MAP_OPTS);
101102103104105106107108109110111
} public void dispose() { } }); colorMap.setLabelProvider(new LabelProvider(){ public String getText( Object element ) { return " " + element + " color"; } }); colorMap.setInput(COLOR_MAP_OPTS);
180181182183184185186187188189190
}); viewer.addCheckStateListener(new ResourceSelectionPageCheckStateListener()); viewer.setContentProvider(new ServiceTreeProvider()); titleDecorator = new ResolveTitlesDecorator(new ResolveLabelProviderSimple(), true); LabelProvider labelProvider = new DecoratingLabelProvider(titleDecorator.getSource(), titleDecorator); viewer.setLabelProvider(labelProvider); viewer.setAutoExpandLevel(3);
254255256257258259260261262263264
private static class WizardViewer extends TableViewer { public WizardViewer(Composite parent, int style) { super(parent, style); setContentProvider(new ArrayContentProvider()); setLabelProvider(new LabelProvider() { public String getText(Object object) { UDIGConnectionFactoryDescriptor descriptor = (UDIGConnectionFactoryDescriptor) object; return descriptor.getLabel(0); }