List of usage examples for org.eclipse.jface.resource ImageDescriptor createImage
public Image createImage()
From source file:com.aptana.preview.internal.PreviewEditorPart.java
License:Open Source License
private void showEditorInput() { PreviewEditorInput pei = getPreviewEditorInput(); if (pei != null) { initialURL = null;// w w w .j a va 2 s. c o m URL url = pei.getURL(); if (url != null) initialURL = url.toExternalForm(); if (webBrowser != null) { webBrowser.setURL(initialURL); } setPartName(MessageFormat.format(Messages.PreviewEditorPart_Title, pei.getName())); setTitleToolTip(pei.getToolTipText()); Image oldImage = image; ImageDescriptor id = pei.getImageDescriptor(); image = id.createImage(); setTitleImage(image); if (oldImage != null && !oldImage.isDisposed()) oldImage.dispose(); } }
From source file:com.aptana.preview.PreviewEditorPart.java
License:Open Source License
private void showEditorInput() { PreviewEditorInput pei = getPreviewEditorInput(); if (pei != null) { initialURL = null;//from w w w .jav a 2s .c o m URL url = pei.getURL(); if (url != null) initialURL = url.toExternalForm(); if (webBrowser != null) { webBrowser.setURL(initialURL); } else if (nativeBrowser != null) { nativeBrowser.setUrl(initialURL); } setPartName(getEditorInputName()); setTitleToolTip(pei.getToolTipText()); Image oldImage = image; ImageDescriptor id = pei.getImageDescriptor(); image = id.createImage(); setTitleImage(image); if (oldImage != null && !oldImage.isDisposed()) oldImage.dispose(); } }
From source file:com.aptana.radrails.cloud.internal.EndpointDialog.java
License:Open Source License
/** * Create contents of the dialog//from w w w . j a va 2 s . co m * * @param parent */ @Override protected Control createDialogArea(Composite parent) { Composite area = (Composite) super.createDialogArea(parent); setMessage(Messages.EndpointDialog_MSG_Verify_and_select_target); Composite container = new Composite(area, SWT.NONE); GridLayout layout = new GridLayout(2, false); container.setLayout(layout); container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); createDeployOptionSection(container); createCommentSection(container); if (target == Endpoint.PUBLIC) { combo.setText(Messages.EndpointDialog_LBL_Public_endpoint); } else if (target == Endpoint.STAGING) { combo.setText(Messages.EndpointDialog_LBL_Staging_endpoint); } setTitle(Messages.EndpointDialog_TTL_Header); ImageDescriptor iconDesc = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, LARGE_IMAGE); image = iconDesc.createImage(); setTitleImage(image); return area; }
From source file:com.aptana.webserver.ui.WebServerUIPlugin.java
License:Open Source License
public static Image getImage(String iconPath) { ImageDescriptor desc = getDefault().getImageRegistry().getDescriptor(iconPath); if (desc == null) { desc = imageDescriptorFromPlugin(PLUGIN_ID, iconPath); getDefault().getImageRegistry().put(iconPath, desc); }//from ww w . ja va 2s. c o m return desc.createImage(); }
From source file:com.architexa.org.eclipse.gef.ui.palette.customize.PaletteLabelProvider.java
License:Open Source License
private Image getCachedImage(ImageDescriptor descriptor) { Image image = (Image) imageCache.get(descriptor); if (image == null) { image = descriptor.createImage(); imageCache.put(descriptor, image); }/*from w w w .j ava 2 s . c o m*/ return image; }
From source file:com.arm.cmsis.pack.ui.CpPlugInUI.java
License:Apache License
/** * Helper method to load an image//from w w w . j a v a 2 s .c o m * @param file name of the image * @return Image object */ private static Image createImage(String file) { String path = "icons/" + file; ImageDescriptor image = getImageDescriptor(path); if (image != null) return image.createImage(); return null; }
From source file:com.astra.ses.spell.gui.dialogs.AttachModeDialog.java
License:Open Source License
/*************************************************************************** * Constructor//from w w w .ja va 2 s. co m * * @param shell * The parent shell **************************************************************************/ public AttachModeDialog(Shell shell) { super(shell); // Obtain the image for the dialog icon ImageDescriptor descr = Activator.getImageDescriptor("icons/dlg_configuration.png"); m_downloadData = true; m_image = descr.createImage(); }
From source file:com.astra.ses.spell.gui.dialogs.CloseAllDialog.java
License:Open Source License
/*************************************************************************** * Constructor/* ww w . ja va2s . c o m*/ * * @param shell * The parent shell **************************************************************************/ public CloseAllDialog(Shell shell) { super(shell); // Obtain the image for the dialog icon ImageDescriptor descr = Activator.getImageDescriptor("icons/dlg_question.png"); m_image = descr.createImage(); }
From source file:com.astra.ses.spell.gui.dialogs.CloseProcDialog.java
License:Open Source License
/*************************************************************************** * Constructor//from ww w. j a va 2 s . c o m * * @param shell * The parent shell **************************************************************************/ public CloseProcDialog(Shell shell, String name, String status, ClientMode mode, boolean doingPrompt) { super(shell); m_name = name; m_mode = mode; m_status = status; m_promptActive = doingPrompt; // Obtain the image for the dialog icon ImageDescriptor descr = Activator.getImageDescriptor("icons/dlg_question.png"); m_image = descr.createImage(); }
From source file:com.astra.ses.spell.gui.dialogs.ConditionDialog.java
License:Open Source License
/*************************************************************************** * Constructor//from w ww . j av a 2 s. com * * @param shell * The parent shell **************************************************************************/ public ConditionDialog(Shell shell) { super(shell); // Obtain the image for the dialog icon ImageDescriptor descr = Activator.getImageDescriptor("icons/dlg_exec.png"); m_image = descr.createImage(); m_condition = null; }