List of usage examples for org.eclipse.jface.resource ImageDescriptor createFromURL
public static ImageDescriptor createFromURL(URL url)
From source file:actions.NextAction.java
License:Open Source License
public NextAction(Button button, Player player, PlaylistDao playlist, PlayAction playAction) throws MalformedURLException { super(button); this.player = player; this.playlist = playlist; this.playAction = playAction; setImageDescriptor(ImageDescriptor.createFromURL(new URL("file:images/next_f.png"))); setToolTipText("Next"); setText("&Next"); }
From source file:actions.PlayAction.java
License:Open Source License
public PlayAction(Button button, Player player, PlaylistDao playlist, FileScanningAction fileScanner) throws MalformedURLException { super(button); this.player = player; this.playlist = playlist; this.fileScanner = fileScanner; playImageDescriptor = ImageDescriptor.createFromURL(new URL("file:images/play_f.png")); pauseImageDescriptor = ImageDescriptor.createFromURL(new URL("file:images/pause_f.png")); isPlaying = false;/*from ww w . java2 s . co m*/ updateImage(); }
From source file:actions.PreviousAction.java
License:Open Source License
public PreviousAction(Button button, Player player, PlaylistDao playlist, PlayAction playAction) throws MalformedURLException { super(button); this.player = player; this.playlist = playlist; this.playAction = playAction; setImageDescriptor(ImageDescriptor.createFromURL(new URL("file:images/prev_f.png"))); setToolTipText("Previous"); setText("P&revious"); }
From source file:actions.StopAction.java
License:Open Source License
public StopAction(Button button, Player player, PlaylistDao playlist, PlayAction playAction) throws MalformedURLException { super(button); this.player = player; this.playlist = playlist; this.playAction = playAction; setImageDescriptor(ImageDescriptor.createFromURL(new URL("file:images/stop_f.png"))); setToolTipText("Stop"); setText("&Stop"); }
From source file:ag.ion.noa4e.ui.NOAUIPluginImages.java
License:LGPL
/** * Declares an image./*from w w w .j ava2 s .c o m*/ * * @param key key of the image * @param path path the image * * @author Andreas Brker */ private final static void declareRegistryImage(String key, String path) { ImageDescriptor desc = ImageDescriptor.getMissingImageDescriptor(); try { desc = ImageDescriptor.createFromURL(makeImageFileURL(path)); } catch (MalformedURLException me) { //do nothing } imageRegistry.put(key, desc); }
From source file:ar.com.fluxit.jqa.JQAEclipsePlugin.java
License:Open Source License
@Override protected void initializeImageRegistry(ImageRegistry reg) { super.initializeImageRegistry(reg); Bundle bundle = Platform.getBundle(PLUGIN_ID); ImageDescriptor checkImage = ImageDescriptor .createFromURL(FileLocator.find(bundle, new Path("icons/check..gif"), null)); reg.put(IMG_CHECK, checkImage);//from w w w . j a v a 2s. c o m ImageDescriptor uncheckImage = ImageDescriptor .createFromURL(FileLocator.find(bundle, new Path("icons/uncheck..gif"), null)); reg.put(IMG_UNCHECK, uncheckImage); }
From source file:ar.com.tadp.xml.rinzo.core.PluginImages.java
License:Open Source License
/** * Obtiene el descriptor de la imagen a partir de su nombre relativo al root de las imagenes *//* ww w . j av a2 s . c o m*/ private static ImageDescriptor getImageDescriptor(String prefix, String name) { try { return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX_LENGTH))); } catch (MalformedURLException e) { return ImageDescriptor.getMissingImageDescriptor(); } }
From source file:at.bestsolution.eclipse.properties.Activator.java
License:Open Source License
public void start(BundleContext context) throws Exception { super.start(context); plugin = this; getImageRegistry().put(GROUP_ICON,//from ww w . j a v a 2s .c o m ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/ftr_jar_obj.gif"))); getImageRegistry().put(KEY_ICON, ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/default_co.gif"))); getImageRegistry().put(ALPHASORT_ICON, ImageDescriptor .createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/alphab_sort_co.gif"))); getImageRegistry().put(COLLAPSE_ICON, ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/collapseall.gif"))); getImageRegistry().put(HIERACHICAL_ICON, ImageDescriptor .createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/hierarchicalLayout.gif"))); }
From source file:at.bestsolution.efxclipse.tooling.jdt.ui.internal.editors.JFXBuildConfigurationEditor.java
License:Open Source License
/** * initialize tool bar for a form./*from w ww . j a v a 2 s. co m*/ */ private void initToolbar(final Form form) { IToolBarManager mgr = form.getToolBarManager(); // TODO do not use the hard coded image name here mgr.add(new Action("Build & Export FX Application", ImageDescriptor .createFromURL(getClass().getClassLoader().getResource("/icons/exportrunnablejar_wiz.gif"))) { @Override public void run() { try { executeExport(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); // mgr.add(new Action("Export Ant File",ImageDescriptor.createFromURL(getClass().getClassLoader().getResource("/icons/exportAnt_co.gif"))) { // @Override // public void run() { // // } // }); form.updateToolBar(); }
From source file:at.bestsolution.efxclipse.tooling.jdt.ui.internal.JavaFXUIPlugin.java
License:Open Source License
public void start(BundleContext context) throws Exception { super.start(context); plugin = this; getImageRegistry().put(GROUP_ICON,//from ww w . j a v a 2s . com ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/ftr_jar_obj.gif"))); getImageRegistry().put(KEY_ICON, ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/default_co.gif"))); getImageRegistry().put(ALPHASORT_ICON, ImageDescriptor .createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/alphab_sort_co.gif"))); getImageRegistry().put(COLLAPSE_ICON, ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/collapseall.gif"))); getImageRegistry().put(HIERACHICAL_ICON, ImageDescriptor .createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/hierarchicalLayout.gif"))); getImageRegistry().put(LIBRARY_ICON, ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/library_obj.gif"))); }