Example usage for org.eclipse.jface.resource ImageDescriptor createFromImage

List of usage examples for org.eclipse.jface.resource ImageDescriptor createFromImage

Introduction

In this page you can find the example usage for org.eclipse.jface.resource ImageDescriptor createFromImage.

Prototype

public static ImageDescriptor createFromImage(Image img) 

Source Link

Document

Creates and returns a new image descriptor for the given image.

Usage

From source file:org.iviPro.editors.annotationeditor.components.contenteditors.richtext.actions.OutdentAction.java

License:Open Source License

public OutdentAction(HtmlComposer composer) {
    super("Outdent", IAction.AS_PUSH_BUTTON, composer); //$NON-NLS-1$
    setImageDescriptor(//from   w w  w. j  a v a 2s .  co m
            ImageDescriptor.createFromImage((Image) images.get(ActionImages.ActionImage_OutdentAction)));

}

From source file:org.iviPro.editors.annotationeditor.components.contenteditors.richtext.actions.StrikeAction.java

License:Open Source License

public StrikeAction(HtmlComposer composer) {
    super("Strike", IAction.AS_CHECK_BOX, composer); //$NON-NLS-1$
    setImageDescriptor(//  ww  w.j a  v  a  2 s.c o  m
            ImageDescriptor.createFromImage((Image) images.get(ActionImages.ActionImage_StrikeAction)));

}

From source file:org.iviPro.editors.annotationeditor.components.contenteditors.richtext.actions.SubscriptAction.java

License:Open Source License

public SubscriptAction(HtmlComposer composer) {
    super("Substrict", IAction.AS_CHECK_BOX, composer); //$NON-NLS-1$
    setImageDescriptor(//from www .  j ava2  s. c om
            ImageDescriptor.createFromImage((Image) images.get(ActionImages.ActionImage_SubscriptAction)));
}

From source file:org.iviPro.editors.annotationeditor.components.contenteditors.richtext.actions.SuperscriptAction.java

License:Open Source License

public SuperscriptAction(HtmlComposer composer) {
    super("Superscript", IAction.AS_CHECK_BOX, composer); //$NON-NLS-1$
    setImageDescriptor(/*w  w  w . j a v  a 2  s  .co  m*/
            ImageDescriptor.createFromImage((Image) images.get(ActionImages.ActionImage_SuperscriptAction)));
}

From source file:org.iviPro.editors.annotationeditor.components.contenteditors.richtext.actions.UnderlineAction.java

License:Open Source License

public UnderlineAction(HtmlComposer composer) {
    super("Underline", IAction.AS_CHECK_BOX, composer); //$NON-NLS-1$
    setImageDescriptor(//w  w  w . j a  va  2 s. c  o  m
            ImageDescriptor.createFromImage((Image) images.get(ActionImages.ActionImage_UnderlineAction)));
}

From source file:org.iviPro.editors.annotationeditor.components.contenteditors.richtext.actions.UnlinkAction.java

License:Open Source License

public UnlinkAction(HtmlComposer composer) {
    super("Unlink", IAction.AS_PUSH_BUTTON, composer); //$NON-NLS-1$
    setImageDescriptor(/*from   w  ww . ja  v a 2  s . co m*/
            ImageDescriptor.createFromImage((Image) images.get(ActionImages.ActionImage_UnlinkAction)));
}

From source file:org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages.java

License:Open Source License

private JBossServerUISharedImages() {
    instance = this;
    images = new Hashtable<String, Object>();
    descriptors = new Hashtable<String, Object>();
    Bundle pluginBundle = JBossServerUIPlugin.getDefault().getBundle();

    descriptors.put(IMG_JBOSS, createImageDescriptor(pluginBundle, "/icons/jboss.gif")); //$NON-NLS-1$
    descriptors.put(IMG_JBOSS_CONFIGURATION,
            createImageDescriptor(pluginBundle, "/icons/jboss-configuration.gif")); //$NON-NLS-1$

    descriptors.put(WIZBAN_EAP_LOGO, createImageDescriptor(pluginBundle, "/icons/eap_wizban.png")); //$NON-NLS-1$
    descriptors.put(WIZBAN_AS7_LOGO, createImageDescriptor(pluginBundle, "/icons/as7_wizban.png")); //$NON-NLS-1$
    descriptors.put(WIZBAN_JBOSS_LOGO, createImageDescriptor(pluginBundle, "/icons/JBoss_byRH_logo_rgb.png")); //$NON-NLS-1$
    descriptors.put(WIZBAN_WILDFLY_LOGO, createImageDescriptor(pluginBundle, "/icons/wildfly_wizban.png")); //$NON-NLS-1$
    descriptors.put(TWIDDLE_IMAGE, createImageDescriptor(pluginBundle, "icons/twiddle.gif")); //$NON-NLS-1$
    descriptors.put(INACTIVE_CATEGORY_IMAGE, createImageDescriptor(pluginBundle, "/icons/inactiveCat.gif")); //$NON-NLS-1$
    descriptors.put(PUBLISH_IMAGE, createImageDescriptor(pluginBundle, "/icons/publish.gif")); //$NON-NLS-1$
    descriptors.put(UNPUBLISH_IMAGE, createImageDescriptor(pluginBundle, "/icons/unpublish.gif")); //$NON-NLS-1$
    descriptors.put(JMX_IMAGE, createImageDescriptor(pluginBundle, "/icons/jmeth_obj.gif")); //$NON-NLS-1$
    descriptors.put(EXPLORE_IMAGE, createImageDescriptor(pluginBundle, "/icons/actions/xpl/explore.gif")); //$NON-NLS-1$
    descriptors.put(XPATH_LEVEL_1, createImageDescriptor(pluginBundle, "icons/xpath_level_1.gif")); //$NON-NLS-1$
    descriptors.put(XPATH_LEVEL_2, createImageDescriptor(pluginBundle, "icons/xpath_level_2.gif")); //$NON-NLS-1$
    descriptors.put(XPATH_LEVEL_3, createImageDescriptor(pluginBundle, "icons/xpath_level_3.gif")); //$NON-NLS-1$

    descriptors.put(CONSOLE, createImageDescriptor(pluginBundle, "/icons/console.gif")); //$NON-NLS-1$
    descriptors.put(ERROR_MARKER, createImageDescriptor(pluginBundle, "/icons/errorMarker.gif")); //$NON-NLS-1$

    Iterator<String> iter = descriptors.keySet().iterator();
    while (iter.hasNext()) {
        String key = iter.next();
        ImageDescriptor descriptor = descriptor(key);
        images.put(key, descriptor.createImage());
    }//from www.j a  v  a  2  s  . c o  m

    images.put(GENERIC_SERVER_IMAGE,
            ImageResource.getImageDescriptor(ImageResource.IMG_CTOOL_NEW_SERVER).createImage());
    descriptors.put(GENERIC_SERVER_IMAGE,
            ImageDescriptor.createFromImage((Image) images.get(GENERIC_SERVER_IMAGE)));
}

From source file:org.jboss.tools.forge.ui.internal.actions.ClearAction.java

License:Open Source License

private ImageDescriptor createImageDescriptor() {
    Image img = ConsolePlugin.getImage(IConsoleConstants.IMG_LCL_CLEAR);
    return ImageDescriptor.createFromImage(img);
}

From source file:org.jcryptool.crypto.flexiprovider.algorithms.ui.views.nodes.AlgorithmNode.java

License:Open Source License

public ImageDescriptor getImageDescriptor() {
    return ImageDescriptor.createFromImage(
            PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT));
}

From source file:org.kalypso.ogc.gml.AbstractKalypsoTheme.java

License:Open Source License

/**
 * This function should return the default image descriptor representing the theme. <br>
 * Subclasses should override, if they want an own standard icon for representing them.<br>
 * <strong>Note:</strong><br>
 * <br>/*w w  w  .  j  av a2s  .  c om*/
 * This has only an effect, if the user does not define an URL or URN and the theme has more then one style or rule.
 *
 * @return The default image descriptor.
 */
@Override
public ImageDescriptor getDefaultIcon() {
    // FIXME: might be called after theme was already disposed... the image is then never disposed....
    // Maybe we need to introduce a flag ot know if the theme is already disposed.
    if (m_standardThemeIcon == null)
        m_standardThemeIcon = new Image(Display.getCurrent(),
                AbstractKalypsoTheme.class.getResourceAsStream("resources/standardTheme.gif")); //$NON-NLS-1$

    return ImageDescriptor.createFromImage(m_standardThemeIcon);
}