org.eclipse.jface.viewers.ILabelDecorator Java Examples
The following examples show how to use
org.eclipse.jface.viewers.ILabelDecorator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ContactSelectorView.java From elexis-3-core with Eclipse Public License 1.0 | 6 votes |
protected DataBindingContext initDataBindings(){ DataBindingContext bindingContext = new DataBindingContext(); tableViewerContacts.setContentProvider(contentProvider); IObservableMap[] observeMaps = BeansObservables.observeMaps(contentProvider.getKnownElements(), IContact.class, new String[] { "description1", "description2", "mandator", "patient", "user" }); ILabelDecorator decorator = PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(); tableViewerContacts.setLabelProvider(new TableDecoratingLabelProvider( new ContactSelectorObservableMapLabelProvider(observeMaps), decorator)); tableViewerContacts.setInput(contactList); return bindingContext; }
Example #2
Source File: SVNSynchronizeParticipant.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
protected void initializeConfiguration(ISynchronizePageConfiguration configuration) { super.initializeConfiguration(configuration); ILabelDecorator labelDecorator = new SVNParticipantLabelDecorator(); configuration.addLabelDecorator(labelDecorator); configuration.addMenuGroup(ISynchronizePageConfiguration.P_TOOLBAR_MENU, TOOLBAR_CONTRIBUTION_GROUP); // Add support for showing mode buttons configuration.setSupportedModes(ISynchronizePageConfiguration.ALL_MODES); configuration.setMode(ISynchronizePageConfiguration.BOTH_MODE); // Create the action group that contributes the get and put actions configuration.addActionContribution(new SVNParticipantActionGroup()); // Add the get and put group to the context menu configuration.addMenuGroup( ISynchronizePageConfiguration.P_CONTEXT_MENU, CONTEXT_MENU_CONTRIBUTION_GROUP_1); }
Example #3
Source File: JavaUILabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
protected String decorateText(String text, Object element) { if (fLabelDecorators != null && text.length() > 0) { for (int i= 0; i < fLabelDecorators.size(); i++) { ILabelDecorator decorator= fLabelDecorators.get(i); String decorated= decorator.decorateText(text, element); if (decorated != null) { text= decorated; } } } return text; }
Example #4
Source File: ConfigurationWizardDialog.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
private void createPageChooserComposite(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayoutData(GridDataFactory.fillDefaults().span(1, 2).create()); composite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(5, 10).create()); pageChooserViewer = new TableViewer(composite, SWT.BORDER | SWT.FULL_SELECTION); pageChooserViewer.getTable().setLayoutData( GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.FILL).grab(false, true).create()); pageChooserViewer.setContentProvider(new WizardPageContentProvider()); ILabelDecorator decorator = new WizardPageDecorator(this); pageChooserViewer.setLabelProvider(new DecoratingLabelProvider(new WizardPageLabelProvider(this), decorator)); pageChooserViewer.setInput(getWizard().getPages()); pageChooserViewer.addFilter(new ViewerFilter() { @Override public boolean select(Viewer viewer, Object parentElement, Object element) { IProcessConfigurationWizardPage page = (IProcessConfigurationWizardPage) element; if (!isSimpleMode) { return true; } return page.isDefault() || page.isConfigurationPageValid(getConfiguration()) != null; } }); pageChooserViewer.addSelectionChangedListener(this); pageChooserViewer.getTable().setEnabled(false); addPageChangedListener(this); }
Example #5
Source File: JavaUILabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public static ILabelDecorator[] getDecorators(boolean errortick, ILabelDecorator extra) { if (errortick) { if (extra == null) { return new ILabelDecorator[] {}; } else { return new ILabelDecorator[] { extra }; } } if (extra != null) { return new ILabelDecorator[] { extra }; } return null; }
Example #6
Source File: JavaUILabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public void removeListener(ILabelProviderListener listener) { if (fLabelDecorators != null) { for (int i= 0; i < fLabelDecorators.size(); i++) { ILabelDecorator decorator= fLabelDecorators.get(i); decorator.removeListener(listener); } } fListeners.remove(listener); }
Example #7
Source File: JavaUILabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public void addListener(ILabelProviderListener listener) { if (fLabelDecorators != null) { for (int i= 0; i < fLabelDecorators.size(); i++) { ILabelDecorator decorator= fLabelDecorators.get(i); decorator.addListener(listener); } } fListeners.add(listener); }
Example #8
Source File: JavaUILabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public void dispose() { if (fLabelDecorators != null) { for (int i= 0; i < fLabelDecorators.size(); i++) { ILabelDecorator decorator= fLabelDecorators.get(i); decorator.dispose(); } fLabelDecorators= null; } fStorageLabelProvider.dispose(); fImageLabelProvider.dispose(); }
Example #9
Source File: JavaUILabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
protected Image decorateImage(Image image, Object element) { if (fLabelDecorators != null && image != null) { for (int i= 0; i < fLabelDecorators.size(); i++) { ILabelDecorator decorator= fLabelDecorators.get(i); image= decorator.decorateImage(image, element); } } return image; }
Example #10
Source File: JavaUILabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Adds a decorator to the label provider * @param decorator the decorator to add */ public void addLabelDecorator(ILabelDecorator decorator) { if (fLabelDecorators == null) { fLabelDecorators= new ArrayList<ILabelDecorator>(2); } fLabelDecorators.add(decorator); }
Example #11
Source File: SelectModulaSourceFileDialog.java From xds-ide with Eclipse Public License 1.0 | 5 votes |
public StyledDecoratingLabelProvider(ILabelProvider provider, ILabelDecorator decorator) { super(provider, decorator); boldStyler = new Styler() { @Override public void applyStyles(TextStyle textStyle) { textStyle.font= getBoldFont(); } }; }
Example #12
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 5 votes |
/** * Sets new selection decorator. * * @param newSelectionDecorator * new label decorator for selected items in the list */ public void setSelectionDecorator(ILabelDecorator newSelectionDecorator) { if (selectionDecorator != null) { selectionDecorator.removeListener(this); selectionDecorator.dispose(); } selectionDecorator = newSelectionDecorator; if (selectionDecorator != null) { selectionDecorator.addListener(this); } }
Example #13
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 5 votes |
/** * Creates a new instance of the class. * * @param provider * the label provider for all items, not <code>null</code> * @param selectionDecorator * the decorator for selected items, can be <code>null</code> */ public ItemsListLabelProvider(ILabelProvider provider, ILabelDecorator selectionDecorator) { Assert.isNotNull(provider); this.provider = provider; this.selectionDecorator = selectionDecorator; setOwnerDrawEnabled(showColoredLabels() && provider instanceof IStyledLabelProvider); provider.addListener(this); if (selectionDecorator != null) { selectionDecorator.addListener(this); } }
Example #14
Source File: ColoringLabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public ColoringLabelProvider(IStyledLabelProvider labelProvider, ILabelDecorator decorator, IDecorationContext decorationContext) { super(labelProvider, decorator, decorationContext); }
Example #15
Source File: TableDecoratingLabelProvider.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
/** * @param provider * @param decorator */ public TableDecoratingLabelProvider(ILabelProvider provider, ILabelDecorator decorator){ super(provider, decorator); this.provider = (ITableLabelProvider) provider; this.decorator = decorator; }
Example #16
Source File: LangNavigatorLabelProvider.java From goclipse with Eclipse Public License 1.0 | 4 votes |
protected Image decorateImage(Image image, Object element) { for(ILabelDecorator labelDecorator : labelDecorators) { image = labelDecorator.decorateImage(image, element); } return image; }
Example #17
Source File: LangNavigatorLabelProvider.java From goclipse with Eclipse Public License 1.0 | 4 votes |
@Override public void dispose() { for(ILabelDecorator labelDecorator : labelDecorators) { labelDecorator.dispose(); } }
Example #18
Source File: LabelProviderWithDecoration.java From Pydev with Eclipse Public License 1.0 | 4 votes |
public LabelProviderWithDecoration(IStyledLabelProvider labelProvider, ILabelDecorator decorator, IDecorationContext decorationContext) { super(labelProvider, decorator, decorationContext); this.labelProvider = (ILabelProvider) labelProvider; }
Example #19
Source File: AbstractSARLUiModule.java From sarl with Apache License 2.0 | 4 votes |
public void configureDiagnosticDecorator(Binder binder) { binder.bind(ILabelDecorator.class).annotatedWith(Names.named("DiagnosticDecorator")).to(SARLDiagnosticLabelDecorator.class); }
Example #20
Source File: JavaNavigatorLabelProvider.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void addLabelDecorator(ILabelDecorator decorator) { delegeteLabelProvider.addLabelDecorator(decorator); }
Example #21
Source File: SvnWizardSwitchPage.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public TableDecoratingLabelProvider(ILabelProvider provider, ILabelDecorator decorator) { super(provider, decorator); this.provider = (ITableLabelProvider) provider; this.decorator = decorator; }
Example #22
Source File: ColorDecoratingLabelProvider.java From lapse-plus with GNU General Public License v3.0 | 4 votes |
public ColorDecoratingLabelProvider(ILabelProvider provider, ILabelDecorator decorator) { super(provider, decorator); }
Example #23
Source File: BranchTagWizardRepositoryPage.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public TableDecoratingLabelProvider(ILabelProvider provider, ILabelDecorator decorator) { super(provider, decorator); this.provider = (ITableLabelProvider) provider; this.decorator = decorator; }
Example #24
Source File: SvnWizardCompareMultipleResourcesWithBranchTagPage.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public TableDecoratingLabelProvider(ILabelProvider provider, ILabelDecorator decorator) { super(provider, decorator); this.provider = (ITableLabelProvider) provider; this.decorator = decorator; }
Example #25
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 2 votes |
/** * Sets the label decorator for selected items in the list. * * @param listSelectionLabelDecorator * the label decorator for selected items in the list */ public void setListSelectionLabelDecorator( ILabelDecorator listSelectionLabelDecorator) { getItemsListLabelProvider().setSelectionDecorator( listSelectionLabelDecorator); }
Example #26
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 2 votes |
/** * Gets selection decorator. * * @return the label decorator for selected items in the list */ public ILabelDecorator getSelectionDecorator() { return selectionDecorator; }
Example #27
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 2 votes |
/** * Returns the label decorator for selected items in the list. * * @return the label decorator for selected items in the list */ private ILabelDecorator getListSelectionLabelDecorator() { return getItemsListLabelProvider().getSelectionDecorator(); }
Example #28
Source File: PackageExplorerPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 2 votes |
/** * Sets the decorator for the package explorer. * * @param decorator a label decorator or <code>null</code> for no decorations. * @deprecated To be removed */ @Deprecated public void setLabelDecorator(ILabelDecorator decorator) { }