Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.DecorationOverlayIcon


    if (bookmark.isErrorLoading()) {

      /* Overlay with Error Icon if required */
      if (favicon != null) {
        Image faviconImg = OwlUI.getImage(fResources, favicon);
        DecorationOverlayIcon overlay = new DecorationOverlayIcon(faviconImg, OwlUI.getImageDescriptor("icons/ovr16/error.gif"), IDecoration.BOTTOM_RIGHT); //$NON-NLS-1$
        return OwlUI.getImage(fResources, overlay);
      }

      /* Default Error Icon */
      return fBookMarkErrorIcon;
    }

    /* Use normal Icon */
    Image icon = favicon != null ? OwlUI.getImage(fResources, favicon) : fBookMarkIcon;

    /* Overlay if News are *new* */
    if (hasNew) {
      DecorationOverlayIcon overlay = new DecorationOverlayIcon(icon, OwlUI.getImageDescriptor("icons/ovr16/new.gif"), IDecoration.BOTTOM_RIGHT); //$NON-NLS-1$
      return OwlUI.getImage(fResources, overlay);
    }

    /* Don't overlay */
    return icon;
View Full Code Here


      if (bookmark.isErrorLoading()) {

        /* Overlay with Error Icon if required */
        if (favicon != null) {
          Image faviconImg = OwlUI.getImage(fResources, favicon);
          DecorationOverlayIcon overlay = new DecorationOverlayIcon(faviconImg, OwlUI.getImageDescriptor("icons/ovr16/error.gif"), IDecoration.BOTTOM_RIGHT);
          cell.setImage(OwlUI.getImage(fResources, overlay));
        }

        /* Default Error Icon */
        else {
          cell.setImage(fBookMarkErrorIcon);
        }
      }

      /* Use normal Icon */
      else {
        Image icon = favicon != null ? OwlUI.getImage(fResources, favicon) : fBookMarkIcon;

        /* Overlay if News are *new* */
        if (hasNew && INDICATE_NEW) {
          DecorationOverlayIcon overlay = new DecorationOverlayIcon(icon, OwlUI.getImageDescriptor("icons/ovr16/new.gif"), IDecoration.BOTTOM_RIGHT);
          cell.setImage(OwlUI.getImage(fResources, overlay));
        }

        /* Don't overlay */
        else {
View Full Code Here

      if (bookmark.isErrorLoading()) {

        /* Overlay with Error Icon if required */
        if (favicon != null) {
          Image faviconImg = OwlUI.getImage(fResources, favicon);
          DecorationOverlayIcon overlay = new DecorationOverlayIcon(faviconImg, OwlUI.getImageDescriptor("icons/ovr16/error.gif"), IDecoration.BOTTOM_RIGHT);
          cell.setImage(OwlUI.getImage(fResources, overlay));
        }

        /* Default Error Icon */
        else {
          cell.setImage(fBookMarkErrorIcon);
        }
      }

      /* Use normal Icon */
      else {
        Image icon = favicon != null ? OwlUI.getImage(fResources, favicon) : fBookMarkIcon;

        /* Overlay if News are *new* */
        if (hasNew) {
          DecorationOverlayIcon overlay = new DecorationOverlayIcon(icon, OwlUI.getImageDescriptor("icons/ovr16/new.gif"), IDecoration.BOTTOM_RIGHT);
          cell.setImage(OwlUI.getImage(fResources, overlay));
        }

        /* Don't overlay */
        else {
View Full Code Here

      if (!hasNewNews)
        return (favicon != null) ? favicon : OwlUI.BOOKMARK;

      /* Overlay if News are *new* */
      Image base = (favicon != null) ? OwlUI.getImage(fgResources, favicon) : OwlUI.getImage(fgResources, OwlUI.BOOKMARK);
      DecorationOverlayIcon overlay = new DecorationOverlayIcon(base, OwlUI.getImageDescriptor("icons/ovr16/new.gif"), IDecoration.BOTTOM_RIGHT); //$NON-NLS-1$
      return overlay;
    }

    /* Saved Search */
    else if (child instanceof ISearchMark) {
View Full Code Here

            firePropertyChange(PROP_TITLE);
            if (overlaidTitleImageDescriptor != null)
                JFaceResources.getResources().destroyImage(overlaidTitleImageDescriptor);
            overlaidTitleImageDescriptor = null;
        } else {
            DecorationOverlayIcon newOverlaidDesc = new DecorationOverlayIcon(titleImage, overlay, IDecoration.BOTTOM_LEFT);
            overlaidTitleImage = JFaceResources.getResources().createImage(newOverlaidDesc);
            firePropertyChange(PROP_TITLE);
            if (overlaidTitleImageDescriptor != null)
                JFaceResources.getResources().destroyImage(overlaidTitleImageDescriptor);
            overlaidTitleImageDescriptor = newOverlaidDesc;
View Full Code Here

        // Load the icons
        ImageDescriptor baseImageDesc = strIcon != null ? AbstractUIPlugin.imageDescriptorFromPlugin(cfig.getContributor().getName(), strIcon) : null;
        imgTitleBase = baseImageDesc != null ? baseImageDesc.createImage() : getDefaultImage();

        ImageDescriptor imgWarningOverlay = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/warning_co.gif");
        DecorationOverlayIcon warningImageDesc = new DecorationOverlayIcon(imgTitleBase, imgWarningOverlay, IDecoration.BOTTOM_LEFT);
        imgTitleWarning = warningImageDesc.createImage();

        ImageDescriptor imgErrorOverlay = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "icons/error_co.gif");
        DecorationOverlayIcon errorImageDesc = new DecorationOverlayIcon(imgTitleBase, imgErrorOverlay, IDecoration.BOTTOM_LEFT);
        imgTitleError = errorImageDesc.createImage();

        titleImage = imgTitleBase;
    }
View Full Code Here

        if (element instanceof IModule) {
          IModule module = (IModule) element;
          CloudFoundryApplicationModule appModule = editorPage.getCloudServer()
              .getExistingCloudModule(module);
          if (appModule != null && appModule.getErrorMessage() != null) {
            return CloudFoundryImages.getImage(new DecorationOverlayIcon(image,
                CloudFoundryImages.OVERLAY_ERROR, IDecoration.BOTTOM_LEFT));
          }
        }

        return image;
View Full Code Here

                }
            }
        };
        cleanAction.setText("Clean Publish...");
        cleanAction.setToolTipText("Clean and Publish...");
        ImageDescriptor cleanAndPublishImageDesc = new DecorationOverlayIcon(
                ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_PUBLISH).createImage(),
                ImageDescriptor.createFromFile(SharedImages.class, "refresh.gif"), IDecoration.BOTTOM_RIGHT);
        cleanAction.setImageDescriptor(cleanAndPublishImageDesc);
        cleanAction.setId("org.apache.sling.ide.eclipse.ui.actions.CleanPublishAction");
        publishAction = new Action("Publish", IAction.AS_PUSH_BUTTON) {
View Full Code Here

   */

  Image applyDescriptors(Image source, ImageDescriptor[] descriptors) {
    Rectangle bounds = source.getBounds();
    Point size = new Point(bounds.width, bounds.height);
    DecorationOverlayIcon icon = new DecorationOverlayIcon(source, descriptors, size);
    return getImageFor(icon);
  }
View Full Code Here

        switch (overlay)
        {
            case STATIC: overlayDescr = DESC_OVERLAY_STATIC; quadrant = IDecoration.TOP_RIGHT; break;
            case WARNING: overlayDescr = DESC_OVERLAY_WARNING; break;
        }
        return new DecorationOverlayIcon(descr.createImage(), overlayDescr, quadrant);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.DecorationOverlayIcon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.