List of usage examples for org.eclipse.jface.resource ImageDescriptor createFromFile
public static ImageDescriptor createFromFile(Class<?> location, String filename)
From source file:org.openscada.configurator.project.wizard.NewConfiguratorModelWizard.java
License:Open Source License
/** * This just records the information./* w ww .j a v a 2s .co m*/ */ @Override public void init(final IWorkbench workbench, final IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; setWindowTitle("Create new configuration model"); setDefaultPageImageDescriptor( ImageDescriptor.createFromFile(NewConfiguratorModelWizard.class, "icons/NewConfigurator.gif")); this.context = new CreationContext(); }
From source file:org.openscada.vi.details.swt.widgets.BoolLEDComposite.java
License:Open Source License
public BoolLEDComposite(final Composite parent, final int style, final DataItemDescriptor descriptor, final String format, final boolean expectedValue, final boolean isAlarm, final boolean isOnOff, final String attribute) { super(parent, style, null, null); this.resourceManager = new LocalResourceManager(JFaceResources.getResources()); this.imageGreen = this.resourceManager.createImageWithDefault( ImageDescriptor.createFromFile(BoolLEDComposite.class, "icons/ledGreen.png")); //$NON-NLS-1$ this.imageGray = this.resourceManager.createImageWithDefault( ImageDescriptor.createFromFile(BoolLEDComposite.class, "icons/ledGray.png")); //$NON-NLS-1$ this.imageRed = this.resourceManager .createImageWithDefault(ImageDescriptor.createFromFile(BoolLEDComposite.class, "icons/ledRed.png")); //$NON-NLS-1$ this.imageOn = this.resourceManager .createImageWithDefault(ImageDescriptor.createFromFile(BoolLEDComposite.class, "icons/on.png")); //$NON-NLS-1$ this.imageOff = this.resourceManager .createImageWithDefault(ImageDescriptor.createFromFile(BoolLEDComposite.class, "icons/off.png")); //$NON-NLS-1$ final RowLayout layout = new RowLayout(); layout.wrap = false;// ww w. j ava2s .c om layout.center = true; layout.spacing = 3; setLayout(layout); this.expectedValue = expectedValue; this.isAlarm = isAlarm; this.isOnOff = isOnOff; this.attribute = attribute; this.controlImage = new ControlImage(this, this.registrationManager); this.controlImage.setDetailItem(descriptor.asItem()); this.signalLabel = new Label(this, SWT.NONE); this.signalLabel.setImage(this.imageGray); new LabelOpenscadaDialog(this, SWT.NONE, format, descriptor); if (descriptor != null) { this.registrationManager.registerItem("value", descriptor.getItemId(), //$NON-NLS-1$ descriptor.getConnectionInformation(), false, false); } if (Boolean.getBoolean("org.openscada.developer")) //$NON-NLS-1$ { if (this.isAlarm == true) { this.signalLabel.setToolTipText("Red"); } else { this.signalLabel.setToolTipText("Green"); } } }
From source file:org.opensixen.p2.swt.InstallerWizard.java
License:GNU General Public License
public InstallerWizard(Shell shell) { super();/*from www. j a v a 2 s.co m*/ this.shell = shell; setWindowTitle("Opensixen Installer"); setNeedsProgressMonitor(true); ImageDescriptor logo = ImageDescriptor.createFromFile(getClass(), "/icons/opensixen.png"); if (logo != null) { setDefaultPageImageDescriptor(logo); } }
From source file:org.ow2.chameleon.eclipse.ipojo.exporter.ui.ExportPage.java
License:Apache License
/** * Constructor// ww w . j av a 2 s . c om * * @param aPageName * Wizard page name */ protected ExportPage(final String aPageName) { super(aPageName, aPageName, ImageDescriptor.createFromFile(Activator.class, "/icons/ipojo-small.png")); pSettings = IPojoExporterPlugin.getDefault().getDialogSettings(); }
From source file:org.ow2.mind.ui.wizard.NewCompositeWizardPage.java
License:Open Source License
public NewCompositeWizardPage() { super("New Composite ADL"); setTitle("Composite ADL"); setDescription("Create a new composite ADL"); setImageDescriptor(ImageDescriptor.createFromFile(this.getClass(), "/icons/new/CompositeComponent.png")); }
From source file:org.ow2.mind.ui.wizard.NewPrimitiveWizardPage.java
License:Open Source License
public NewPrimitiveWizardPage() { super("New Primitive ADL"); setTitle("Primitive ADL"); setDescription("Create a new primitive ADL"); setImageDescriptor(ImageDescriptor.createFromFile(this.getClass(), "/icons/new/PrimitiveComponent.png")); }
From source file:org.ow2.mind.ui.wizard.NewTypeWizardPage.java
License:Open Source License
public NewTypeWizardPage() { super("New Type ADL"); setTitle("Type ADL"); setDescription("Create a new type ADL"); setImageDescriptor(ImageDescriptor.createFromFile(this.getClass(), "/icons/new/TypeComponent.png")); }
From source file:org.pwsafe.passwordsafeswt.util.IOUtils.java
License:Open Source License
/** * Returns an image stored in the classpath at the specified path * // w ww. j av a 2 s .co m * @param clazz Class The class relative to which to find the image * @param path String The path to the image file * @return Image The image stored in the file at the specified path */ public static Image getImage(Class<?> clazz, String path) { String key = clazz.getName() + '|' + path; final ImageRegistry imageRegistry = JFaceResources.getImageRegistry(); Image image = imageRegistry.get(key); if (image == null) { imageRegistry.put(key, ImageDescriptor.createFromFile(clazz, path)); image = imageRegistry.get(key); } return image; }
From source file:org.qsos.action.OpenSheetAction.java
License:Open Source License
/** * @param w//w w w.ja v a 2 s. c o m */ public OpenSheetAction(JQ w) { /** * @param : window * */ window = w; setText("Open@Ctrl+O"); //$NON-NLS-1$ setToolTipText(Messages.getString("OpenSheetAction.toolTipTextOpen")); //$NON-NLS-1$ setImageDescriptor(ImageDescriptor.createFromFile(null, "share/icons/open_folder_24.ico")); //$NON-NLS-1$ }
From source file:org.qsos.action.PrintAction.java
License:Open Source License
/** * @param w//w ww .ja v a 2s . c om */ public PrintAction(JQ w) { window = w; setText("Create@Ctrl+p"); //$NON-NLS-1$ setToolTipText(Messages.getString("PrintAction.toolTipTextPrint")); //$NON-NLS-1$ setImageDescriptor(ImageDescriptor.createFromFile(null, "share/icons/printer.png")); //$NON-NLS-1$ }