List of usage examples for org.eclipse.jface.resource ImageDescriptor createFromURL
public static ImageDescriptor createFromURL(URL url)
From source file:com.iw.plugins.spindle.wizards.project.convert.ChooseExistingPage.java
License:Mozilla Public License
/** * Constructor for ChooseExistingPage.//w w w .ja va 2 s . c o m * @param name */ public ChooseExistingPage(String name, IStructuredSelection selection) { super(name); this.setImageDescriptor(ImageDescriptor.createFromURL(TapestryImages.getImageURL("applicationDialog.gif"))); this.setDescription("Choose an Application or Library for this project"); IJavaProject jproject = (IJavaProject) selection.getFirstElement(); chooseWidget = new ChooseWorkspaceModelWidget(jproject, TapestryLookup.ACCEPT_APPLICATIONS | TapestryLookup.ACCEPT_LIBRARIES | TapestryLookup.WRITEABLE | TapestryLookup.THIS_PROJECT_ONLY); chooseWidget.addSelectionChangedListener(this); }
From source file:com.iw.plugins.spindle.wizards.project.convert.ConversionWelcomePage.java
License:Mozilla Public License
/** * Constructor for ConversionWelcomePage. * @param name/*from ww w . j a v a2 s . com*/ */ public ConversionWelcomePage(String name, IStructuredSelection selection) { super(name); this.setImageDescriptor(ImageDescriptor.createFromURL(TapestryImages.getImageURL("applicationDialog.gif"))); this.setDescription("Conversion Options"); applicationOrLibrary = new RadioDialogField("Create:", 80, new String[] { "A new Application", "A new Library" }, SWT.VERTICAL); applicationOrLibrary.addListener(this); this.selection = selection; setup(); }
From source file:com.iw.plugins.spindle.wizards.project.convert.CreateApplicationWizardPage.java
License:Mozilla Public License
/** * Constructor for NewTapAppWizardPage1/*w w w . ja v a 2s . co m*/ */ public CreateApplicationWizardPage(IWorkspaceRoot root) { super(MessageUtil.getString("NewTapAppWizardPage.title")); this.setImageDescriptor(ImageDescriptor.createFromURL(TapestryImages.getImageURL("applicationDialog.gif"))); this.setDescription(MessageUtil.getString("NewTapAppWizardPage.description")); IDialogFieldChangedListener listener = new FieldEventsAdapter(); fContainerDialogField = new ContainerDialogField(CONTAINER, root, APP_WIDTH); connect(fContainerDialogField); fContainerDialogField.addListener(listener); fPackageDialogField = new PackageDialogField(PACKAGE, APP_WIDTH); connect(fPackageDialogField); fPackageDialogField.addListener(listener); fEngineDialogField = new EngineClassDialog(ENGINE, APP_WIDTH); connect(fEngineDialogField); fEngineDialogField.addListener(listener); fApplicationNameDialog = new ApplicationNameField(APPNAME); connect(fApplicationNameDialog); fApplicationNameDialog.addListener(listener); fGenerateServletClass = new CheckBoxField("dummy"); fGenerateServletClass.addListener(listener); fServletPackageDialog = new PackageDialogField(SERVLETPACKAGE, SERV_WIDTH); connect(fServletPackageDialog); fServletPackageDialog.addListener(listener); fServletClassDialog = new ServletClassnameField(SERVLETCLASS, SERV_WIDTH); connect(fServletClassDialog); fServletClassDialog.addListener(listener); fServletSuperclassDialog = new ApplicationServletClassDialog(SERVLETSUPERCLASS, SERV_WIDTH); connect(fServletSuperclassDialog); fServletSuperclassDialog.addListener(listener); fGenerateServletClass.attachDialogFields( new DialogField[] { fServletPackageDialog, fServletClassDialog, fServletSuperclassDialog }); }
From source file:com.iw.plugins.spindle.wizards.project.convert.CreateLibraryWizardPage.java
License:Mozilla Public License
/** * Constructor for NewTapLibWizardPage1//from ww w. jav a2s . c o m */ public CreateLibraryWizardPage(IWorkspaceRoot root) { super(MessageUtil.getString("NewTapLibWizardPage.title")); this.setImageDescriptor(ImageDescriptor.createFromURL(TapestryImages.getImageURL("applicationDialog.gif"))); this.setDescription(MessageUtil.getString("NewTapLibWizardPage.description")); IDialogFieldChangedListener listener = new FieldEventsAdapter(); fContainerDialogField = new ContainerDialogField(CONTAINER, root, APP_WIDTH); connect(fContainerDialogField); fContainerDialogField.addListener(listener); fPackageDialogField = new PackageDialogField(PACKAGE, APP_WIDTH); connect(fPackageDialogField); fPackageDialogField.addListener(listener); fLibraryNameDialog = new ApplicationNameField(LIBNAME); connect(fLibraryNameDialog); fLibraryNameDialog.addListener(listener); }
From source file:com.iw.plugins.spindle.wizards.project.convert.QuestionPage.java
License:Mozilla Public License
/** * Constructor for QuestionPage.//w w w. j a v a 2s .c om * @param name */ public QuestionPage(String name) { super(name); this.setImageDescriptor(ImageDescriptor.createFromURL(TapestryImages.getImageURL("applicationDialog.gif"))); this.setDescription("Migration Option"); yesNoQuestion = new RadioDialogField("Migrate?", 80, new String[] { "Yes", "No" }, SWT.VERTICAL); yesNoQuestion.addListener(this); }
From source file:com.iw.plugins.spindle.wizards.project.LibraryWizardPage.java
License:Mozilla Public License
/** * Constructor for NewTapLibWizardPage1// w w w .j ava 2 s . co m */ public LibraryWizardPage(IWorkspaceRoot root) { super(MessageUtil.getString("NewTapLibWizardPage.title")); this.setImageDescriptor(ImageDescriptor.createFromURL(TapestryImages.getImageURL("applicationDialog.gif"))); this.setDescription(MessageUtil.getString("NewTapLibWizardPage.description")); IDialogFieldChangedListener listener = new FieldEventsAdapter(); fContainerDialogField = new ContainerDialogField(CONTAINER, APP_WIDTH); connect(fContainerDialogField); fContainerDialogField.addListener(listener); fPackageDialogField = new PackageDialogField(PACKAGE, APP_WIDTH); connect(fPackageDialogField); fPackageDialogField.addListener(listener); fLibraryNameDialog = new ApplicationNameField(LIBNAME); connect(fLibraryNameDialog); fLibraryNameDialog.addListener(listener); }
From source file:com.javadude.antxr.eclipse.ui.AntxrUIPluginImages.java
License:Open Source License
private static void setImageDescriptors(IAction anAction, String aType, String aRelPath) { try {// ww w .j a v a 2 s . c o m ImageDescriptor id = ImageDescriptor .createFromURL(AntxrUIPluginImages.makeIconFileURL("d" + aType, aRelPath)); if (id != null) { anAction.setDisabledImageDescriptor(id); } } catch (MalformedURLException e) { AntxrUIPlugin.log(e); } try { ImageDescriptor id = ImageDescriptor .createFromURL(AntxrUIPluginImages.makeIconFileURL("c" + aType, aRelPath)); if (id != null) { anAction.setHoverImageDescriptor(id); } } catch (MalformedURLException e) { AntxrUIPlugin.log(e); } anAction.setImageDescriptor(AntxrUIPluginImages.create("e" + aType, aRelPath)); }
From source file:com.javadude.antxr.eclipse.ui.AntxrUIPluginImages.java
License:Open Source License
private static ImageDescriptor createManaged(String aPrefix, String aName) { ImageDescriptor result;//from w ww. jav a 2 s . c o m try { result = ImageDescriptor.createFromURL(AntxrUIPluginImages.makeIconFileURL(aPrefix, aName.substring(AntxrUIPluginImages.NAME_PREFIX_LENGTH))); AntxrUIPluginImages.IMAGE_REGISTRY.put(aName, result); } catch (MalformedURLException e) { result = ImageDescriptor.getMissingImageDescriptor(); } return result; }
From source file:com.javadude.antxr.eclipse.ui.AntxrUIPluginImages.java
License:Open Source License
private static ImageDescriptor create(String aPrefix, String aName) { ImageDescriptor result;//w w w.j a va 2 s. co m try { result = ImageDescriptor.createFromURL(AntxrUIPluginImages.makeIconFileURL(aPrefix, aName)); } catch (MalformedURLException e) { result = ImageDescriptor.getMissingImageDescriptor(); } return result; }
From source file:com.jcraft.eclipse.jcterm.JCTermPlugin.java
License:Open Source License
/** * Creates an image and places it in the image registry. *///from w w w. ja va 2 s . co m protected void createImageDescriptor(String id) { URL url = FileLocator.find(JCTermPlugin.getDefault().getBundle(), new Path(IUIConstants.ICON_PATH + id), null); ImageDescriptor desc = ImageDescriptor.createFromURL(url); imageDescriptors.put(id, desc); }