List of usage examples for org.eclipse.jface.resource ImageDescriptor createFromFile
public static ImageDescriptor createFromFile(Class<?> location, String filename)
From source file:edu.harvard.i2b2.eclipse.plugins.querytool.views.QueryToolView.java
License:Open Source License
private void addHelpButtonToToolBar() { final IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem(); Action helpAction = new Action() { public void run() { helpSystem.displayHelpResource("/edu.harvard.i2b2.eclipse.plugins.querytool/html/qtt_index.html"); }/*w w w.j a v a2 s . c om*/ }; helpAction.setImageDescriptor(ImageDescriptor.createFromFile(QueryToolMainUI.class, "/icons/help.png")); getViewSite().getActionBars().getToolBarManager().add(helpAction); }
From source file:edu.harvard.i2b2.eclipse.plugins.workplace.views.find.FindView.java
License:Open Source License
private void addHelpButtonToToolBar() { final IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem(); Action helpAction = new Action() { @Override//from www . ja v a 2 s .c o m public void run() { helpSystem.displayHelpResource( "/edu.harvard.i2b2.eclipse.plugins.workplace/html/i2b2_wpf_index.html"); } }; helpAction.setImageDescriptor(ImageDescriptor.createFromFile(FindView.class, "/icons/help.png")); getViewSite().getActionBars().getToolBarManager().add(helpAction); }
From source file:edu.harvard.i2b2.eclipse.plugins.workplace.views.find.FindViewNodeBrowser.java
License:Open Source License
private void createImageRegistry() { ImageDescriptor imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/leaf.jpg"); this.imageRegistry.put("leaf", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/multi.bmp"); this.imageRegistry.put("multi", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/openFolder.jpg"); this.imageRegistry.put("openFolder", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/openCase.jpg"); this.imageRegistry.put("openCase", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/closedFolder.jpg"); this.imageRegistry.put("closedFolder", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/closedCase.jpg"); this.imageRegistry.put("closedCase", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/concept.jpg"); this.imageRegistry.put("concept", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/conceptFA.jpg"); this.imageRegistry.put("conceptFA", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/patient_coll.jpg"); this.imageRegistry.put("patient_coll", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/xml_results.jpg"); this.imageRegistry.put("xml_results", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/patient_count_xml.jpg"); this.imageRegistry.put("patient_count_xml", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/prev_query.jpg"); this.imageRegistry.put("prev_query", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/query_definition.jpg"); this.imageRegistry.put("query_definition", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/group_template.jpg"); this.imageRegistry.put("group_template", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/observation.png"); this.imageRegistry.put("observation", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/patient.jpg"); this.imageRegistry.put("patient", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/patient.jpg"); this.imageRegistry.put("pdo", imageDescriptor); imageDescriptor = ImageDescriptor.createFromFile(getClass(), "icons/morepeople.jpg"); this.imageRegistry.put("encounter_coll", imageDescriptor); }
From source file:edu.harvard.i2b2.eclipse.plugins.workplace.views.WorkplaceView.java
License:Open Source License
private void addHelpButtonToToolBar() { final IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem(); Action helpAction = new Action() { public void run() { helpSystem//w ww. j a va2s. co m .displayHelpResource("/edu.harvard.i2b2.eclipse.plugins.workplace/html/i2b2_wp_index.htm"); } }; helpAction.setImageDescriptor(ImageDescriptor.createFromFile(WorkplaceView.class, "/icons/help.png")); getViewSite().getActionBars().getToolBarManager().add(helpAction); }
From source file:edu.kit.joana.ui.ifc.sdg.latticeeditor.FlowEditorPaletteFactory.java
License:Open Source License
private static PaletteContainer createComponentsDrawer() { PaletteDrawer drawer = new PaletteDrawer("Components", null); List<CombinedTemplateCreationEntry> entries = new ArrayList<CombinedTemplateCreationEntry>(); CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry("Activity", "Create a new Activity Node", Activity.class, new SimpleFactory(Activity.class), ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/gear16.gif"), ImageDescriptor.createFromFile(Activity.class, "images/gear16.gif")); entries.add(combined);//w ww. ja v a2 s .co m combined = new CombinedTemplateCreationEntry("Sequential Activity", "Create a Sequential Activity", SequentialActivity.class, new SimpleFactory(SequentialActivity.class), ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/sequence16.gif"), ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/sequence16.gif")); entries.add(combined); combined = new CombinedTemplateCreationEntry("Parallel Activity", "Create a Parallel Activity", ParallelActivity.class, new SimpleFactory(ParallelActivity.class), ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/parallel16.gif"), ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/parallel16.gif")); entries.add(combined); drawer.addAll(entries); return drawer; }
From source file:edu.kit.joana.ui.ifc.sdg.latticeeditor.FlowEditorPaletteFactory.java
License:Open Source License
private static PaletteContainer createControlGroup(PaletteRoot root) { PaletteGroup controlGroup = new PaletteGroup("Control Group"); List<Object> entries = new ArrayList<Object>(); ToolEntry tool = new SelectionToolEntry(); entries.add(tool);// ww w . j av a 2 s. c om root.setDefaultEntry(tool); tool = new MarqueeToolEntry(); entries.add(tool); PaletteSeparator sep = new PaletteSeparator("org.eclipse.gef.latticeeditor.sep2"); sep.setUserModificationPermission(PaletteEntry.PERMISSION_NO_MODIFICATION); entries.add(sep); tool = new ConnectionCreationToolEntry("Connection Creation", "Creating connections", null, ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/connection16.gif"), ImageDescriptor.createFromFile(Activity.class, "images/connection16.gif")); entries.add(tool); controlGroup.addAll(entries); return controlGroup; }
From source file:edu.kit.joana.ui.ifc.sdg.latticeeditor.LatticeEditorPaletteFactory.java
License:Open Source License
@SuppressWarnings("unused") private static PaletteContainer createComponentsDrawer() { PaletteDrawer drawer = new PaletteDrawer("Components", null); List<CombinedTemplateCreationEntry> entries = new ArrayList<CombinedTemplateCreationEntry>(); CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry("Security Class", "Create a new Security Class", Activity.class, new SimpleFactory(Activity.class), ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/schloss4e.gif"), // gear16.gif ImageDescriptor.createFromFile(Activity.class, "images/schloss4e.gif")); entries.add(combined);/*from w w w . j a va 2 s .co m*/ /* * combined = new CombinedTemplateCreationEntry( "Sequential Activity", * "Create a Sequential Activity", SequentialActivity.class, new * SimpleFactory(SequentialActivity.class), * ImageDescriptor.createFromFile(FlowPlugin.class, * "images/sequence16.gif"), * ImageDescriptor.createFromFile(FlowPlugin.class, * "images/sequence16.gif") ); entries.add(combined); * * combined = new CombinedTemplateCreationEntry( "Generate LatticeFile", * "Generate LatticeFile from this Graph", ParallelActivity.class, new * SimpleFactory(ParallelActivity.class), * ImageDescriptor.createFromFile(FlowPlugin.class, * "images/sequence16.gif"), * ImageDescriptor.createFromFile(FlowPlugin.class, * "images/sequence16.gif") //parallel ); entries.add(combined); */ drawer.addAll(entries); return drawer; }
From source file:edu.kit.joana.ui.ifc.sdg.latticeeditor.LatticeEditorPaletteFactory.java
License:Open Source License
private static PaletteContainer createControlGroup(PaletteRoot root) { PaletteGroup controlGroup = new PaletteGroup("Control Group"); List<Object> entries = new ArrayList<Object>(); ToolEntry tool = new SelectionToolEntry(); entries.add(tool);/* w ww .ja va 2 s . co m*/ root.setDefaultEntry(tool); //Marquee als tool nicht benoetigt. //tool = new MarqueeToolEntry(); //entries.add(tool); PaletteSeparator sep = new PaletteSeparator("org.eclipse.gef.latticeeditor.sep2"); sep.setUserModificationPermission(PaletteEntry.PERMISSION_NO_MODIFICATION); entries.add(sep); tool = new ConnectionCreationToolEntry("Relation Creation", "Creating new Relations between security classes", null, ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/connection16.gif"), ImageDescriptor.createFromFile(Activity.class, "images/connection16.gif")); entries.add(tool); //Neues Schloss erstellen CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry("Security Class", "Create a new Security Class", Activity.class, new SimpleFactory(Activity.class), ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/schloss4e.gif"), // gear16.gif ImageDescriptor.createFromFile(Activity.class, "images/schloss4e.gif")); entries.add(combined); controlGroup.addAll(entries); return controlGroup; }
From source file:edu.kit.joana.ui.ifc.sdg.latticeeditor.ui.FlowWizardPage1.java
License:Open Source License
public FlowWizardPage1(IWorkbench aWorkbench, IStructuredSelection selection) { super("sampleFlowPage1", selection); this.setTitle("Create Flow Example File"); this.setDescription("Create a new flow file resource"); this.setImageDescriptor(ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/flowbanner.gif")); this.workbench = aWorkbench; }
From source file:edu.kit.joana.ui.ifc.sdg.latticeeditor.ui.LatticeWizardPage1.java
License:Open Source License
public LatticeWizardPage1(IWorkbench aWorkbench, IStructuredSelection selection) { super("samplepage", selection); this.setTitle("Create A Basic Lattice File"); this.setDescription("Create a new lattice only containing secure and public"); this.setImageDescriptor(ImageDescriptor.createFromFile(LatticeEditorPlugin.class, "images/gear.gif")); this.workbench = aWorkbench; }