List of usage examples for org.eclipse.jface.viewers IDecoration BOTTOM_RIGHT
int BOTTOM_RIGHT
To view the source code for org.eclipse.jface.viewers IDecoration BOTTOM_RIGHT.
Click Source Link
From source file:at.medevit.plugin.alpha.decorator.ListElementDecorator.java
License:Open Source License
@Override public Image decorateImage(Image image, Object element) { if (element.equals(PartAlpha.objects[1])) { return new DecorationOverlayIcon(image, Icon.OVERLAY_ERROR.getImageDescriptor(IconSize._7x8_OverlayIconSize), IDecoration.BOTTOM_RIGHT) .createImage();/*w ww.java 2s. c o m*/ } return null; }
From source file:au.gov.ga.earthsci.catalog.part.CatalogTreeLabelProvider.java
License:Apache License
private Image getDecoratedIcon(Image base) { String key = base.hashCode() + ""; //$NON-NLS-1$ if (base.isDisposed()) { decoratedImageCache.remove(key); return null; }/* w w w .ja va 2 s . c o m*/ Image decorated = decoratedImageCache.get(key); if (decorated != null) { return decorated; } decorated = new DecorationOverlayIcon(base, ImageRegistry.getInstance().getDescriptor(ImageRegistry.DECORATION_INCLUDED), IDecoration.BOTTOM_RIGHT).createImage(); decoratedImageCache.put(key, decorated); return decorated; }
From source file:ch.elexis.core.ui.contacts.decorator.ContactTypeDecorator.java
License:Open Source License
@Override public void decorate(Object element, IDecoration decoration) { IContact contact = (IContact) element; if (contact.isDeleted()) { ImageDescriptor deleted = Images.IMG_DELETE.getImageDescriptor(); decoration.addOverlay(deleted, IDecoration.TOP_LEFT); }//from w w w. j ava 2 s .co m if (contact.isMandator()) { ImageDescriptor vip = Images.IMG_VIP_OVERLAY.getImageDescriptor(); decoration.addOverlay(vip, IDecoration.BOTTOM_RIGHT); } if (contact.isUser()) { FieldDecoration info = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION); ImageDescriptor infoD = ImageDescriptor.createFromImage(info.getImage()); decoration.addOverlay(infoD, IDecoration.BOTTOM_LEFT); } }
From source file:com.android.sdkuilib.internal.widgets.AvdSelector.java
License:Apache License
@NonNull private Image getTagImage(IdDisplay tag, final boolean isOk, final boolean isRepair, final boolean isInvalid) { if (tag == null) { tag = SystemImage.DEFAULT_TAG;//w w w. j a v a 2 s . c o m } String fname = String.format("tag_%s_32.png", tag.getId()); String kname = String.format("%d%d%d_%s", (isOk ? 1 : 0), (isRepair ? 1 : 0), (isInvalid ? 1 : 0), fname); return mImageFactory.getImageByName(fname, kname, new Filter() { @Override public Image filter(Image source) { // We don't need an overlay for good AVDs. if (isOk) { return source; } Image overlayImg = isRepair ? mBrokenImage : mInvalidImage; ImageDescriptor overlayDesc = ImageDescriptor.createFromImage(overlayImg); DecorationOverlayIcon overlaid = new DecorationOverlayIcon(source, overlayDesc, IDecoration.BOTTOM_RIGHT); return overlaid.createImage(); } }); }
From source file:com.astra.ses.spell.gui.model.outline.OutlineDecorator.java
License:Open Source License
@Override public Image decorateImage(Image image, Object element) { OutlineNode node = (OutlineNode) element; Image result = null;/*from w w w . j a va 2s. co m*/ switch (node.getType()) { case CATEGORY: DecorationOverlayIcon icon = new DecorationOverlayIcon(image, m_categoryImage, IDecoration.BOTTOM_RIGHT); result = icon.createImage(); break; default: break; } return result; }
From source file:com.cloudbees.eclipse.dev.ui.views.build.RecentChangesLabelProvider.java
License:Open Source License
public RecentChangesLabelProvider() { super();/*ww w. j av a 2 s .c o m*/ this.imgAdded = new DecorationOverlayIcon(CloudBeesDevUiPlugin.getImage(CBDEVImages.IMG_FILE), CloudBeesDevUiPlugin.getImageDescription(CBDEVImages.IMG_FILE_ADDED), IDecoration.BOTTOM_RIGHT) .createImage(); this.imgDeleted = new DecorationOverlayIcon(CloudBeesDevUiPlugin.getImage(CBDEVImages.IMG_FILE), CloudBeesDevUiPlugin.getImageDescription(CBDEVImages.IMG_FILE_DELETED), IDecoration.BOTTOM_RIGHT) .createImage(); this.imgModified = new DecorationOverlayIcon(CloudBeesDevUiPlugin.getImage(CBDEVImages.IMG_FILE), CloudBeesDevUiPlugin.getImageDescription(CBDEVImages.IMG_FILE_MODIFIED), IDecoration.BOTTOM_RIGHT) .createImage(); this.imgChangeSet = this.IMG_DESC_CHANGESET.createImage(); }
From source file:com.github.sdbg.debug.ui.internal.presentation.SDBGDebugModelPresentation.java
License:Open Source License
/** * This method allows us to customize images for Dart objects that are displayed in the debugger. */// w w w . ja v a 2s . c om @Override public Image getImage(Object element) { try { if (element instanceof ISDBGVariable) { ISDBGVariable variable = (ISDBGVariable) element; if (variable.isThrownException()) { return SDBGDebugUIPlugin.getImage("obj16/object_exception.png"); } else if (variable.isThisObject()) { return SDBGDebugUIPlugin.getImage("obj16/object_this.png"); } else if (variable.isLibraryObject()) { return SDBGDebugUIPlugin.getImage("obj16/object_library.png"); } else if (variable.isStatic()) { return SDBGDebugUIPlugin.getImage("obj16/object_static.png"); } else if (variable.isLocal()) { return SDBGDebugUIPlugin.getImage("obj16/object_local.gif"); } else { return SDBGDebugUIPlugin.getImage("obj16/object_obj.png"); } } else if (element instanceof ISDBGStackFrame) { ISDBGStackFrame frame = (ISDBGStackFrame) element; //&&&!!! Image image = SDBGDebugUIPlugin.getImage("obj16/field_public.png"); // TODO: Copy over the images for methods //&&& // Image image = DartDebugUIPlugin.getImage(DartElementImageProvider.getMethodImageDescriptor( // false, // frame.isPrivate())); if (frame.isUsingSourceMaps()) { DecorationOverlayIcon overlayDescriptor = new DecorationOverlayIcon(image, SDBGDebugUIPlugin.getImageDescriptor("ovr16/mapped.png"), IDecoration.BOTTOM_RIGHT); image = SDBGDebugUIPlugin.getImage(overlayDescriptor); } return image; } else { return null; } } catch (Throwable t) { SDBGDebugUIPlugin.logError(t); return null; } }
From source file:com.github.sdbg.debug.ui.internal.view.DebuggerView.java
License:Open Source License
@Override public void createPartControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(composite); toolbar = new ToolBar(composite, SWT.HORIZONTAL); GridDataFactory.fillDefaults().grab(true, false).applyTo(toolbar); Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); GridDataFactory.fillDefaults().grab(true, false).applyTo(separator); sashForm = new SashForm(composite, SWT.VERTICAL); GridDataFactory.fillDefaults().grab(true, true).applyTo(sashForm); super.createPartControl(sashForm); ISelectionProvider selProvider = getViewSite().getSelectionProvider(); variablesView = new DartVariablesView(); try {/*from w w w .j ava 2 s. c om*/ variablesView.init(getViewSite()); } catch (PartInitException ex) { DartUtil.logError(ex); } variablesView.createPartControl(sashForm); if (getViewSite().getSelectionProvider() != selProvider) { getViewSite().setSelectionProvider(selProvider); } variablesView.becomesVisible(); showInspectorAction.setSelectionProvider(variablesView); restoreSashWeights(getMemento()); updateSashOrientation(sashForm); sashForm.addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { updateSashOrientation(sashForm); } }); IActionBars actionBars = getViewSite().getActionBars(); actionBars.getMenuManager().removeAll(); configureViewToolBar(actionBars.getToolBarManager()); DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); if (CONNECTED_IMAGE == null) { NOT_CONNECTED_IMAGE = SDBGDebugUIPlugin.getImage("obj16/debug_exc.gif"); CONNECTED_IMAGE = SDBGDebugUIPlugin.getImage(new DecorationOverlayIcon(NOT_CONNECTED_IMAGE, SDBGDebugUIPlugin.getImageDescriptor("ovr16/play.png"), IDecoration.BOTTOM_RIGHT)); } updateConnectionStatus(); }
From source file:com.google.dart.tools.debug.ui.internal.view.DebuggerView.java
License:Open Source License
@Override public void createPartControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(composite); toolbar = new ToolBar(composite, SWT.HORIZONTAL); GridDataFactory.fillDefaults().grab(true, false).applyTo(toolbar); Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); GridDataFactory.fillDefaults().grab(true, false).applyTo(separator); sashForm = new SashForm(composite, SWT.VERTICAL); GridDataFactory.fillDefaults().grab(true, true).applyTo(sashForm); super.createPartControl(sashForm); ISelectionProvider selProvider = getViewSite().getSelectionProvider(); variablesView = new DartVariablesView(); try {//from w ww . j av a 2s . c om variablesView.init(getViewSite()); } catch (PartInitException ex) { DartUtil.logError(ex); } variablesView.createPartControl(sashForm); if (getViewSite().getSelectionProvider() != selProvider) { getViewSite().setSelectionProvider(selProvider); } variablesView.becomesVisible(); restoreSashWeights(getMemento()); IActionBars actionBars = getViewSite().getActionBars(); actionBars.getMenuManager().removeAll(); configureViewToolBar(actionBars.getToolBarManager()); DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); if (CONNECTED_IMAGE == null) { NOT_CONNECTED_IMAGE = DartDebugUIPlugin.getImage("obj16/debug_exc.gif"); CONNECTED_IMAGE = DartDebugUIPlugin.getImage(new DecorationOverlayIcon(NOT_CONNECTED_IMAGE, DartDebugUIPlugin.getImageDescriptor("ovr16/play.png"), IDecoration.BOTTOM_RIGHT)); } updateConnectionStatus(); }
From source file:com.google.dart.tools.ui.internal.filesview.FilesViewLightweightDecorator.java
License:Open Source License
@Override public void decorate(Object element, IDecoration decoration) { if (element instanceof IFileStore) { IFileStore fileStore = (IFileStore) element; if (fileStore.fetchInfo().getAttribute(EFS.ATTRIBUTE_READ_ONLY)) { decoration.addOverlay(DESC_READ_ONLY, IDecoration.BOTTOM_RIGHT); }/*from w w w . j a va2s.co m*/ } else if (element instanceof IFile) { IFile file = (IFile) element; try { DartElement dartElement = DartCore.create(file); if (dartElement != null) { if (file.equals(dartElement.getDartProject().getCorrespondingResource())) { decoration.addOverlay(DESC_READ_ONLY, IDecoration.BOTTOM_RIGHT); } } } catch (CoreException exception) { //ignore } } }