Java Code Examples for org.openide.util.ImageUtilities#loadImage()
The following examples show how to use
org.openide.util.ImageUtilities#loadImage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JAXBBindingSupportFileNode.java From netbeans with Apache License 2.0 | 5 votes |
public Image getOpenedIcon(int type) { if (this.nodeDelegate != null){ return this.nodeDelegate.getOpenedIcon(type); } return ImageUtilities.loadImage( "org/netbeans/modules/xml/jaxb/resources/XML_file.png" );//NOI18N }
Example 2
Source File: InstanceNodeDecorator.java From netbeans with Apache License 2.0 | 5 votes |
private Image badgeIcon(Image origImg) { Image badge = null; switch (si.getServerState()) { case ServerInstance.STATE_WAITING : badge = ImageUtilities.loadImage(WAITING_ICON); break; case ServerInstance.STATE_RUNNING : badge = ImageUtilities.loadImage(RUNNING_ICON); break; case ServerInstance.STATE_DEBUGGING : badge = ImageUtilities.loadImage(DEBUGGING_ICON); break; case ServerInstance.STATE_SUSPENDED : badge = ImageUtilities.loadImage(SUSPENDED_ICON); break; case ServerInstance.STATE_PROFILING : badge = ImageUtilities.loadImage(PROFILING_ICON); break; case ServerInstance.STATE_PROFILER_BLOCKING : badge = ImageUtilities.loadImage(PROFILER_BLOCKING_ICON); break; case ServerInstance.STATE_PROFILER_STARTING : badge = ImageUtilities.loadImage(WAITING_ICON); break; default: break; } return badge != null ? ImageUtilities.mergeImages(origImg, badge, 15, 8) : origImg; }
Example 3
Source File: FakeJiraConnector.java From netbeans with Apache License 2.0 | 5 votes |
/** * Returns a fake {@link BugtrackingConnector} to be shown in the create * repository dialog. The repository controller panel notifies a the missing * JIRA plugin and comes with a button to download it from the Update Center. * * @return */ public static synchronized DelegatingConnector getConnector() { if(connector == null) { connector = new DelegatingConnector( new JiraProxyConnector(), "fake.jira.connector", // NOI18N NbBundle.getMessage(FakeJiraConnector.class, "LBL_FakeJiraName"), // NOI18N NbBundle.getMessage(FakeJiraConnector.class, "LBL_FakeJiraNameTooltip"), // NOI18N ImageUtilities.loadImage("org/netbeans/modules/bugtracking/ui/resources/repository.png", true)); } return connector; }
Example 4
Source File: NbGradleProject.java From netbeans with Apache License 2.0 | 5 votes |
public static final Icon getWarningIcon() { if (warningIcon == null) { Image icon = ImageUtilities.icon2Image(NbGradleProject.getIcon()); Image badge = ImageUtilities.loadImage(WARNING_BADGE); icon = ImageUtilities.mergeImages(icon, badge, 8, 0); warningIcon = ImageUtilities.image2Icon(icon); } return warningIcon; }
Example 5
Source File: SaasGroupNode.java From netbeans with Apache License 2.0 | 5 votes |
@Override public Image getOpenedIcon(int type){ Image icon = getVendorIcon(type); if (icon != null) { return icon; } Image standardFolderImage = getUserDirFolderImage(type, true); if (standardFolderImage != null) { return standardFolderImage; } return ImageUtilities.loadImage("org/netbeans/modules/websvc/saas/resources/folder-open.png"); // NOI18N }
Example 6
Source File: ListComponent.java From netbeans with Apache License 2.0 | 5 votes |
CancelAction(boolean text) { if (text) { putValue(Action.NAME, NbBundle.getMessage(ListComponent.class, "StatusLineComponent.Cancel")); putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0)); } else { Object icon = UIManager.get("nb.progress.cancel.icon"); if (icon == null) { // for custom L&F? icon = ImageUtilities.loadImage("org/netbeans/progress/module/resources/buton.png"); } putValue(Action.SMALL_ICON, iconOrImage2icon(icon)); } setEnabled(handle == null ? false : handle.isAllowCancel()); }
Example 7
Source File: ConfigurationsNode.java From netbeans with Apache License 2.0 | 5 votes |
@Override public Image getIcon(int type) { GradleProject gp = project.getGradleProject(); Image ret = ImageUtilities.loadImage(LIBRARIES_ICON); if (gp.getQuality().worseThan(Quality.FULL) || !gp.getBaseProject().isResolved()) { Image warn = ImageUtilities.loadImage(WARNING_BADGE); ret = ImageUtilities.mergeImages(ret, warn, 8, 0); } return ret; }
Example 8
Source File: TestPlatform.java From netbeans with Apache License 2.0 | 4 votes |
@Override public Image getIcon() { return ImageUtilities.loadImage("org/netbeans/tests/j2eeserver/plugin/registry/plugin.gif"); }
Example 9
Source File: MMDGraphEditor.java From netbeans-mmd-plugin with Apache License 2.0 | 4 votes |
@Override public Image getIcon() { return ImageUtilities.loadImage("com/igormaznitsa/nbmindmap/icons/logo/logo16.png"); //NOI18N }
Example 10
Source File: JaxWsClientNode.java From netbeans with Apache License 2.0 | 4 votes |
private java.awt.Image getErrorBadge() { if (cachedErrorBadge == null) { cachedErrorBadge = ImageUtilities.loadImage(ERROR_BADGE); } return cachedErrorBadge; }
Example 11
Source File: JSFConfigLoaderBeanInfo.java From netbeans with Apache License 2.0 | 4 votes |
/** @param type Desired type of the icon * @return returns the Image loader's icon */ public Image getIcon(final int type) { return ImageUtilities.loadImage("org/netbeans/modules/web/jsf/resources/JSFConfigIcon.png"); // NOI18N }
Example 12
Source File: GoalsPanel.java From NBANDROID-V2 with Apache License 2.0 | 4 votes |
@Override public Image getIcon(int type) { return ImageUtilities.loadImage(MOJO_USER_PNG); }
Example 13
Source File: JAXBWizardSchemaNode.java From netbeans with Apache License 2.0 | 4 votes |
@Override public Image getOpenedIcon(int type) { return ImageUtilities.loadImage( "org/netbeans/modules/xml/jaxb/resources/packageOpen.gif" ); // No I18N }
Example 14
Source File: JarDataLoaderBeanInfo.java From netbeans with Apache License 2.0 | 4 votes |
public Image getIcon(int type) { return ImageUtilities.loadImage("org/netbeans/modules/java/jarloader/jar.gif", true); }
Example 15
Source File: GraalVMApplicationType.java From visualvm with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ public Image getIcon() { String iconPath = "org/graalvm/visualvm/graalvm/application/type/GraalVM.png"; // NOI18N return ImageUtilities.loadImage(iconPath, true); }
Example 16
Source File: ImportantFilesNodeFactory.java From netbeans with Apache License 2.0 | 4 votes |
private Image getIcon(boolean opened) { Image badge = ImageUtilities.loadImage(CONFIG_BADGE, true); //NOI18N return ImageUtilities.mergeImages(NodeUtils.getTreeFolderIcon(opened), badge, 8, 8); }
Example 17
Source File: BusyIcon.java From netbeans with Apache License 2.0 | 3 votes |
/** * <p>Creates a new instance.</p> * <p> * The implementation first checks <code>UIManager</code> defaults and looks for <code>Icon</code> * under keys <code>"nb.tabcontrol.busy.icon.selected"</code> and <code>"nb.tabcontrol.busy.icon.normal"</code>. * If there is an Icon under those keys then the created instance will rotate * that Icon to animate it. * </p><p> * If there are no Icons in UIManager then there will be an attempt to create * animated Icon based <code>BusyPainter</code> in SwingX library. If swingx.jar * is available on classpath then reflection is used to create BusyPainter * instance and paint icon animations with it. * </p><p> * If SwingX library isn't available then the default image * <code>"org/netbeans/swing/tabcontrol/resources/busy_icon.png"</code> * will be rotated. * </p> * * @param selectedTab Boolean to create icon for selected tab state, false * to create icon for normal tab state. * @return Animated icon. */ public static BusyIcon create( boolean selectedTab ) { BusyIcon res = null; Icon img = UIManager.getIcon( "nb.tabcontrol.busy.icon." + (selectedTab ? "selected" : "normal") ); //NOI18N if( null != img ) { res = new ImageBusyIcon( ImageUtilities.icon2Image( img ) ); } else { res = SwingXBusyIcon.create(); } if( null == res ) res = new ImageBusyIcon( ImageUtilities.loadImage( "org/netbeans/swing/tabcontrol/resources/busy_icon.png") ); //NOI18N return res; }
Example 18
Source File: JavaEEDecoratorFactory.java From netbeans with Apache License 2.0 | votes |
@Override public Image getIcon(int type) { return ImageUtilities.loadImage(CONNECTOR_ICON); }
Example 19
Source File: JavaEEDecoratorFactory.java From netbeans with Apache License 2.0 | votes |
@Override public Image getOpenedIcon(int type) { return ImageUtilities.loadImage(JDBC_RESOURCE_ICON); }
Example 20
Source File: JavaEEDecoratorFactory.java From netbeans with Apache License 2.0 | votes |
@Override public Image getIcon(int type) { return ImageUtilities.loadImage(APPCLIENT_ICON); }