diff --git a/ant.freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java b/ant.freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java --- a/ant.freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java +++ b/ant.freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java @@ -199,9 +199,9 @@ public Icon getIcon() { if (usesAntScripting()) { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/ant/freeform/resources/freeform-project.png", true)); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/ant/freeform/resources/freeform-project.png", true); // NOI18N } else { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/project/ui/resources/projectTab.png", true)); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/projectTab.png", true); // NOI18N } } diff --git a/apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java b/apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java +++ b/apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java @@ -126,8 +126,7 @@ public static final String NB_PROJECT_ICON_PATH = "org/netbeans/modules/apisupport/project/resources/module.png"; // NOI18N - private static final Icon NB_PROJECT_ICON = new ImageIcon( - ImageUtilities.loadImage(NB_PROJECT_ICON_PATH)); + private static final Icon NB_PROJECT_ICON = ImageUtilities.loadImageIcon(NB_PROJECT_ICON_PATH, false); public static final String SOURCES_TYPE_JAVAHELP = "javahelp"; // NOI18N static final String[] COMMON_TEST_TYPES = {"unit", "qa-functional"}; // NOI18N diff --git a/apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProjectType.java b/apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProjectType.java --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProjectType.java +++ b/apisupport.project/src/org/netbeans/modules/apisupport/project/NbModuleProjectType.java @@ -82,7 +82,7 @@ } public Icon getIcon() { - return ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/apisupport/project/resources/module.png", true)); + return ImageUtilities.loadImageIcon("org/netbeans/modules/apisupport/project/resources/module.png", true); } } diff --git a/apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java b/apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java +++ b/apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProject.java @@ -248,7 +248,7 @@ } public Icon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(SUITE_ICON_PATH)); + return ImageUtilities.loadImageIcon(SUITE_ICON_PATH, false); } public Project getProject() { diff --git a/apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProjectType.java b/apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProjectType.java --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProjectType.java +++ b/apisupport.project/src/org/netbeans/modules/apisupport/project/suite/SuiteProjectType.java @@ -81,7 +81,7 @@ } public Icon getIcon() { - return ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/apisupport/project/suite/resources/suite.png", true)); + return ImageUtilities.loadImageIcon("org/netbeans/modules/apisupport/project/suite/resources/suite.png", true); } } diff --git a/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/LibrariesNode.java b/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/LibrariesNode.java --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/LibrariesNode.java +++ b/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/LibrariesNode.java @@ -312,7 +312,7 @@ */ private Icon getLibrariesIcon() { if (librariesIcon == null) { - librariesIcon = new ImageIcon(ImageUtilities.loadImage(LIBRARIES_ICON, true)); + librariesIcon = ImageUtilities.loadImageIcon(LIBRARIES_ICON, true); } return librariesIcon; } diff --git a/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/PlatformNode.java b/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/PlatformNode.java --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/PlatformNode.java +++ b/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/PlatformNode.java @@ -206,7 +206,7 @@ Icon icon; if ("jar".equals(roots[i].getURL().getProtocol())) { //NOI18N file = FileUtil.getArchiveFile(roots[i]); - icon = new ImageIcon(ImageUtilities.loadImage(ARCHIVE_ICON)); + icon = ImageUtilities.loadImageIcon(ARCHIVE_ICON, false); } else { file = roots[i]; icon = null; diff --git a/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/UnitTestLibrariesNode.java b/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/UnitTestLibrariesNode.java --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/UnitTestLibrariesNode.java +++ b/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/UnitTestLibrariesNode.java @@ -251,7 +251,7 @@ private Icon getLibrariesIcon() { if (librariesIcon == null) { - librariesIcon = new ImageIcon(ImageUtilities.loadImage(LIBRARIES_ICON, true)); + librariesIcon = ImageUtilities.loadImageIcon(LIBRARIES_ICON, true); } return librariesIcon; } diff --git a/asm/src/org/netbeans/modules/asm/core/ui/top/NavigatorAction.java b/asm/src/org/netbeans/modules/asm/core/ui/top/NavigatorAction.java --- a/asm/src/org/netbeans/modules/asm/core/ui/top/NavigatorAction.java +++ b/asm/src/org/netbeans/modules/asm/core/ui/top/NavigatorAction.java @@ -56,7 +56,7 @@ public NavigatorAction() { super(NbBundle.getMessage(NavigatorAction.class, "CTL_NavigatorAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(NavigatorTopComponent.ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(NavigatorTopComponent.ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/autoupdate.pluginimporter/src/org/netbeans/modules/autoupdate/pluginimporter/ImportManager.java b/autoupdate.pluginimporter/src/org/netbeans/modules/autoupdate/pluginimporter/ImportManager.java --- a/autoupdate.pluginimporter/src/org/netbeans/modules/autoupdate/pluginimporter/ImportManager.java +++ b/autoupdate.pluginimporter/src/org/netbeans/modules/autoupdate/pluginimporter/ImportManager.java @@ -158,7 +158,7 @@ } private void attachRealFlashingIcon (final JPanel p) { - ImageIcon img = new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/autoupdate/pluginimporter/resources/import.png", false)); // NOI18N + ImageIcon img = ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/pluginimporter/resources/import.png", false); // NOI18N final JButton bRemindLaterButton = new JButton (); final JButton bImportButton = new JButton (); final JButton bNoButton = new JButton (); @@ -200,7 +200,7 @@ JPanel panel = new JPanel (new GridBagLayout ()); panel.setOpaque (false); JLabel top = new JLabel (msg); - top.setIcon (new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/autoupdate/ui/resources/info_icon.png"))); //NOI18N + top.setIcon (ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/info_icon.png", false)); //NOI18N top.setIconTextGap (10); panel.add (top, new GridBagConstraints (0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets (6, 0, 0, 0), 0, 0)); diff --git a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/SortColumnHeaderRenderer.java b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/SortColumnHeaderRenderer.java --- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/SortColumnHeaderRenderer.java +++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/SortColumnHeaderRenderer.java @@ -112,16 +112,14 @@ private ImageIcon getSortAscIcon () { if (sortAscIcon == null) { - sortAscIcon = new ImageIcon (ImageUtilities.loadImage ( - "org/netbeans/modules/autoupdate/ui/resources/columnsSortedDesc.gif")); // NOI18N + sortAscIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/columnsSortedDesc.gif", false); // NOI18N } return sortAscIcon; } private ImageIcon getSortDescIcon () { if (sortDescIcon == null) { - sortDescIcon = new ImageIcon (ImageUtilities.loadImage ( - "org/netbeans/modules/autoupdate/ui/resources/columnsSortedAsc.gif")); // NOI18N + sortDescIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/columnsSortedAsc.gif", false); // NOI18N } return sortDescIcon; } diff --git a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java --- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java +++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java @@ -487,8 +487,7 @@ } } if (model.needsRestart ()) { - Icon warningIcon = new ImageIcon (ImageUtilities.loadImage ( - "org/netbeans/modules/autoupdate/ui/resources/warning.gif")); // NOI18N + Icon warningIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/warning.gif", false); // NOI18N lWarning.setIcon (warningIcon); lWarning.setText (NbBundle.getMessage (UnitTab.class, "UnitTab_lWarning_Text", NbBundle.getMessage (UnitTab.class, operationNameKey))); // NOI18N } diff --git a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/AutoupdateCheckScheduler.java b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/AutoupdateCheckScheduler.java --- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/AutoupdateCheckScheduler.java +++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/AutoupdateCheckScheduler.java @@ -551,7 +551,7 @@ "AutoupdateCheckScheduler_UpdateFound_ToolTip", updateCount) : // NOI18N NbBundle.getMessage(AutoupdateCheckScheduler.class, "AutoupdateCheckScheduler_UpdatesFound_ToolTip", updateCount)); // NOI18N - top.setIcon( new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/autoupdate/ui/resources/info_icon.png")) ); //NOI18N + top.setIcon( ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/info_icon.png", false)); //NOI18N top.setIconTextGap(10); panel.add( top, new GridBagConstraints(0,0,1,1,0.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.NONE,new Insets(6,0,0,0),0,0) ); diff --git a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/AvailableUpdatesNotification.java b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/AvailableUpdatesNotification.java --- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/AvailableUpdatesNotification.java +++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/AvailableUpdatesNotification.java @@ -72,7 +72,7 @@ */ private static Component getUpdatesVisualizer () { if (null == flasher) { - ImageIcon img1 = new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/autoupdate/ui/resources/newUpdates.png", false)); // NOI18N + ImageIcon img1 = ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/newUpdates.png", false); // NOI18N assert img1 != null : "Icon cannot be null."; flasher = new UpdatesFlasher (img1); } diff --git a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/InstallStep.java b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/InstallStep.java --- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/InstallStep.java +++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/InstallStep.java @@ -700,7 +700,7 @@ JPanel panel = new JPanel (new GridBagLayout ()); panel.setOpaque (false); JLabel top = new JLabel (msg); - top.setIcon (new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/autoupdate/ui/resources/info_icon.png"))); //NOI18N + top.setIcon (ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/info_icon.png", false)); //NOI18N top.setIconTextGap (10); panel.add (top, new GridBagConstraints (0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets (0, 0, 0, 0), 0, 0)); return panel; diff --git a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/NetworkProblemNotification.java b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/NetworkProblemNotification.java --- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/NetworkProblemNotification.java +++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/NetworkProblemNotification.java @@ -73,7 +73,7 @@ */ private static Component getUpdatesVisualizer () { if (null == flasher) { - ImageIcon img1 = new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/autoupdate/ui/resources/error.png", false)); // NOI18N + ImageIcon img1 = ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/error.png", false); // NOI18N assert img1 != null : "Icon cannot be null."; flasher = new UpdatesFlasher (img1); } diff --git a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/RestartNeededNotification.java b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/RestartNeededNotification.java --- a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/RestartNeededNotification.java +++ b/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/wizards/RestartNeededNotification.java @@ -73,7 +73,7 @@ */ private static Component getUpdatesVisualizer () { if (null == flasher) { - ImageIcon img1 = new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/autoupdate/ui/resources/restart.png", false)); // NOI18N + ImageIcon img1 = ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/restart.png", false); // NOI18N assert img1 != null : "Icon cannot be null."; flasher = new UpdatesFlasher (img1); } diff --git a/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/Console.java b/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/Console.java --- a/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/Console.java +++ b/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/Console.java @@ -41,10 +41,7 @@ // When changed, update also mf-layer.xml, where are the properties duplicated because of Actions.alwaysEnabled() putValue(NAME,NbBundle.getMessage(Process.class, "LBL_ConsoleView"));// NOI18N putValue( - SMALL_ICON, - new ImageIcon (ImageUtilities.loadImage ( - "org/netbeans/modules/bpel/debugger/ui/" + // NOI18N - "resources/image/console.gif"))); // NOI18N + SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/debugger/ui/" + "resources/image/console.gif", false)); // NOI18N } /**{@inheritDoc}*/ diff --git a/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/PLinks.java b/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/PLinks.java --- a/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/PLinks.java +++ b/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/PLinks.java @@ -40,8 +40,7 @@ // When changed, update also mf-layer.xml, where are the properties duplicated because of Actions.alwaysEnabled() putValue(NAME, NbBundle.getMessage( PLinks.class, "LBL_PLinksView")); // NOI18N - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage( - PLinksNodeModel.PARTNER_LINK_ICON + ".gif"))); // NOI18N + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(PLinksNodeModel.PARTNER_LINK_ICON + ".gif", false)); // NOI18N } public void actionPerformed(ActionEvent e) { diff --git a/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/Process.java b/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/Process.java --- a/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/Process.java +++ b/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/Process.java @@ -42,10 +42,7 @@ // When changed, update also mf-layer.xml, where are the properties duplicated because of Actions.alwaysEnabled() putValue(NAME, NbBundle.getMessage(Process.class, "LBL_ProcessView"));//NOI18N putValue( - SMALL_ICON, - new ImageIcon (ImageUtilities.loadImage ( - "org/netbeans/modules/bpel/debugger/ui/" + // NOI18N - "resources/image/process.gif"))); // NOI18N + SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/debugger/ui/" + "resources/image/process.gif", false)); // NOI18N } /**{@inheritDoc}*/ diff --git a/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/ProcessExecution.java b/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/ProcessExecution.java --- a/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/ProcessExecution.java +++ b/bpel.debugger.ui/src/org/netbeans/modules/bpel/debugger/ui/action/ProcessExecution.java @@ -39,9 +39,7 @@ // When changed, update also mf-layer.xml, where are the properties duplicated because of Actions.alwaysEnabled() putValue(NAME, NbBundle.getMessage( ProcessExecution.class, "LBL_ProcessExecutionView")); // NOI18N - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage ( - "org/netbeans/modules/bpel/debugger/ui/" + // NOI18N - "resources/image/process_execution.png"))); // NOI18N + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/debugger/ui/" + "resources/image/process_execution.png", false)); // NOI18N } public void actionPerformed(ActionEvent e) { diff --git a/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsDeleteAction.java b/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsDeleteAction.java --- a/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsDeleteAction.java +++ b/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsDeleteAction.java @@ -59,9 +59,7 @@ //public static final String ACCELERATOR = "alt shift F10"; // NOI18N - private static final Icon ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/bpel/design/actions/" + // NOI18N - "resources/breakpoints_delete.png")); // NOI18N + private static final Icon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/design/actions/" + "resources/breakpoints_delete.png", false); // NOI18N private static final String LABEL = NbBundle.getMessage( BreakpointsDeleteAction.class, "NAME_Breakpoints_Delete"); diff --git a/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsDisableAction.java b/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsDisableAction.java --- a/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsDisableAction.java +++ b/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsDisableAction.java @@ -59,9 +59,7 @@ //public static final String ACCELERATOR = "alt shift F10"; // NOI18N - private static final Icon ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/bpel/design/actions/" + // NOI18N - "resources/breakpoints_disable.png")); // NOI18N + private static final Icon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/design/actions/" + "resources/breakpoints_disable.png", false); // NOI18N private static final String LABEL = NbBundle.getMessage( BreakpointsDisableAction.class, "NAME_Breakpoints_Disable"); diff --git a/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsEnableAction.java b/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsEnableAction.java --- a/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsEnableAction.java +++ b/bpel.editors/src/org/netbeans/modules/bpel/design/actions/BreakpointsEnableAction.java @@ -59,9 +59,7 @@ //public static final String ACCELERATOR = "alt shift F10"; // NOI18N - private static final Icon ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/bpel/design/actions/" + // NOI18N - "resources/breakpoints_enable.png")); // NOI18N + private static final Icon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/design/actions/" + "resources/breakpoints_enable.png", false); // NOI18N private static final String LABEL = NbBundle.getMessage( BreakpointsEnableAction.class, "NAME_Breakpoints_Enable"); diff --git a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/DefineCorrelationWizard.java b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/DefineCorrelationWizard.java --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/DefineCorrelationWizard.java +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/DefineCorrelationWizard.java @@ -287,40 +287,40 @@ Map mapIcons = new HashMap(9); String iconFileName = IMAGE_FOLDER_NAME + "UNKNOWN_TYPE" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(Object.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(Object.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "RECEIVE" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(Receive.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(Receive.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "REPLY" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(Reply.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(Reply.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "INVOKE" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(Invoke.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(Invoke.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "MESSAGE_TYPE" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(Message.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(Message.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "MESSAGE_PART" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(Part.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(Part.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "ON_EVENT" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(OnEvent.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(OnEvent.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "MESSAGE_HANDLER" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(OnMessage.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(OnMessage.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "GLOBAL_ELEMENT" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(Element.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(Element.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "ATTRIBUTE" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(Attribute.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(Attribute.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "GLOBAL_COMPLEX_TYPE" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(ComplexType.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(ComplexType.class, ImageUtilities.loadImageIcon(iconFileName, false)); iconFileName = IMAGE_FOLDER_NAME + "GLOBAL_SIMPLE_TYPE" + IMAGE_FILE_EXT; // NOI18N - mapIcons.put(SimpleType.class, new ImageIcon(ImageUtilities.loadImage(iconFileName))); + mapIcons.put(SimpleType.class, ImageUtilities.loadImageIcon(iconFileName, false)); return mapIcons; } diff --git a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/tree/models/SimpleTreeInfoProvider.java b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/tree/models/SimpleTreeInfoProvider.java --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/tree/models/SimpleTreeInfoProvider.java +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/tree/models/SimpleTreeInfoProvider.java @@ -41,8 +41,7 @@ public class SimpleTreeInfoProvider implements TreeItemInfoProvider, TreeItemActionsProvider { - public static Icon RESULT_IMAGE = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/bpel/mapper/tree/models/RESULT.png")); + public static Icon RESULT_IMAGE = ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/mapper/tree/models/RESULT.png", false); private static SimpleTreeInfoProvider singleton = new SimpleTreeInfoProvider(); diff --git a/bpel.project/src/org/netbeans/modules/bpel/project/BpelproProject.java b/bpel.project/src/org/netbeans/modules/bpel/project/BpelproProject.java --- a/bpel.project/src/org/netbeans/modules/bpel/project/BpelproProject.java +++ b/bpel.project/src/org/netbeans/modules/bpel/project/BpelproProject.java @@ -97,7 +97,7 @@ * @author Chris Webster */ public final class BpelproProject implements Project, AntProjectListener, ProjectPropertyProvider { - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/bpel/project/resources/bpelProject.png")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/project/resources/bpelProject.png", false); // NOI18N public static final String ARTIFACT_TYPE_JBI_ASA = "CAPS.asa"; public static final String MODULE_INSTALL_NAME = "modules/org-netbeans-modules-bpel-project.jar"; diff --git a/bpel.project/src/org/netbeans/modules/bpel/project/IcanproProject.java b/bpel.project/src/org/netbeans/modules/bpel/project/IcanproProject.java --- a/bpel.project/src/org/netbeans/modules/bpel/project/IcanproProject.java +++ b/bpel.project/src/org/netbeans/modules/bpel/project/IcanproProject.java @@ -74,7 +74,7 @@ */ public final class IcanproProject implements Project, AntProjectListener { - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/bpel/project/ui/resources/icanproProjectIcon.gif")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/bpel/project/ui/resources/icanproProjectIcon.gif", false); // NOI18N public static final String SOURCES_TYPE_ICANPRO = "BIZPRO"; private final AntProjectHelper helper; diff --git a/bpel.project/src/org/netbeans/modules/bpel/project/ui/customizer/VisualClassPathItem.java b/bpel.project/src/org/netbeans/modules/bpel/project/ui/customizer/VisualClassPathItem.java --- a/bpel.project/src/org/netbeans/modules/bpel/project/ui/customizer/VisualClassPathItem.java +++ b/bpel.project/src/org/netbeans/modules/bpel/project/ui/customizer/VisualClassPathItem.java @@ -48,10 +48,10 @@ private static String RESOURCE_ICON_ARTIFACT = "org/netbeans/modules/bpel/project/ui/resources/projectDependencies.gif"; //NOI18N private static String RESOURCE_ICON_CLASSPATH = "org/netbeans/modules/bpel/project/ui/resources/j2seProject.gif"; //NOI18N - private static Icon ICON_JAR = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_JAR ) ); - private static Icon ICON_LIBRARY = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_LIBRARY ) ); - private static Icon ICON_ARTIFACT = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_ARTIFACT ) ); - private static Icon ICON_CLASSPATH = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_CLASSPATH ) ); + private static Icon ICON_JAR = ImageUtilities.loadImageIcon(RESOURCE_ICON_JAR, false); + private static Icon ICON_LIBRARY = ImageUtilities.loadImageIcon(RESOURCE_ICON_LIBRARY, false); + private static Icon ICON_ARTIFACT = ImageUtilities.loadImageIcon(RESOURCE_ICON_ARTIFACT, false); + private static Icon ICON_CLASSPATH = ImageUtilities.loadImageIcon(RESOURCE_ICON_CLASSPATH, false); private int type; diff --git a/clearcase/src/org/netbeans/modules/clearcase/ui/status/OpenVersioningAction.java b/clearcase/src/org/netbeans/modules/clearcase/ui/status/OpenVersioningAction.java --- a/clearcase/src/org/netbeans/modules/clearcase/ui/status/OpenVersioningAction.java +++ b/clearcase/src/org/netbeans/modules/clearcase/ui/status/OpenVersioningAction.java @@ -56,7 +56,7 @@ public OpenVersioningAction() { putValue("noIconInMenu", Boolean.FALSE); // NOI18N - setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/clearcase/resources/icons/versioning-view.png"))); // NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/clearcase/resources/icons/versioning-view.png", false)); // NOI18N } diff --git a/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/models/Utils.java b/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/models/Utils.java --- a/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/models/Utils.java +++ b/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/models/Utils.java @@ -132,7 +132,7 @@ // } public static ImageIcon getIcon (String iconBase) { - return new ImageIcon (ImageUtilities.loadImage (iconBase+".gif")); + return ImageUtilities.loadImageIcon(iconBase + ".gif", false); } /** diff --git a/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/ui/MemoryViewAction.java b/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/ui/MemoryViewAction.java --- a/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/ui/MemoryViewAction.java +++ b/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/ui/MemoryViewAction.java @@ -53,7 +53,7 @@ public MemoryViewAction() { // When changed, update also mf-layer.xml, where are the properties duplicated because of Actions.alwaysEnabled() super(NbBundle.getMessage(MemoryViewAction.class, "CTL_MemoryViewAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(MemoryViewTopComponent.ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(MemoryViewTopComponent.ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/ui/RegistersAction.java b/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/ui/RegistersAction.java --- a/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/ui/RegistersAction.java +++ b/cnd.debugger.gdb/src/org/netbeans/modules/cnd/debugger/gdb/ui/RegistersAction.java @@ -19,7 +19,7 @@ public RegistersAction() { // When changed, update also mf-layer.xml, where are the properties duplicated because of Actions.alwaysEnabled() super(NbBundle.getMessage(RegistersAction.class, "CTL_RegistersAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(RegistersTopComponent.ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(RegistersTopComponent.ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/configurations/MakeConfigurationDescriptor.java b/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/configurations/MakeConfigurationDescriptor.java --- a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/configurations/MakeConfigurationDescriptor.java +++ b/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/configurations/MakeConfigurationDescriptor.java @@ -101,7 +101,7 @@ public static final String RESOURCE_FILES_FOLDER = "ResourceFiles"; // NOI18N public static final String ICONBASE = "org/netbeans/modules/cnd/makeproject/ui/resources/makeProject"; // NOI18N public static final String ICON = "org/netbeans/modules/cnd/makeproject/ui/resources/makeProject.gif"; // NOI18N - public static final Icon MAKEFILE_ICON = new ImageIcon(ImageUtilities.loadImage(ICON)); // NOI18N + public static final Icon MAKEFILE_ICON = ImageUtilities.loadImageIcon(ICON, false); // NOI18N private Project project = null; private String baseDir; private boolean modified = false; diff --git a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/configurations/ui/StdLibPanel.java b/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/configurations/ui/StdLibPanel.java --- a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/configurations/ui/StdLibPanel.java +++ b/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/configurations/ui/StdLibPanel.java @@ -73,7 +73,7 @@ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel label = (JLabel)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); LibraryItem libraryItem = (LibraryItem)value; - label.setIcon(new ImageIcon(ImageUtilities.loadImage(libraryItem.getIconName()))); + label.setIcon(ImageUtilities.loadImageIcon(libraryItem.getIconName(), false)); label.setToolTipText(libraryItem.getToolTip()); return label; } diff --git a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/configurations/ui/TableEditorPanel.java b/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/configurations/ui/TableEditorPanel.java --- a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/configurations/ui/TableEditorPanel.java +++ b/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/configurations/ui/TableEditorPanel.java @@ -238,7 +238,7 @@ Object element = listData.elementAt(row); if (!(element instanceof LibraryItem)) { // FIXUP ERROR! - label.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/cnd/resources/blank.gif"))); // NOI18N + label.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/cnd/resources/blank.gif", false)); // NOI18N label.setToolTipText("unknown"); // NOI18N return label; } diff --git a/cnd.modelutil/src/org/netbeans/modules/cnd/modelutil/CsmImageLoader.java b/cnd.modelutil/src/org/netbeans/modules/cnd/modelutil/CsmImageLoader.java --- a/cnd.modelutil/src/org/netbeans/modules/cnd/modelutil/CsmImageLoader.java +++ b/cnd.modelutil/src/org/netbeans/modules/cnd/modelutil/CsmImageLoader.java @@ -425,7 +425,7 @@ private static ImageIcon getCachedImageIcon(String iconPath) { ImageIcon icon = map.get(iconPath); if (icon == null) { - icon = new ImageIcon(ImageUtilities.loadImage(iconPath)); + icon = ImageUtilities.loadImageIcon(iconPath, false); map.put(iconPath, icon); } return icon; diff --git a/cnd.qnavigator/src/org/netbeans/modules/cnd/qnavigator/navigator/NavigatorModel.java b/cnd.qnavigator/src/org/netbeans/modules/cnd/qnavigator/navigator/NavigatorModel.java --- a/cnd.qnavigator/src/org/netbeans/modules/cnd/qnavigator/navigator/NavigatorModel.java +++ b/cnd.qnavigator/src/org/netbeans/modules/cnd/qnavigator/navigator/NavigatorModel.java @@ -503,8 +503,7 @@ private JRadioButtonMenuItem menuItem; public SortByNameAction() { putValue(Action.NAME, NbBundle.getMessage(NavigatorModel.class, "SortByNameText")); // NOI18N - putValue(Action.SMALL_ICON, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/cnd/qnavigator/resources/sortAlpha.png"))); // NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/cnd/qnavigator/resources/sortAlpha.png", false)); // NOI18N menuItem = new JRadioButtonMenuItem((String)getValue(Action.NAME)); menuItem.setAction(this); //Mnemonics.setLocalizedText(menuItem, (String)getValue(Action.NAME)); @@ -531,8 +530,7 @@ private JRadioButtonMenuItem menuItem; public SortBySourceAction() { putValue(Action.NAME, NbBundle.getMessage(NavigatorModel.class, "SortBySourceText")); // NOI18N - putValue(Action.SMALL_ICON, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/cnd/qnavigator/resources/sortPosition.png"))); // NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/cnd/qnavigator/resources/sortPosition.png", false)); // NOI18N menuItem = new JRadioButtonMenuItem((String)getValue(Action.NAME)); menuItem.setAction(this); //Mnemonics.setLocalizedText(menuItem, (String)getValue(Action.NAME)); diff --git a/cnd.refactoring/src/org/netbeans/modules/cnd/refactoring/introduce/ErrorLabel.java b/cnd.refactoring/src/org/netbeans/modules/cnd/refactoring/introduce/ErrorLabel.java --- a/cnd.refactoring/src/org/netbeans/modules/cnd/refactoring/introduce/ErrorLabel.java +++ b/cnd.refactoring/src/org/netbeans/modules/cnd/refactoring/introduce/ErrorLabel.java @@ -120,7 +120,7 @@ } protected Icon getErrorIcon() { - return new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/java/editor/resources/error-glyph.gif") ); + return ImageUtilities.loadImageIcon("org/netbeans/modules/java/editor/resources/error-glyph.gif", false); } /** diff --git a/compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/IcanproProject.java b/compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/IcanproProject.java --- a/compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/IcanproProject.java +++ b/compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/IcanproProject.java @@ -74,7 +74,7 @@ */ public final class IcanproProject implements Project, AntProjectListener { - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/compapp/projects/base/ui/resources/icanproProjectIcon.gif")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/compapp/projects/base/ui/resources/icanproProjectIcon.gif", false); // NOI18N public static final String SOURCES_TYPE_ICANPRO = "BIZPRO"; private final AntProjectHelper helper; diff --git a/compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/ui/customizer/VisualClassPathItem.java b/compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/ui/customizer/VisualClassPathItem.java --- a/compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/ui/customizer/VisualClassPathItem.java +++ b/compapp.projects.base/src/org/netbeans/modules/compapp/projects/base/ui/customizer/VisualClassPathItem.java @@ -50,10 +50,10 @@ private static String RESOURCE_ICON_ARTIFACT = "org/netbeans/modules/compapp/projects/base/ui/resources/projectDependencies.gif"; //NOI18N private static String RESOURCE_ICON_CLASSPATH = "org/netbeans/modules/compapp/projects/base/ui/resources/j2seProject.gif"; //NOI18N - private static Icon ICON_JAR = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_JAR ) ); - private static Icon ICON_LIBRARY = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_LIBRARY ) ); - private static Icon ICON_ARTIFACT = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_ARTIFACT ) ); - private static Icon ICON_CLASSPATH = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_CLASSPATH ) ); + private static Icon ICON_JAR = ImageUtilities.loadImageIcon(RESOURCE_ICON_JAR, false); + private static Icon ICON_LIBRARY = ImageUtilities.loadImageIcon(RESOURCE_ICON_LIBRARY, false); + private static Icon ICON_ARTIFACT = ImageUtilities.loadImageIcon(RESOURCE_ICON_ARTIFACT, false); + private static Icon ICON_CLASSPATH = ImageUtilities.loadImageIcon(RESOURCE_ICON_CLASSPATH, false); private int type; diff --git a/compapp.projects.base/src/org/netbeans/modules/compapp/projects/common/ui/NamespaceReferenceCreator.java b/compapp.projects.base/src/org/netbeans/modules/compapp/projects/common/ui/NamespaceReferenceCreator.java --- a/compapp.projects.base/src/org/netbeans/modules/compapp/projects/common/ui/NamespaceReferenceCreator.java +++ b/compapp.projects.base/src/org/netbeans/modules/compapp/projects/common/ui/NamespaceReferenceCreator.java @@ -352,8 +352,7 @@ messageLabel.setIcon(null); } else { messageLabel.setText(msg); - messageLabel.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/xml/xam/ui/resources/error.gif"))); // NOI18N + messageLabel.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/xml/xam/ui/resources/error.gif", false)); // NOI18N } } diff --git a/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/JbiProject.java b/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/JbiProject.java --- a/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/JbiProject.java +++ b/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/JbiProject.java @@ -104,11 +104,7 @@ * @author Chris Webster */ public final class JbiProject implements Project, AntProjectListener, ProjectPropertyProvider { - private static final Icon PROJECT_ICON = new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/compapp/projects/jbi/ui/resources/composite_application_project.png" // NOI18N - ) - ); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/compapp/projects/jbi/ui/resources/composite_application_project.png", false); // NOI18N /** * DOCUMENT ME! diff --git a/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/ui/customizer/VisualClassPathItem.java b/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/ui/customizer/VisualClassPathItem.java --- a/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/ui/customizer/VisualClassPathItem.java +++ b/compapp.projects.jbi/src/org/netbeans/modules/compapp/projects/jbi/ui/customizer/VisualClassPathItem.java @@ -93,10 +93,10 @@ private static String RESOURCE_ICON_LIBRARY = "org/netbeans/modules/compapp/projects/jbi/ui/resources/libraries.gif"; // NOI18N private static String RESOURCE_ICON_ARTIFACT = "org/netbeans/modules/compapp/projects/jbi/ui/resources/projectDependencies.gif"; // NOI18N private static String RESOURCE_ICON_CLASSPATH = "org/netbeans/modules/compapp/projects/jbi/ui/resources/j2seProject.gif"; // NOI18N - private static Icon ICON_JAR = new ImageIcon(ImageUtilities.loadImage(RESOURCE_ICON_JAR)); - private static Icon ICON_LIBRARY = new ImageIcon(ImageUtilities.loadImage(RESOURCE_ICON_LIBRARY)); - private static Icon ICON_ARTIFACT = new ImageIcon(ImageUtilities.loadImage(RESOURCE_ICON_ARTIFACT)); - private static Icon ICON_CLASSPATH = new ImageIcon(ImageUtilities.loadImage(RESOURCE_ICON_CLASSPATH)); + private static Icon ICON_JAR = ImageUtilities.loadImageIcon(RESOURCE_ICON_JAR, false); + private static Icon ICON_LIBRARY = ImageUtilities.loadImageIcon(RESOURCE_ICON_LIBRARY, false); + private static Icon ICON_ARTIFACT = ImageUtilities.loadImageIcon(RESOURCE_ICON_ARTIFACT, false); + private static Icon ICON_CLASSPATH = ImageUtilities.loadImageIcon(RESOURCE_ICON_CLASSPATH, false); private int type; private Object cpElement; diff --git a/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java b/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java --- a/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java +++ b/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java @@ -877,18 +877,15 @@ if (msg != null && msg.trim().length() > 0) { switch (msgType) { case MSG_TYPE_ERROR: - prepareMessage(notificationLine, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/core/windows/resources/error.png")), + prepareMessage(notificationLine, ImageUtilities.loadImageIcon("org/netbeans/core/windows/resources/error.png", false), nbErrorForeground); break; case MSG_TYPE_WARNING: - prepareMessage(notificationLine, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/core/windows/resources/warning.png")), + prepareMessage(notificationLine, ImageUtilities.loadImageIcon("org/netbeans/core/windows/resources/warning.png", false), nbWarningForeground); break; case MSG_TYPE_INFO: - prepareMessage(notificationLine, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/core/windows/resources/info.png")), + prepareMessage(notificationLine, ImageUtilities.loadImageIcon("org/netbeans/core/windows/resources/info.png", false), nbInfoForeground); break; default: diff --git a/css.editor/src/org/netbeans/modules/css/gsf/CSSCompletion.java b/css.editor/src/org/netbeans/modules/css/gsf/CSSCompletion.java --- a/css.editor/src/org/netbeans/modules/css/gsf/CSSCompletion.java +++ b/css.editor/src/org/netbeans/modules/css/gsf/CSSCompletion.java @@ -757,12 +757,12 @@ public ImageIcon getIcon() { if (kind == CompletionItemKind.PROPERTY) { if (propertyIcon == null) { - propertyIcon = new ImageIcon(ImageUtilities.loadImage(CSS_PROPERTY)); + propertyIcon = ImageUtilities.loadImageIcon(CSS_PROPERTY, false); } return propertyIcon; } else if (kind == CompletionItemKind.VALUE) { if (valueIcon == null) { - valueIcon = new ImageIcon(ImageUtilities.loadImage(CSS_VALUE)); + valueIcon = ImageUtilities.loadImageIcon(CSS_VALUE, false); } return valueIcon; } diff --git a/css.visual/src/org/netbeans/modules/css/visual/ui/StyleBuilderAction.java b/css.visual/src/org/netbeans/modules/css/visual/ui/StyleBuilderAction.java --- a/css.visual/src/org/netbeans/modules/css/visual/ui/StyleBuilderAction.java +++ b/css.visual/src/org/netbeans/modules/css/visual/ui/StyleBuilderAction.java @@ -58,7 +58,7 @@ public StyleBuilderAction() { super(NbBundle.getMessage(StyleBuilderAction.class, "CTL_CSSStyleBuilderAction")); - putValue(SMALL_ICON,new ImageIcon(ImageUtilities.loadImage(ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/css.visual/src/org/netbeans/modules/css/visual/ui/preview/CssPreviewAction.java b/css.visual/src/org/netbeans/modules/css/visual/ui/preview/CssPreviewAction.java --- a/css.visual/src/org/netbeans/modules/css/visual/ui/preview/CssPreviewAction.java +++ b/css.visual/src/org/netbeans/modules/css/visual/ui/preview/CssPreviewAction.java @@ -55,7 +55,7 @@ public CssPreviewAction() { super(NbBundle.getMessage(CssPreviewAction.class, "CTL_CssPreviewAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(CssPreviewTopComponent.ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(CssPreviewTopComponent.ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItem.java b/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItem.java --- a/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItem.java +++ b/db.sql.editor/src/org/netbeans/modules/db/sql/editor/completion/SQLCompletionItem.java @@ -72,11 +72,11 @@ private static final String BOLD = ""; // NOI18N private static final String BOLD_END = ""; // NOI18N - private static final ImageIcon CATALOG_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/db/sql/editor/completion/resources/catalog.png")); // NOI18N - private static final ImageIcon SCHEMA_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/db/sql/editor/completion/resources/schema.png")); // NOI18N - private static final ImageIcon TABLE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/db/sql/editor/completion/resources/table.png")); // NOI18N - private static final ImageIcon ALIAS_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/db/sql/editor/completion/resources/alias.png")); // NOI18N - private static final ImageIcon COLUMN_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/db/sql/editor/completion/resources/column.png")); // NOI18N + private static final ImageIcon CATALOG_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/db/sql/editor/completion/resources/catalog.png", false); // NOI18N + private static final ImageIcon SCHEMA_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/db/sql/editor/completion/resources/schema.png", false); // NOI18N + private static final ImageIcon TABLE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/db/sql/editor/completion/resources/table.png", false); // NOI18N + private static final ImageIcon ALIAS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/db/sql/editor/completion/resources/alias.png", false); // NOI18N + private static final ImageIcon COLUMN_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/db/sql/editor/completion/resources/column.png", false); // NOI18N private final SubstitutionHandler substHandler; private final String substText; diff --git a/db/src/org/netbeans/modules/db/util/ErrorInfoPanel.java b/db/src/org/netbeans/modules/db/util/ErrorInfoPanel.java --- a/db/src/org/netbeans/modules/db/util/ErrorInfoPanel.java +++ b/db/src/org/netbeans/modules/db/util/ErrorInfoPanel.java @@ -88,8 +88,8 @@ infoColor = UIManager.getColor("Label.foreground"); //NOI18N; } - errorIcon = new ImageIcon(ImageUtilities.loadImage(ERRORICON)); - infoIcon = new ImageIcon(ImageUtilities.loadImage(INFOICON)); + errorIcon = ImageUtilities.loadImageIcon(ERRORICON, false); + infoIcon = ImageUtilities.loadImageIcon(INFOICON, false); } diff --git a/debugger.jpda.heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/views/InstancesView.java b/debugger.jpda.heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/views/InstancesView.java --- a/debugger.jpda.heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/views/InstancesView.java +++ b/debugger.jpda.heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/views/InstancesView.java @@ -309,7 +309,7 @@ } }); org.openide.awt.Mnemonics.setLocalizedText(pauseButton, NbBundle.getMessage(InstancesView.class, "CTL_Pause")); - pauseButton.setIcon(new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/debugger/resources/actions/Pause.gif"))); + pauseButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/actions/Pause.gif", false)); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.CENTER; diff --git a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/DebuggingView.java b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/DebuggingView.java --- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/DebuggingView.java +++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/DebuggingView.java @@ -183,12 +183,12 @@ initComponents(); - resumeIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/debugger/jpda/resources/resume_button_16.png")); - focusedResumeIcon = new ImageIcon(Utilities.loadImage("org/netbeans/modules/debugger/jpda/resources/resume_button_focused_16.png")); - pressedResumeIcon = new ImageIcon(Utilities.loadImage("org/netbeans/modules/debugger/jpda/resources/resume_button_pressed_16.png")); - suspendIcon = new ImageIcon(Utilities.loadImage("org/netbeans/modules/debugger/jpda/resources/suspend_button_16.png")); - focusedSuspendIcon = new ImageIcon(Utilities.loadImage("org/netbeans/modules/debugger/jpda/resources/suspend_button_focused_16.png")); - pressedSuspendIcon = new ImageIcon(Utilities.loadImage("org/netbeans/modules/debugger/jpda/resources/suspend_button_pressed_16.png")); + resumeIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/jpda/resources/resume_button_16.png", false); + focusedResumeIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/jpda/resources/resume_button_focused_16.png", false); + pressedResumeIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/jpda/resources/resume_button_pressed_16.png", false); + suspendIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/jpda/resources/suspend_button_16.png", false); + focusedSuspendIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/jpda/resources/suspend_button_focused_16.png", false); + pressedSuspendIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/jpda/resources/suspend_button_pressed_16.png", false); setBackground(treeBackgroundColor); diff --git a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/FiltersDescriptor.java b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/FiltersDescriptor.java --- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/FiltersDescriptor.java +++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/FiltersDescriptor.java @@ -50,7 +50,6 @@ import java.util.prefs.Preferences; import javax.swing.AbstractAction; import javax.swing.Icon; -import javax.swing.ImageIcon; import javax.swing.JToggleButton; import javax.swing.Action; @@ -62,11 +61,11 @@ import javax.swing.JRadioButtonMenuItem; import org.openide.util.NbBundle; import org.openide.util.NbPreferences; -import org.openide.util.Utilities; import org.netbeans.modules.debugger.jpda.ui.models.DebuggingMonitorModel; import org.netbeans.modules.debugger.jpda.ui.models.DebuggingNodeModel; import org.netbeans.modules.debugger.jpda.ui.models.DebuggingTreeModel; +import org.openide.util.ImageUtilities; import org.openide.util.actions.Presenter; @@ -212,7 +211,7 @@ } private static Icon loadIcon(String iconName) { - return new ImageIcon(Utilities.loadImage("org/netbeans/modules/debugger/jpda/resources/" + iconName)); + return ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/jpda/resources/" + iconName, false); } private static String getString(String label) { diff --git a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/InfoPanel.java b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/InfoPanel.java --- a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/InfoPanel.java +++ b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/debugging/InfoPanel.java @@ -74,6 +74,7 @@ import org.netbeans.modules.debugger.jpda.ui.models.DebuggingNodeModel; import org.openide.awt.DropDownButtonFactory; import org.openide.util.Exceptions; +import org.openide.util.ImageUtilities; import org.openide.util.NbBundle; import org.openide.util.RequestProcessor; import org.openide.util.Utilities; @@ -448,7 +449,7 @@ private JButton createArrowButton() { arrowMenu = new JPopupMenu(); JButton button = DropDownButtonFactory.createDropDownButton( - new ImageIcon(Utilities.loadImage ("org/netbeans/modules/debugger/jpda/resources/unvisited_bpkt_arrow_small_16.png")), arrowMenu); + ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/jpda/resources/unvisited_bpkt_arrow_small_16.png", false), arrowMenu); button.setPreferredSize(new Dimension(40, button.getPreferredSize().height)); // [TODO] button.setMaximumSize(new Dimension(40, button.getPreferredSize().height)); // [TODO] button.setFocusable(false); diff --git a/deployment.wm/src/org/netbeans/modules/deployment/wm/RemoteFilesystemChooser.java b/deployment.wm/src/org/netbeans/modules/deployment/wm/RemoteFilesystemChooser.java --- a/deployment.wm/src/org/netbeans/modules/deployment/wm/RemoteFilesystemChooser.java +++ b/deployment.wm/src/org/netbeans/modules/deployment/wm/RemoteFilesystemChooser.java @@ -95,7 +95,7 @@ private static boolean foldersOnly; private ExplorerManager em; - private static final ImageIcon CDC_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/deployment/wm/resources/cdcProject.png")); // NOI18N + private static final ImageIcon CDC_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/deployment/wm/resources/cdcProject.png", false); // NOI18N private static final String FOLDER_ICON_BASE = "org/openide/loaders/defaultFolder"; //NOI18N private PropertyChangeListener pcl = new PropertyChangeListener() { diff --git a/diff/src/org/netbeans/modules/diff/builtin/SingleDiffPanel.java b/diff/src/org/netbeans/modules/diff/builtin/SingleDiffPanel.java --- a/diff/src/org/netbeans/modules/diff/builtin/SingleDiffPanel.java +++ b/diff/src/org/netbeans/modules/diff/builtin/SingleDiffPanel.java @@ -98,7 +98,7 @@ onNext(); } }; - nextAction.putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/diff/builtin/visualizer/editable/diff-next.png"))); // NOI18N + nextAction.putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/diff/builtin/visualizer/editable/diff-next.png", false)); // NOI18N bNext.setAction(nextAction); prevAction = new AbstractAction() { @@ -106,7 +106,7 @@ onPrev(); } }; - prevAction.putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/diff/builtin/visualizer/editable/diff-prev.png"))); // NOI18N + prevAction.putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/diff/builtin/visualizer/editable/diff-prev.png", false)); // NOI18N bPrevious.setAction(prevAction); getActionMap().put("jumpNext", nextAction); // NOI18N diff --git a/diff/src/org/netbeans/modules/diff/builtin/visualizer/DiffPanel.java b/diff/src/org/netbeans/modules/diff/builtin/visualizer/DiffPanel.java --- a/diff/src/org/netbeans/modules/diff/builtin/visualizer/DiffPanel.java +++ b/diff/src/org/netbeans/modules/diff/builtin/visualizer/DiffPanel.java @@ -54,8 +54,6 @@ import javax.swing.text.*; import org.netbeans.api.editor.fold.FoldHierarchy; import org.netbeans.api.editor.fold.FoldUtilities; -import org.netbeans.editor.EditorUI; -import org.netbeans.editor.ext.ExtCaret; import org.netbeans.modules.diff.builtin.DiffPresenter; import org.openide.actions.CopyAction; @@ -64,6 +62,7 @@ import org.openide.util.actions.SystemAction; import org.openide.ErrorManager; import org.openide.text.CloneableEditorSupport; +import org.openide.util.ImageUtilities; //import org.openide.windows.Workspace; //import org.openide.windows.Mode; @@ -160,7 +159,7 @@ commandPanel.setLayout(new java.awt.GridBagLayout()); - prevButton.setIcon(new ImageIcon(org.openide.util.Utilities.loadImage("org/netbeans/modules/diff/builtin/visualizer/prev.gif", true))); + prevButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/diff/builtin/visualizer/prev.gif", true)); prevButton.setToolTipText(org.openide.util.NbBundle.getBundle(DiffPanel.class).getString("DiffComponent.prevButton.toolTipText")); prevButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); gridBagConstraints = new java.awt.GridBagConstraints(); @@ -168,7 +167,7 @@ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; commandPanel.add(prevButton, gridBagConstraints); - nextButton.setIcon(new ImageIcon(org.openide.util.Utilities.loadImage("org/netbeans/modules/diff/builtin/visualizer/next.gif", true))); + nextButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/diff/builtin/visualizer/next.gif", true)); nextButton.setToolTipText(org.openide.util.NbBundle.getBundle(DiffPanel.class).getString("DiffComponent.nextButton.toolTipText")); nextButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); gridBagConstraints = new java.awt.GridBagConstraints(); diff --git a/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffVisualizer.java b/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffVisualizer.java --- a/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffVisualizer.java +++ b/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffVisualizer.java @@ -46,7 +46,6 @@ import org.netbeans.api.diff.StreamSource; import org.netbeans.modules.diff.builtin.DiffPresenter; import org.openide.util.NbBundle; -import org.openide.util.Utilities; import javax.swing.*; import java.awt.Component; @@ -56,6 +55,7 @@ import java.io.IOException; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; +import org.openide.util.ImageUtilities; /** * Registration of the editable visualizer. @@ -122,7 +122,7 @@ onNext(); } }; - nextAction.putValue(Action.SMALL_ICON, new ImageIcon(Utilities.loadImage("org/netbeans/modules/diff/builtin/visualizer/editable/diff-next.png"))); // NOI18N + nextAction.putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/diff/builtin/visualizer/editable/diff-next.png", false)); // NOI18N JButton nextButton = new JButton(nextAction); nextButton.setMargin(new Insets(2, 2, 2, 2)); toolbar.add(nextButton); @@ -132,7 +132,7 @@ onPrev(); } }; - prevAction.putValue(Action.SMALL_ICON, new ImageIcon(Utilities.loadImage("org/netbeans/modules/diff/builtin/visualizer/editable/diff-prev.png"))); // NOI18N + prevAction.putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/diff/builtin/visualizer/editable/diff-prev.png", false)); // NOI18N JButton prevButton = new JButton(prevAction); prevButton.setMargin(new Insets(2, 2, 2, 2)); toolbar.add(prevButton); diff --git a/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java b/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java --- a/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java +++ b/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java @@ -133,8 +133,8 @@ // TODO Get icons for these buttons firstConflictButton.setVisible(false); lastConflictButton.setVisible(false); - prevConflictButton.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/diff/builtin/visualizer/prev.gif", true))); - nextConflictButton.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/diff/builtin/visualizer/next.gif", true))); + prevConflictButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/diff/builtin/visualizer/prev.gif", true)); + nextConflictButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/diff/builtin/visualizer/next.gif", true)); //prevConflictButton.setIcon(new ImageIcon(getClass().getResource("/org/netbeans/modules/diff/builtin/visualizer/prev.gif"))); //nextConflictButton.setIcon(new ImageIcon(getClass().getResource("/org/netbeans/modules/diff/builtin/visualizer/next.gif"))); //setTitle(org.openide.util.NbBundle.getBundle(DiffComponent.class).getString("DiffComponent.title")); diff --git a/editor.bookmarks/src/org/netbeans/lib/editor/bookmarks/actions/ToggleBookmarkAction.java b/editor.bookmarks/src/org/netbeans/lib/editor/bookmarks/actions/ToggleBookmarkAction.java --- a/editor.bookmarks/src/org/netbeans/lib/editor/bookmarks/actions/ToggleBookmarkAction.java +++ b/editor.bookmarks/src/org/netbeans/lib/editor/bookmarks/actions/ToggleBookmarkAction.java @@ -90,9 +90,7 @@ public ToggleBookmarkAction(JTextComponent component) { super( - NbBundle.getMessage(ToggleBookmarkAction.class, ACTION_NAME), - new ImageIcon(ImageUtilities.loadImage(ACTION_ICON)) - ); + NbBundle.getMessage(ToggleBookmarkAction.class, ACTION_NAME),ImageUtilities.loadImageIcon(ACTION_ICON, false)); putValue(SHORT_DESCRIPTION, getValue(NAME)); putValue("noIconInMenu", Boolean.TRUE); // NOI18N diff --git a/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java b/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java --- a/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java +++ b/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java @@ -100,8 +100,7 @@ Color backgroundColor, int width, int height, boolean selected) { if (icon == null) { - icon = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/lib/editor/codetemplates/resources/code_template.png")); // NOI18N + icon = ImageUtilities.loadImageIcon("org/netbeans/lib/editor/codetemplates/resources/code_template.png", false); // NOI18N } CompletionUtilities.renderHtml(icon, getLeftText(), getRightText(), g, defaultFont, defaultColor, width, height, selected); diff --git a/editor.completion/src/org/netbeans/modules/editor/completion/DocumentationScrollPane.java b/editor.completion/src/org/netbeans/modules/editor/completion/DocumentationScrollPane.java --- a/editor.completion/src/org/netbeans/modules/editor/completion/DocumentationScrollPane.java +++ b/editor.completion/src/org/netbeans/modules/editor/completion/DocumentationScrollPane.java @@ -144,7 +144,7 @@ } private ImageIcon resolveIcon(String res){ - return new ImageIcon(ImageUtilities.loadImage (res)); + return ImageUtilities.loadImageIcon(res, false); } private void installTitleComponent() { diff --git a/editor.lib/src/org/netbeans/editor/ActionFactory.java b/editor.lib/src/org/netbeans/editor/ActionFactory.java --- a/editor.lib/src/org/netbeans/editor/ActionFactory.java +++ b/editor.lib/src/org/netbeans/editor/ActionFactory.java @@ -1158,8 +1158,7 @@ public ToggleHighlightSearchAction() { super(BaseKit.toggleHighlightSearchAction, CLEAR_STATUS_TEXT); - putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/editor/resources/toggle_highlight.png"))); // NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/editor/resources/toggle_highlight.png", false)); // NOI18N } public void actionPerformed(ActionEvent evt, JTextComponent target) { diff --git a/editor/src/org/netbeans/modules/editor/MainMenuAction.java b/editor/src/org/netbeans/modules/editor/MainMenuAction.java --- a/editor/src/org/netbeans/modules/editor/MainMenuAction.java +++ b/editor/src/org/netbeans/modules/editor/MainMenuAction.java @@ -82,7 +82,7 @@ */ public abstract class MainMenuAction extends GlobalContextAction implements Presenter.Menu, ChangeListener { - public static final Icon BLANK_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/editor/resources/empty.gif")); + public static final Icon BLANK_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/editor/resources/empty.gif", false); public boolean menuInitialized = false; /** icon of the action, null means no icon */ private final Icon forcedIcon; diff --git a/editor/src/org/netbeans/modules/editor/impl/SearchBar.java b/editor/src/org/netbeans/modules/editor/impl/SearchBar.java --- a/editor/src/org/netbeans/modules/editor/impl/SearchBar.java +++ b/editor/src/org/netbeans/modules/editor/impl/SearchBar.java @@ -260,7 +260,7 @@ } }); - closeButton = new JButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/editor/resources/find_close.png"))); // NOI18N + closeButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/modules/editor/resources/find_close.png", false)); // NOI18N closeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { looseFocus(); @@ -269,7 +269,7 @@ closeButton.setToolTipText(NbBundle.getMessage(SearchBar.class, "TOOLTIP_CloseIncrementalSearchSidebar")); // NOI18N processButton(closeButton); - expandButton = new JButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/editor/resources/find_expand.png"))); // NOI18N + expandButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/modules/editor/resources/find_expand.png", false)); // NOI18N expandButton.setMnemonic(NbBundle.getMessage(SearchBar.class, "CTL_ExpandButton_Mnemonic").charAt(0)); // NOI18N processButton(expandButton); expandButton.addActionListener(new ActionListener() { @@ -373,7 +373,7 @@ // configure find next button findNextButton = new JButton( - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/editor/resources/find_next.png"))); // NOI18N + ImageUtilities.loadImageIcon("org/netbeans/modules/editor/resources/find_next.png", false)); // NOI18N Mnemonics.setLocalizedText( findNextButton, NbBundle.getMessage(SearchBar.class, "CTL_FindNext")); // NOI18N findNextButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -383,7 +383,7 @@ // configure find previous button findPreviousButton = new JButton( - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/editor/resources/find_previous.png"))); // NOI18N + ImageUtilities.loadImageIcon("org/netbeans/modules/editor/resources/find_previous.png", false)); // NOI18N Mnemonics.setLocalizedText(findPreviousButton, NbBundle.getMessage(SearchBar.class, "CTL_FindPrevious")); // NOI18N findPreviousButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { diff --git a/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryBackAction.java b/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryBackAction.java --- a/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryBackAction.java +++ b/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryBackAction.java @@ -107,7 +107,7 @@ "NavigationHistoryBackAction_Tooltip", actionName)); //NOI18N this.popupMenu = null; } else if (component != null) { - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/editor/resources/navigate_back_16.png"))); //NOI18N + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/editor/resources/navigate_back_16.png", false)); //NOI18N this.popupMenu = new JPopupMenu(); update(); NavigationHistory nav = NavigationHistory.getNavigations(); diff --git a/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryForwardAction.java b/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryForwardAction.java --- a/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryForwardAction.java +++ b/editor/src/org/netbeans/modules/editor/impl/actions/NavigationHistoryForwardAction.java @@ -92,7 +92,7 @@ "NavigationHistoryForwardAction_Tooltip", actionName)); //NOI18N this.popupMenu = null; } else if (component != null) { - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/editor/resources/navigate_forward_16.png"))); //NOI18N + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/editor/resources/navigate_forward_16.png", false)); //NOI18N this.popupMenu = new JPopupMenu(); update(); NavigationHistory nav = NavigationHistory.getNavigations(); diff --git a/etl.editor/src/org/netbeans/modules/mashup/db/ui/FlatfileResulSetPanel.java b/etl.editor/src/org/netbeans/modules/mashup/db/ui/FlatfileResulSetPanel.java --- a/etl.editor/src/org/netbeans/modules/mashup/db/ui/FlatfileResulSetPanel.java +++ b/etl.editor/src/org/netbeans/modules/mashup/db/ui/FlatfileResulSetPanel.java @@ -206,7 +206,7 @@ public static Icon getDbIcon() { Icon icon = null; try { - icon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/mashup/db/ui/resource/images/root.png")); + icon = ImageUtilities.loadImageIcon("org/netbeans/modules/mashup/db/ui/resource/images/root.png", false); } catch (Exception ex) { // Log exception } diff --git a/etl.editor/src/org/netbeans/modules/sql/framework/ui/utils/TableSorter.java b/etl.editor/src/org/netbeans/modules/sql/framework/ui/utils/TableSorter.java --- a/etl.editor/src/org/netbeans/modules/sql/framework/ui/utils/TableSorter.java +++ b/etl.editor/src/org/netbeans/modules/sql/framework/ui/utils/TableSorter.java @@ -102,8 +102,8 @@ } }; - private final Icon ICON_ASCENDING = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/sql/framework/ui/resources/images/columnsSortedAsc.gif", true)); // NOI18N - private final Icon ICON_DESCENDING = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/sql/framework/ui/resources/images/columnsSortedDesc.gif", true)); // NOI18N + private final Icon ICON_ASCENDING = ImageUtilities.loadImageIcon("org/netbeans/modules/sql/framework/ui/resources/images/columnsSortedAsc.gif", true); // NOI18N + private final Icon ICON_DESCENDING = ImageUtilities.loadImageIcon("org/netbeans/modules/sql/framework/ui/resources/images/columnsSortedDesc.gif", true); // NOI18N private Row[] viewToModel; private int[] modelToView; diff --git a/etl.project/src/org/netbeans/modules/etl/project/EtlproProject.java b/etl.project/src/org/netbeans/modules/etl/project/EtlproProject.java --- a/etl.project/src/org/netbeans/modules/etl/project/EtlproProject.java +++ b/etl.project/src/org/netbeans/modules/etl/project/EtlproProject.java @@ -74,7 +74,7 @@ private static transient final Logger mLogger = Logger.getLogger(EtlproProject.class.getName()); //private static transient final Localizer mLoc = Localizer.get(); - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/etl/project/ui/resources/etlproProjectIcon.gif")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/etl/project/ui/resources/etlproProjectIcon.gif", false); // NOI18N public static final String SOURCES_TYPE_ICANPRO = "BIZPRO"; public static final String MODULE_INSTALL_NAME = "modules/org-netbeans-modules-etl-project.jar"; public static final String MODULE_INSTALL_CBN = "org.netbeans.modules.etl.project"; diff --git a/extexecution/src/org/netbeans/modules/extexecution/OptionsAction.java b/extexecution/src/org/netbeans/modules/extexecution/OptionsAction.java --- a/extexecution/src/org/netbeans/modules/extexecution/OptionsAction.java +++ b/extexecution/src/org/netbeans/modules/extexecution/OptionsAction.java @@ -57,8 +57,7 @@ public OptionsAction(String optionsPath) { setEnabled(true); // just to be sure - putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/extexecution/resources/options.png"))); // NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/extexecution/resources/options.png", false)); // NOI18N putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(OptionsAction.class, "Options")); this.optionsPath = optionsPath; diff --git a/extexecution/src/org/netbeans/modules/extexecution/RerunAction.java b/extexecution/src/org/netbeans/modules/extexecution/RerunAction.java --- a/extexecution/src/org/netbeans/modules/extexecution/RerunAction.java +++ b/extexecution/src/org/netbeans/modules/extexecution/RerunAction.java @@ -75,8 +75,7 @@ public RerunAction() { setEnabled(false); // initially, until ready - putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/extexecution/resources/rerun.png"))); // NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/extexecution/resources/rerun.png", false)); // NOI18N putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(RerunAction.class, "Rerun")); } diff --git a/extexecution/src/org/netbeans/modules/extexecution/StopAction.java b/extexecution/src/org/netbeans/modules/extexecution/StopAction.java --- a/extexecution/src/org/netbeans/modules/extexecution/StopAction.java +++ b/extexecution/src/org/netbeans/modules/extexecution/StopAction.java @@ -60,8 +60,7 @@ public StopAction() { setEnabled(false); // initially, until ready - putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/extexecution/resources/stop.png"))); // NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/extexecution/resources/stop.png", false)); // NOI18N putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(StopAction.class, "Stop")); } diff --git a/form.j2ee/src/org/netbeans/modules/form/j2ee/DBColumnDrop.java b/form.j2ee/src/org/netbeans/modules/form/j2ee/DBColumnDrop.java --- a/form.j2ee/src/org/netbeans/modules/form/j2ee/DBColumnDrop.java +++ b/form.j2ee/src/org/netbeans/modules/form/j2ee/DBColumnDrop.java @@ -117,8 +117,7 @@ pItem = new PaletteItem(new ClassSource("javax.persistence.EntityManager", // NOI18N new ClassSource.LibraryEntry(LibraryManager.getDefault().getLibrary("toplink"))), // NOI18N null); - pItem.setIcon(new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/form/j2ee/resources/binding.gif")).getImage()); // NOI18N + pItem.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/j2ee/resources/binding.gif", false).getImage()); // NOI18N } else { pItem = new PaletteItem(new ClassSource("javax.swing.JTextField"), null); // NOI18N } diff --git a/form.j2ee/src/org/netbeans/modules/form/j2ee/DBConnectionDrop.java b/form.j2ee/src/org/netbeans/modules/form/j2ee/DBConnectionDrop.java --- a/form.j2ee/src/org/netbeans/modules/form/j2ee/DBConnectionDrop.java +++ b/form.j2ee/src/org/netbeans/modules/form/j2ee/DBConnectionDrop.java @@ -97,8 +97,7 @@ PaletteItem pItem = new PaletteItem(new ClassSource("javax.persistence.EntityManager", // NOI18N new ClassSource.LibraryEntry(LibraryManager.getDefault().getLibrary("toplink"))), // NOI18N null); - pItem.setIcon(new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/form/j2ee/resources/EntityManager.png")).getImage()); // NOI18N + pItem.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/j2ee/resources/EntityManager.png", false).getImage()); // NOI18N return pItem; } diff --git a/form.j2ee/src/org/netbeans/modules/form/j2ee/DBTableDrop.java b/form.j2ee/src/org/netbeans/modules/form/j2ee/DBTableDrop.java --- a/form.j2ee/src/org/netbeans/modules/form/j2ee/DBTableDrop.java +++ b/form.j2ee/src/org/netbeans/modules/form/j2ee/DBTableDrop.java @@ -117,8 +117,7 @@ pItem = new PaletteItem(new ClassSource("javax.persistence.EntityManager", // NOI18N new ClassSource.LibraryEntry(LibraryManager.getDefault().getLibrary("toplink"))), // NOI18N null); - pItem.setIcon(new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/form/j2ee/resources/binding.gif")).getImage()); // NOI18N + pItem.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/j2ee/resources/binding.gif", false).getImage()); // NOI18N } else { pItem = new PaletteItem(new ClassSource("javax.swing.JTable"), null); // NOI18N } diff --git a/form/src/org/netbeans/modules/form/FormDesigner.java b/form/src/org/netbeans/modules/form/FormDesigner.java --- a/form/src/org/netbeans/modules/form/FormDesigner.java +++ b/form/src/org/netbeans/modules/form/FormDesigner.java @@ -2428,7 +2428,7 @@ code = (horizontal ? (leading ? "l" : "r") : (leading ? "u" : "d")); // NOI18N } String iconResource = ICON_BASE + code + ".png"; // NOI18N - putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(iconResource))); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon(iconResource, false)); putValue(Action.SHORT_DESCRIPTION, FormUtils.getBundleString("CTL_AlignAction_" + code)); // NOI18N setEnabled(false); } @@ -2469,7 +2469,7 @@ this.dimension = dimension; String code = (dimension == LayoutConstants.HORIZONTAL) ? "h" : "v"; // NOI18N String iconResource = ICON_BASE + code + ".png"; // NOI18N - putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(iconResource))); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon(iconResource, false)); putValue(Action.SHORT_DESCRIPTION, FormUtils.getBundleString("CTL_ResizeButton_" + code)); // NOI18N setEnabled(false); } diff --git a/form/src/org/netbeans/modules/form/HandleLayer.java b/form/src/org/netbeans/modules/form/HandleLayer.java --- a/form/src/org/netbeans/modules/form/HandleLayer.java +++ b/form/src/org/netbeans/modules/form/HandleLayer.java @@ -659,8 +659,7 @@ private Image resizeHandle() { if (resizeHandle == null) { - resizeHandle = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/resources/resize_handle.png")).getImage(); // NOI18N + resizeHandle = ImageUtilities.loadImageIcon("org/netbeans/modules/form/resources/resize_handle.png", false).getImage(); // NOI18N } return resizeHandle; } diff --git a/form/src/org/netbeans/modules/form/actions/InspectorAction.java b/form/src/org/netbeans/modules/form/actions/InspectorAction.java --- a/form/src/org/netbeans/modules/form/actions/InspectorAction.java +++ b/form/src/org/netbeans/modules/form/actions/InspectorAction.java @@ -62,8 +62,7 @@ public InspectorAction() { putValue(NAME, NbBundle.getMessage(InspectorAction.class, "CTL_InspectorAction")); - putValue(SMALL_ICON, new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/form/resources/inspector.png"))); // NOI18N + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/form/resources/inspector.png", false)); // NOI18N } diff --git a/form/src/org/netbeans/modules/form/assistant/AssistantView.java b/form/src/org/netbeans/modules/form/assistant/AssistantView.java --- a/form/src/org/netbeans/modules/form/assistant/AssistantView.java +++ b/form/src/org/netbeans/modules/form/assistant/AssistantView.java @@ -77,7 +77,7 @@ // Message label messageLabel = new JLabel(); - messageLabel.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/form/resources/lightbulb.gif"))); // NOI18N + messageLabel.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/resources/lightbulb.gif", false)); // NOI18N // Close button JButton closeButton = new JButton("x"); // NOI18N diff --git a/form/src/org/netbeans/modules/form/editors/CustomIconEditor.java b/form/src/org/netbeans/modules/form/editors/CustomIconEditor.java --- a/form/src/org/netbeans/modules/form/editors/CustomIconEditor.java +++ b/form/src/org/netbeans/modules/form/editors/CustomIconEditor.java @@ -92,7 +92,7 @@ private boolean ignoreNull; private boolean ignoreCombo; - private Icon packageIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/form/resources/package.gif")); // NOI18N + private Icon packageIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/form/resources/package.gif", false); // NOI18N public CustomIconEditor(IconEditor prEd) { propertyEditor = prEd; diff --git a/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagControlCenter.java b/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagControlCenter.java --- a/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagControlCenter.java +++ b/form/src/org/netbeans/modules/form/layoutsupport/delegates/GridBagControlCenter.java @@ -146,8 +146,7 @@ new javax.swing.border.EtchedBorder(), "anchorPanel")); // NOI18N nwButton = new javax.swing.JToggleButton(); - nwButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/nw.gif"))); // NOI18N + nwButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/nw.gif", false)); // NOI18N nwButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); nwButton.setActionCommand("NW"); // NOI18N nwButton.addActionListener(actionLsnr); @@ -156,8 +155,7 @@ anchorPanel.add(nwButton, gridBagConstraints2); nButton = new javax.swing.JToggleButton(); - nButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/n.gif"))); // NOI18N + nButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/n.gif", false)); // NOI18N nButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); nButton.setActionCommand("N"); // NOI18N nButton.addActionListener(actionLsnr); @@ -166,8 +164,7 @@ anchorPanel.add(nButton, gridBagConstraints2); neButton = new javax.swing.JToggleButton(); - neButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/ne.gif"))); // NOI18N + neButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/ne.gif", false)); // NOI18N neButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); neButton.setActionCommand("NE"); // NOI18N neButton.addActionListener(actionLsnr); @@ -177,8 +174,7 @@ anchorPanel.add(neButton, gridBagConstraints2); wButton = new javax.swing.JToggleButton(); - wButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/w.gif"))); // NOI18N + wButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/w.gif", false)); // NOI18N wButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); wButton.setActionCommand("W"); // NOI18N wButton.addActionListener(actionLsnr); @@ -187,8 +183,7 @@ anchorPanel.add(wButton, gridBagConstraints2); cButton = new javax.swing.JToggleButton(); - cButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/c.gif"))); // NOI18N + cButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/c.gif", false)); // NOI18N cButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); cButton.setActionCommand("C"); // NOI18N cButton.addActionListener(actionLsnr); @@ -197,8 +192,7 @@ anchorPanel.add(cButton, gridBagConstraints2); eButton = new javax.swing.JToggleButton(); - eButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/e.gif"))); // NOI18N + eButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/e.gif", false)); // NOI18N eButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); eButton.setActionCommand("E"); // NOI18N eButton.addActionListener(actionLsnr); @@ -208,8 +202,7 @@ anchorPanel.add(eButton, gridBagConstraints2); swButton = new javax.swing.JToggleButton(); - swButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/sw.gif"))); // NOI18N + swButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/sw.gif", false)); // NOI18N swButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); swButton.setActionCommand("SW"); // NOI18N swButton.addActionListener(actionLsnr); @@ -219,8 +212,7 @@ anchorPanel.add(swButton, gridBagConstraints2); sButton = new javax.swing.JToggleButton(); - sButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/s.gif"))); // NOI18N + sButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/s.gif", false)); // NOI18N sButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); sButton.setActionCommand("S"); // NOI18N sButton.addActionListener(actionLsnr); @@ -230,8 +222,7 @@ anchorPanel.add(sButton, gridBagConstraints2); seButton = new javax.swing.JToggleButton(); - seButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/se.gif"))); // NOI18N + seButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/se.gif", false)); // NOI18N seButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); seButton.setActionCommand("SE"); // NOI18N seButton.addActionListener(actionLsnr); @@ -254,8 +245,7 @@ new javax.swing.border.EtchedBorder(), "fillPanel")); // NOI18N horizontalFillButton = new javax.swing.JToggleButton(); - horizontalFillButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/horizontal.gif"))); // NOI18N + horizontalFillButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/horizontal.gif", false)); // NOI18N horizontalFillButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); horizontalFillButton.addActionListener(actionLsnr); @@ -264,8 +254,7 @@ fillPanel.add(horizontalFillButton, gridBagConstraints3); verticalFillButton = new javax.swing.JToggleButton(); - verticalFillButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/vertical.gif"))); // NOI18N + verticalFillButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/vertical.gif", false)); // NOI18N verticalFillButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); verticalFillButton.addActionListener(actionLsnr); @@ -289,16 +278,14 @@ new javax.swing.border.EtchedBorder(), "iPaddingPanel")); // NOI18N jLabel1 = new javax.swing.JLabel(); - jLabel1.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/horizontalGr.gif"))); // NOI18N + jLabel1.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/horizontalGr.gif", false)); // NOI18N gridBagConstraints4 = new java.awt.GridBagConstraints(); gridBagConstraints4.insets = new java.awt.Insets(0, 0, 0, 5); ipadPanel.add(jLabel1, gridBagConstraints4); ipadHMButton = new javax.swing.JButton(); - ipadHMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + ipadHMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N ipadHMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); ipadHMButton.setActionCommand("HM"); // NOI18N ipadHMButton.addActionListener(actionLsnr); @@ -307,8 +294,7 @@ ipadPanel.add(ipadHMButton, gridBagConstraints4); ipadHPButton = new javax.swing.JButton(); - ipadHPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + ipadHPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N ipadHPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); ipadHPButton.setActionCommand("HP"); // NOI18N ipadHPButton.addActionListener(actionLsnr); @@ -318,16 +304,14 @@ ipadPanel.add(ipadHPButton, gridBagConstraints4); jLabel2 = new javax.swing.JLabel(); - jLabel2.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/verticalGr.gif"))); // NOI18N + jLabel2.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/verticalGr.gif", false)); // NOI18N gridBagConstraints4 = new java.awt.GridBagConstraints(); gridBagConstraints4.insets = new java.awt.Insets(0, 0, 4, 5); ipadPanel.add(jLabel2, gridBagConstraints4); ipadVMButton = new javax.swing.JButton(); - ipadVMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + ipadVMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N ipadVMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); ipadVMButton.setActionCommand("VM"); // NOI18N ipadVMButton.addActionListener(actionLsnr); @@ -337,8 +321,7 @@ ipadPanel.add(ipadVMButton, gridBagConstraints4); ipadVPButton = new javax.swing.JButton(); - ipadVPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + ipadVPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N ipadVPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); ipadVPButton.setActionCommand("VP"); // NOI18N ipadVPButton.addActionListener(actionLsnr); @@ -363,8 +346,7 @@ new javax.swing.border.EtchedBorder(), "insetsPanel")); // NOI18N topMButton = new javax.swing.JButton(); - topMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + topMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N topMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); topMButton.setActionCommand("tM"); // NOI18N topMButton.addActionListener(actionLsnr); @@ -377,8 +359,7 @@ insetsPanel.add(topMButton, gridBagConstraints5); topPButton = new javax.swing.JButton(); - topPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + topPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N topPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); topPButton.setActionCommand("tP"); // NOI18N topPButton.addActionListener(actionLsnr); @@ -391,8 +372,7 @@ insetsPanel.add(topPButton, gridBagConstraints5); leftPButton = new javax.swing.JButton(); - leftPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + leftPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N leftPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); leftPButton.setActionCommand("lP"); // NOI18N leftPButton.addActionListener(actionLsnr); @@ -404,8 +384,7 @@ insetsPanel.add(leftPButton, gridBagConstraints5); leftMButton = new javax.swing.JButton(); - leftMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + leftMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N leftMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); leftMButton.setActionCommand("lM"); // NOI18N leftMButton.addActionListener(actionLsnr); @@ -417,8 +396,7 @@ insetsPanel.add(leftMButton, gridBagConstraints5); rightPButton = new javax.swing.JButton(); - rightPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + rightPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N rightPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); rightPButton.setActionCommand("rP"); // NOI18N rightPButton.addActionListener(actionLsnr); @@ -430,8 +408,7 @@ insetsPanel.add(rightPButton, gridBagConstraints5); rightMButton = new javax.swing.JButton(); - rightMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + rightMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N rightMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); rightMButton.setActionCommand("rM"); // NOI18N rightMButton.addActionListener(actionLsnr); @@ -443,8 +420,7 @@ insetsPanel.add(rightMButton, gridBagConstraints5); bottomMButton = new javax.swing.JButton(); - bottomMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + bottomMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N bottomMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); bottomMButton.setActionCommand("bM"); // NOI18N bottomMButton.addActionListener(actionLsnr); @@ -456,8 +432,7 @@ insetsPanel.add(bottomMButton, gridBagConstraints5); bottomPButton = new javax.swing.JButton(); - bottomPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + bottomPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N bottomPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); bottomPButton.setActionCommand("bP"); // NOI18N bottomPButton.addActionListener(actionLsnr); @@ -469,8 +444,7 @@ insetsPanel.add(bottomPButton, gridBagConstraints5); jLabel3 = new javax.swing.JLabel(); - jLabel3.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/horizontalGr.gif"))); // NOI18N + jLabel3.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/horizontalGr.gif", false)); // NOI18N gridBagConstraints5 = new java.awt.GridBagConstraints(); gridBagConstraints5.gridx = 0; @@ -479,8 +453,7 @@ insetsPanel.add(jLabel3, gridBagConstraints5); HMButton = new javax.swing.JButton(); - HMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + HMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N HMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); HMButton.setActionCommand("HM"); // NOI18N HMButton.addActionListener(actionLsnr); @@ -492,8 +465,7 @@ insetsPanel.add(HMButton, gridBagConstraints5); HPButton = new javax.swing.JButton(); - HPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + HPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N HPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); HPButton.setActionCommand("HP"); // NOI18N HPButton.addActionListener(actionLsnr); @@ -505,8 +477,7 @@ insetsPanel.add(HPButton, gridBagConstraints5); jLabel4 = new javax.swing.JLabel(); - jLabel4.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/verticalGr.gif"))); // NOI18N + jLabel4.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/verticalGr.gif", false)); // NOI18N gridBagConstraints5 = new java.awt.GridBagConstraints(); gridBagConstraints5.gridx = 0; @@ -515,8 +486,7 @@ insetsPanel.add(jLabel4, gridBagConstraints5); VMButton = new javax.swing.JButton(); - VMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + VMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N VMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); VMButton.setActionCommand("VM"); // NOI18N VMButton.addActionListener(actionLsnr); @@ -527,8 +497,7 @@ insetsPanel.add(VMButton, gridBagConstraints5); VPButton = new javax.swing.JButton(); - VPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + VPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N VPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); VPButton.setActionCommand("VP"); // NOI18N VPButton.addActionListener(actionLsnr); @@ -539,8 +508,7 @@ insetsPanel.add(VPButton, gridBagConstraints5); jLabel5 = new javax.swing.JLabel(); - jLabel5.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/bothGr.gif"))); // NOI18N + jLabel5.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/bothGr.gif", false)); // NOI18N gridBagConstraints5 = new java.awt.GridBagConstraints(); gridBagConstraints5.gridx = 0; @@ -549,8 +517,7 @@ insetsPanel.add(jLabel5, gridBagConstraints5); BMButton = new javax.swing.JButton(); - BMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + BMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N BMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); BMButton.setActionCommand("BM"); // NOI18N BMButton.addActionListener(actionLsnr); @@ -562,8 +529,7 @@ insetsPanel.add(BMButton, gridBagConstraints5); BPButton = new javax.swing.JButton(); - BPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + BPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N BPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); BPButton.setActionCommand("BP"); // NOI18N BPButton.addActionListener(actionLsnr); @@ -589,16 +555,14 @@ new javax.swing.border.EtchedBorder(), "panelSizePanel")); // NOI18N jLabel6 = new javax.swing.JLabel(); - jLabel6.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/horizontalGr.gif"))); // NOI18N + jLabel6.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/horizontalGr.gif", false)); // NOI18N gridBagConstraints6 = new java.awt.GridBagConstraints(); gridBagConstraints6.insets = new java.awt.Insets(0, 0, 0, 5); gridSizePanel.add(jLabel6, gridBagConstraints6); gridSizeHMButton = new javax.swing.JButton(); - gridSizeHMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + gridSizeHMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N gridSizeHMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); gridSizeHMButton.setActionCommand("HM"); // NOI18N gridSizeHMButton.addActionListener(actionLsnr); @@ -607,8 +571,7 @@ gridSizePanel.add(gridSizeHMButton, gridBagConstraints6); gridSizeHPButton = new javax.swing.JButton(); - gridSizeHPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + gridSizeHPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N gridSizeHPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); gridSizeHPButton.setActionCommand("HP"); // NOI18N gridSizeHPButton.addActionListener(actionLsnr); @@ -617,8 +580,7 @@ gridSizePanel.add(gridSizeHPButton, gridBagConstraints6); gsRHButton = new javax.swing.JToggleButton(); - gsRHButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/remainder.gif"))); // NOI18N + gsRHButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/remainder.gif", false)); // NOI18N gsRHButton.setMargin(new java.awt.Insets(5, 5, 5, 5)); gsRHButton.setActionCommand("HR"); // NOI18N gsRHButton.addActionListener(actionLsnr); @@ -628,16 +590,14 @@ gridSizePanel.add(gsRHButton, gridBagConstraints6); jLabel8 = new javax.swing.JLabel(); - jLabel8.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/verticalGr.gif"))); // NOI18N + jLabel8.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/verticalGr.gif", false)); // NOI18N gridBagConstraints6 = new java.awt.GridBagConstraints(); gridBagConstraints6.insets = new java.awt.Insets(0, 0, 4, 5); gridSizePanel.add(jLabel8, gridBagConstraints6); gridSizeVMButton = new javax.swing.JButton(); - gridSizeVMButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/minus.gif"))); // NOI18N + gridSizeVMButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/minus.gif", false)); // NOI18N gridSizeVMButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); gridSizeVMButton.setActionCommand("VM"); // NOI18N gridSizeVMButton.addActionListener(actionLsnr); @@ -647,8 +607,7 @@ gridSizePanel.add(gridSizeVMButton, gridBagConstraints6); gridSizeVPButton = new javax.swing.JButton(); - gridSizeVPButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/plus.gif"))); // NOI18N + gridSizeVPButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/plus.gif", false)); // NOI18N gridSizeVPButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); gridSizeVPButton.setActionCommand("VP"); // NOI18N gridSizeVPButton.addActionListener(actionLsnr); @@ -658,8 +617,7 @@ gridSizePanel.add(gridSizeVPButton, gridBagConstraints6); gsRVButton = new javax.swing.JToggleButton(); - gsRVButton.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/form/layoutsupport/resources/remainder.gif"))); // NOI18N + gsRVButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/form/layoutsupport/resources/remainder.gif", false)); // NOI18N gsRVButton.setMargin(new java.awt.Insets(5, 5, 5, 5)); gsRVButton.setActionCommand("VR"); // NOI18N gsRVButton.addActionListener(actionLsnr); diff --git a/glassfish.common/src/org/netbeans/modules/glassfish/common/SimpleIO.java b/glassfish.common/src/org/netbeans/modules/glassfish/common/SimpleIO.java --- a/glassfish.common/src/org/netbeans/modules/glassfish/common/SimpleIO.java +++ b/glassfish.common/src/org/netbeans/modules/glassfish/common/SimpleIO.java @@ -193,8 +193,7 @@ "org/netbeans/modules/glassfish/common/resources/stop.png"; // NOI18N public CancelAction() { - super(NbBundle.getMessage(SimpleIO.class, "CTL_Cancel"), - new ImageIcon(ImageUtilities.loadImage(ICON))); + super(NbBundle.getMessage(SimpleIO.class, "CTL_Cancel"),ImageUtilities.loadImageIcon(ICON, false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(SimpleIO.class, "LBL_CancelDesc")); } diff --git a/glassfish.common/src/org/netbeans/modules/glassfish/common/actions/AbstractOutputAction.java b/glassfish.common/src/org/netbeans/modules/glassfish/common/actions/AbstractOutputAction.java --- a/glassfish.common/src/org/netbeans/modules/glassfish/common/actions/AbstractOutputAction.java +++ b/glassfish.common/src/org/netbeans/modules/glassfish/common/actions/AbstractOutputAction.java @@ -61,7 +61,7 @@ public AbstractOutputAction(final GlassfishModule commonSupport, String localizedName, String localizedShortDesc, String iconBase) { - super(localizedName, new ImageIcon(ImageUtilities.loadImage(iconBase))); + super(localizedName, ImageUtilities.loadImageIcon(iconBase, false)); putValue(SHORT_DESCRIPTION, localizedShortDesc); this.commonSupport = commonSupport; diff --git a/groovy.editor/src/org/netbeans/modules/groovy/editor/api/GroovyTypeSearcher.java b/groovy.editor/src/org/netbeans/modules/groovy/editor/api/GroovyTypeSearcher.java --- a/groovy.editor/src/org/netbeans/modules/groovy/editor/api/GroovyTypeSearcher.java +++ b/groovy.editor/src/org/netbeans/modules/groovy/editor/api/GroovyTypeSearcher.java @@ -203,7 +203,7 @@ initProjectInfo(); } if (isLibrary) { - return new ImageIcon(ImageUtilities.loadImage(GroovySources.GROOVY_FILE_ICON_16x16)); + return ImageUtilities.loadImageIcon(GroovySources.GROOVY_FILE_ICON_16x16, false); } return projectIcon; } diff --git a/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/CompletionItem.java b/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/CompletionItem.java --- a/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/CompletionItem.java +++ b/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/CompletionItem.java @@ -274,7 +274,7 @@ @Override public ImageIcon getIcon() { if (groovyIcon == null) { - groovyIcon = new ImageIcon(ImageUtilities.loadImage(GroovySources.GROOVY_FILE_ICON_16x16)); + groovyIcon = ImageUtilities.loadImageIcon(GroovySources.GROOVY_FILE_ICON_16x16, false); } return groovyIcon; @@ -362,7 +362,7 @@ @Override public ImageIcon getIcon() { if (groovyIcon == null) { - groovyIcon = new ImageIcon(ImageUtilities.loadImage(GroovySources.GROOVY_FILE_ICON_16x16)); + groovyIcon = ImageUtilities.loadImageIcon(GroovySources.GROOVY_FILE_ICON_16x16, false); } return groovyIcon; @@ -483,7 +483,7 @@ } if (groovyIcon == null) { - groovyIcon = new ImageIcon(ImageUtilities.loadImage(GroovySources.GROOVY_FILE_ICON_16x16)); + groovyIcon = ImageUtilities.loadImageIcon(GroovySources.GROOVY_FILE_ICON_16x16, false); } return groovyIcon; @@ -557,12 +557,12 @@ if (isGroovy) { if (groovyIcon == null) { - groovyIcon = new ImageIcon(ImageUtilities.loadImage(GroovySources.GROOVY_FILE_ICON_16x16)); + groovyIcon = ImageUtilities.loadImageIcon(GroovySources.GROOVY_FILE_ICON_16x16, false); } return groovyIcon; } else { if (javaIcon == null) { - javaIcon = new ImageIcon(ImageUtilities.loadImage(JAVA_KEYWORD)); + javaIcon = ImageUtilities.loadImageIcon(JAVA_KEYWORD, false); } return javaIcon; } @@ -716,7 +716,7 @@ public ImageIcon getIcon() { if (newConstructorIcon == null) { - newConstructorIcon = new ImageIcon(ImageUtilities.loadImage(NEW_CSTR)); + newConstructorIcon = ImageUtilities.loadImageIcon(NEW_CSTR, false); } return newConstructorIcon; } diff --git a/gsf.testrunner/src/org/netbeans/modules/gsf/testrunner/api/StatisticsPanel.java b/gsf.testrunner/src/org/netbeans/modules/gsf/testrunner/api/StatisticsPanel.java --- a/gsf.testrunner/src/org/netbeans/modules/gsf/testrunner/api/StatisticsPanel.java +++ b/gsf.testrunner/src/org/netbeans/modules/gsf/testrunner/api/StatisticsPanel.java @@ -125,10 +125,7 @@ } private void createRerunButton() { - rerunButton = new JButton(new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/gsf/testrunner/resources/rerun.png", //NOI18N - true))); + rerunButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/modules/gsf/testrunner/resources/rerun.png", true)); rerunButton.getAccessibleContext().setAccessibleName( NbBundle.getMessage(getClass(), "ACSN_RerunButton")); //NOI18N @@ -155,10 +152,7 @@ /** */ private void createFilterButton() { - btnFilter = new JToggleButton(new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/gsf/testrunner/resources/filter.png", //NOI18N - true))); + btnFilter = new JToggleButton(ImageUtilities.loadImageIcon("org/netbeans/modules/gsf/testrunner/resources/filter.png", true)); btnFilter.getAccessibleContext().setAccessibleName( NbBundle.getMessage(getClass(), "ACSN_FilterButton")); //NOI18N btnFilter.addItemListener(this); @@ -182,10 +176,7 @@ } private void createNextPrevFailureButtons() { - nextFailure = new JButton(new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/gsf/testrunner/resources/nextmatch.png", //NOI18N - true))); + nextFailure = new JButton(ImageUtilities.loadImageIcon("org/netbeans/modules/gsf/testrunner/resources/nextmatch.png", true)); nextFailure.setToolTipText(NbBundle.getMessage(StatisticsPanel.class, "MSG_NextFailure")); nextFailure.addActionListener(new ActionListener() { @@ -194,10 +185,7 @@ } }); - previousFailure = new JButton(new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/gsf/testrunner/resources/prevmatch.png", //NOI18N - true))); + previousFailure = new JButton(ImageUtilities.loadImageIcon("org/netbeans/modules/gsf/testrunner/resources/prevmatch.png", true)); previousFailure.setToolTipText(NbBundle.getMessage(StatisticsPanel.class, "MSG_PreviousFailure")); previousFailure.addActionListener(new ActionListener() { diff --git a/gsf/src/org/netbeans/modules/gsfret/editor/completion/GsfCompletionItem.java b/gsf/src/org/netbeans/modules/gsfret/editor/completion/GsfCompletionItem.java --- a/gsf/src/org/netbeans/modules/gsfret/editor/completion/GsfCompletionItem.java +++ b/gsf/src/org/netbeans/modules/gsfret/editor/completion/GsfCompletionItem.java @@ -388,7 +388,7 @@ } @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/gsfret/editor/completion/warning.png")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/gsfret/editor/completion/warning.png", false); // NOI18N } public int getSortPriority() { diff --git a/gsf/src/org/netbeans/modules/gsfret/navigation/ClassMemberFilters.java b/gsf/src/org/netbeans/modules/gsfret/navigation/ClassMemberFilters.java --- a/gsf/src/org/netbeans/modules/gsfret/navigation/ClassMemberFilters.java +++ b/gsf/src/org/netbeans/modules/gsfret/navigation/ClassMemberFilters.java @@ -170,22 +170,19 @@ desc.addFilter(SHOW_FIELDS, NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowFields"), //NOI18N NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowFieldsTip"), //NOI18N - true, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/gsfret/navigation/resources/filterHideFields.gif")), //NOI18N + true, ImageUtilities.loadImageIcon("org/netbeans/modules/gsfret/navigation/resources/filterHideFields.gif", false), //NOI18N null ); desc.addFilter(SHOW_STATIC, NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowStatic"), //NOI18N NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowStaticTip"), //NOI18N - true, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/gsfret/navigation/resources/filterHideStatic.png")), //NOI18N + true, ImageUtilities.loadImageIcon("org/netbeans/modules/gsfret/navigation/resources/filterHideStatic.png", false), //NOI18N null ); desc.addFilter(SHOW_NON_PUBLIC, NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowNonPublic"), //NOI18N NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowNonPublicTip"), //NOI18N - true, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/gsfret/navigation/resources/filterHideNonPublic.png")), //NOI18N + true, ImageUtilities.loadImageIcon("org/netbeans/modules/gsfret/navigation/resources/filterHideNonPublic.png", false), //NOI18N null ); diff --git a/gsf/src/org/netbeans/modules/gsfret/navigation/ElementScanningTask.java b/gsf/src/org/netbeans/modules/gsfret/navigation/ElementScanningTask.java --- a/gsf/src/org/netbeans/modules/gsfret/navigation/ElementScanningTask.java +++ b/gsf/src/org/netbeans/modules/gsfret/navigation/ElementScanningTask.java @@ -298,7 +298,7 @@ public ImageIcon getCustomIcon() { String iconBase = language.getIconBase(); - return iconBase == null ? null : new ImageIcon(ImageUtilities.loadImage(iconBase)); + return iconBase == null ? null : ImageUtilities.loadImageIcon(iconBase, false); } diff --git a/hibernate/src/org/netbeans/modules/hibernate/completion/HibernateCompletionItem.java b/hibernate/src/org/netbeans/modules/hibernate/completion/HibernateCompletionItem.java --- a/hibernate/src/org/netbeans/modules/hibernate/completion/HibernateCompletionItem.java +++ b/hibernate/src/org/netbeans/modules/hibernate/completion/HibernateCompletionItem.java @@ -317,7 +317,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(FIELD_ICON)); + return ImageUtilities.loadImageIcon(FIELD_ICON, false); } @Override @@ -457,7 +457,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(CLASS)); + return ImageUtilities.loadImageIcon(CLASS, false); } @Override @@ -544,7 +544,7 @@ @Override protected ImageIcon getIcon() { if (icon == null) { - icon = new ImageIcon(ImageUtilities.loadImage(PACKAGE)); + icon = ImageUtilities.loadImageIcon(PACKAGE, false); } return icon; } @@ -649,7 +649,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(TABLE_ICON)); + return ImageUtilities.loadImageIcon(TABLE_ICON, false); } } @@ -694,9 +694,9 @@ @Override protected ImageIcon getIcon() { if (pk) { - return new ImageIcon(ImageUtilities.loadImage(PK_COLUMN_ICON)); + return ImageUtilities.loadImageIcon(PK_COLUMN_ICON, false); } else { - return new ImageIcon(ImageUtilities.loadImage(COLUMN_ICON)); + return ImageUtilities.loadImageIcon(COLUMN_ICON, false); } } } @@ -796,7 +796,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(HB_MAPPING_ICON)); + return ImageUtilities.loadImageIcon(HB_MAPPING_ICON, false); } } diff --git a/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java b/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java --- a/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java +++ b/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java @@ -398,9 +398,9 @@ if (info != this) { return info.getIcon(); } - return ImageUtilities.image2Icon( - ImageUtilities.loadImage("org/netbeans/modules/ide/ergonomics/fod/project.png") // NOI18N - ); + return ImageUtilities.loadImageIcon( + "org/netbeans/modules/ide/ergonomics/fod/project.png" // NOI18N + , false); } public Project getProject() { diff --git a/iep.project/src/org/netbeans/modules/iep/project/IepProject.java b/iep.project/src/org/netbeans/modules/iep/project/IepProject.java --- a/iep.project/src/org/netbeans/modules/iep/project/IepProject.java +++ b/iep.project/src/org/netbeans/modules/iep/project/IepProject.java @@ -76,7 +76,7 @@ */ public final class IepProject implements Project, AntProjectListener { - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/iep/project/ui/resources/iepProject.gif")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/iep/project/ui/resources/iepProject.gif", false); // NOI18N public static final String SOURCES_TYPE_ICANPRO = "BIZPRO"; public static final String ARTIFACT_TYPE_JBI_ASA = "CAPS.asa"; diff --git a/j2ee.archive/src/org/netbeans/modules/j2ee/archive/project/ArchiveProject.java b/j2ee.archive/src/org/netbeans/modules/j2ee/archive/project/ArchiveProject.java --- a/j2ee.archive/src/org/netbeans/modules/j2ee/archive/project/ArchiveProject.java +++ b/j2ee.archive/src/org/netbeans/modules/j2ee/archive/project/ArchiveProject.java @@ -110,7 +110,7 @@ private final GeneratedFilesHelper genFilesHelper; private final Lookup lookup; private ArchiveProjectProperties projProperties; - private static final Icon ARCHIVE_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/archive/project/resources/packaged_archive_16.png")); // NOI18N + private static final Icon ARCHIVE_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/j2ee/archive/project/resources/packaged_archive_16.png", false); // NOI18N private final UpdateHelper updateHelper; private HashMap nameMap; diff --git a/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java b/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java --- a/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java +++ b/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProject.java @@ -149,7 +149,7 @@ */ public final class AppClientProject implements Project, AntProjectListener, FileChangeListener { - private static final Icon CAR_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/clientproject/ui/resources/appclient.gif")); // NOI18N + private static final Icon CAR_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/j2ee/clientproject/ui/resources/appclient.gif", false); // NOI18N private final AuxiliaryConfiguration aux; private final AntProjectHelper helper; diff --git a/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/J2eePlatformNode.java b/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/J2eePlatformNode.java --- a/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/J2eePlatformNode.java +++ b/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/J2eePlatformNode.java @@ -86,7 +86,7 @@ private static final String DEFAULT_ICON = "org/netbeans/modules/j2ee/common/project/ui/resources/j2eeServer.gif"; //NOI18N private static final String BROKEN_PROJECT_BADGE = "org/netbeans/modules/j2ee/common/project/ui/resources/brokenProjectBadge.gif"; //NOI18N - private static final Icon icon = new ImageIcon(ImageUtilities.loadImage(ARCHIVE_ICON)); + private static final Icon icon = ImageUtilities.loadImageIcon(ARCHIVE_ICON, false); private static final Image brokenIcon = ImageUtilities.mergeImages( ImageUtilities.loadImage(DEFAULT_ICON), diff --git a/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/MessageUtils.java b/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/MessageUtils.java --- a/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/MessageUtils.java +++ b/j2ee.common/src/org/netbeans/modules/j2ee/common/project/ui/MessageUtils.java @@ -100,8 +100,7 @@ */ ERROR { protected Icon getIcon() { - return new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/j2ee/common/project/ui/resources/error.gif")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/j2ee/common/project/ui/resources/error.gif", false); // NOI18N } protected Color getColor() { @@ -118,8 +117,7 @@ */ WARNING { protected Icon getIcon() { - return new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/j2ee/common/project/ui/resources/warning.gif")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/j2ee/common/project/ui/resources/warning.gif", false); // NOI18N } protected Color getColor() { diff --git a/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProject.java b/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProject.java --- a/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProject.java +++ b/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/EarProject.java @@ -125,7 +125,7 @@ */ public final class EarProject implements Project, AntProjectListener { - private static final Icon EAR_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/earproject/ui/resources/projectIcon.gif")); // NOI18N + private static final Icon EAR_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/j2ee/earproject/ui/resources/projectIcon.gif", false); // NOI18N public static final String ARTIFACT_TYPE_EAR = "ear"; private final AntProjectHelper helper; diff --git a/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java b/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java --- a/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java +++ b/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProject.java @@ -177,7 +177,7 @@ */ public class EjbJarProject implements Project, AntProjectListener, FileChangeListener { - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/ejbjarproject/ui/resources/ejbjarProjectIcon.gif")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/j2ee/ejbjarproject/ui/resources/ejbjarProjectIcon.gif", false); // NOI18N private static final Logger LOGGER = Logger.getLogger(EjbJarProject.class.getName()); diff --git a/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/entity/EntityWizardPanel.java b/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/entity/EntityWizardPanel.java --- a/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/entity/EntityWizardPanel.java +++ b/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/entity/EntityWizardPanel.java @@ -104,7 +104,7 @@ createPUButton.setVisible(visible); Icon icon = null; if (warning != null) { - icon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/persistence/ui/resources/warning.gif")); + icon = ImageUtilities.loadImageIcon("org/netbeans/modules/j2ee/persistence/ui/resources/warning.gif", false); } else { warning = " "; } diff --git a/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java b/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java --- a/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java +++ b/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/EntityClassesPanel.java @@ -264,7 +264,7 @@ } if (warning.trim().length() > 0) { - Icon icon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2ee/persistence/ui/resources/warning.gif")); + Icon icon = ImageUtilities.loadImageIcon("org/netbeans/modules/j2ee/persistence/ui/resources/warning.gif", false); createPUWarningLabel.setIcon(icon); createPUWarningLabel.setText(warning); createPUWarningLabel.setToolTipText(warning); diff --git a/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/library/PersistenceLibraryPanel.java b/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/library/PersistenceLibraryPanel.java --- a/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/library/PersistenceLibraryPanel.java +++ b/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/wizard/library/PersistenceLibraryPanel.java @@ -157,10 +157,10 @@ errorMessage.setForeground(nbErrorForeground); if (msg != null && msg.trim().length() > 0 && canContinue != null) { if (canContinue.booleanValue()) { - errorMessage.setIcon(new ImageIcon(ImageUtilities.loadImage(WARNING_GIF))); + errorMessage.setIcon(ImageUtilities.loadImageIcon(WARNING_GIF, false)); errorMessage.setForeground(nbWarningForeground); } else { - errorMessage.setIcon(new ImageIcon(ImageUtilities.loadImage(ERROR_GIF))); + errorMessage.setIcon(ImageUtilities.loadImageIcon(ERROR_GIF, false)); } errorMessage.setToolTipText(msg); } else { diff --git a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/DebugAction.java b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/DebugAction.java --- a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/DebugAction.java +++ b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/DebugAction.java @@ -143,8 +143,7 @@ private final ServerInstance instance; public OutputAction(ServerInstance instance) { - super(NbBundle.getMessage(DebugAction.class, "LBL_DebugOutput"), - new ImageIcon(ImageUtilities.loadImage(ICON))); + super(NbBundle.getMessage(DebugAction.class, "LBL_DebugOutput"),ImageUtilities.loadImageIcon(ICON, false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(DebugAction.class, "LBL_DebugOutputDesc")); this.instance = instance; diff --git a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RefreshAction.java b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RefreshAction.java --- a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RefreshAction.java +++ b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RefreshAction.java @@ -121,8 +121,7 @@ private final ServerInstance instance; public OutputAction(ServerInstance instance) { - super(NbBundle.getMessage(DebugAction.class, "LBL_RefreshOutput"), - new ImageIcon(ImageUtilities.loadImage(ICON))); + super(NbBundle.getMessage(DebugAction.class, "LBL_RefreshOutput"),ImageUtilities.loadImageIcon(ICON, false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(DebugAction.class, "LBL_RefreshOutputDesc")); this.instance = instance; diff --git a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RestartAction.java b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RestartAction.java --- a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RestartAction.java +++ b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RestartAction.java @@ -150,8 +150,7 @@ private final ServerInstance instance; public OutputAction(ServerInstance instance) { - super(NbBundle.getMessage(RestartAction.class, "LBL_RestartOutput"), - new ImageIcon(ImageUtilities.loadImage(ICON))); + super(NbBundle.getMessage(RestartAction.class, "LBL_RestartOutput"),ImageUtilities.loadImageIcon(ICON, false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(RestartAction.class, "LBL_RestartOutputDesc")); this.instance = instance; diff --git a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StartAction.java b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StartAction.java --- a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StartAction.java +++ b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StartAction.java @@ -143,8 +143,7 @@ private final ServerInstance instance; public OutputAction(ServerInstance instance) { - super(NbBundle.getMessage(StartAction.class, "LBL_StartOutput"), - new ImageIcon(ImageUtilities.loadImage(ICON))); + super(NbBundle.getMessage(StartAction.class, "LBL_StartOutput"),ImageUtilities.loadImageIcon(ICON, false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(StartAction.class, "LBL_StartOutputDesc")); this.instance = instance; diff --git a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StopAction.java b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StopAction.java --- a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StopAction.java +++ b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StopAction.java @@ -149,8 +149,7 @@ private final ServerInstance instance; public OutputAction(ServerInstance instance) { - super(NbBundle.getMessage(StopAction.class, "LBL_StopOutput"), - new ImageIcon(ImageUtilities.loadImage(ICON))); + super(NbBundle.getMessage(StopAction.class, "LBL_StopOutput"),ImageUtilities.loadImageIcon(ICON, false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(StopAction.class, "LBL_StopOutputDesc")); this.instance = instance; diff --git a/j2me.cdc.project.nsicom/src/org/netbeans/modules/j2me/cdc/project/nsicom/RemoteFilesystemChooser.java b/j2me.cdc.project.nsicom/src/org/netbeans/modules/j2me/cdc/project/nsicom/RemoteFilesystemChooser.java --- a/j2me.cdc.project.nsicom/src/org/netbeans/modules/j2me/cdc/project/nsicom/RemoteFilesystemChooser.java +++ b/j2me.cdc.project.nsicom/src/org/netbeans/modules/j2me/cdc/project/nsicom/RemoteFilesystemChooser.java @@ -95,7 +95,7 @@ private static boolean foldersOnly; private ExplorerManager em; - private static final ImageIcon CDC_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2me/cdc/project/resources/cdcProject.png")); // NOI18N + private static final ImageIcon CDC_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/j2me/cdc/project/resources/cdcProject.png", false); // NOI18N private static final String FOLDER_ICON_BASE = "org/openide/loaders/defaultFolder"; //NOI18N private PropertyChangeListener pcl = new PropertyChangeListener() { diff --git a/j2me.cdc.project/src/org/netbeans/modules/j2me/cdc/project/ui/wizards/ImportCDCProjectPanel.java b/j2me.cdc.project/src/org/netbeans/modules/j2me/cdc/project/ui/wizards/ImportCDCProjectPanel.java --- a/j2me.cdc.project/src/org/netbeans/modules/j2me/cdc/project/ui/wizards/ImportCDCProjectPanel.java +++ b/j2me.cdc.project/src/org/netbeans/modules/j2me/cdc/project/ui/wizards/ImportCDCProjectPanel.java @@ -391,8 +391,8 @@ private static class ProjectFileView extends FileView { final private FileSystemView fsv; - private static final Icon BADGE = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/j2me/cdc/project/resources/projectBadge.gif")); // NOI18N - private static final Icon EMPTY = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/project/ui/resources/empty.gif")); // NOI18N + private static final Icon BADGE = ImageUtilities.loadImageIcon("org/netbeans/modules/j2me/cdc/project/resources/projectBadge.gif", false); // NOI18N + private static final Icon EMPTY = ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/empty.gif", false); // NOI18N private Icon lastOriginal; private Icon lastMerged; diff --git a/java.api.common/src/org/netbeans/modules/java/api/common/project/ProjectProperties.java b/java.api.common/src/org/netbeans/modules/java/api/common/project/ProjectProperties.java --- a/java.api.common/src/org/netbeans/modules/java/api/common/project/ProjectProperties.java +++ b/java.api.common/src/org/netbeans/modules/java/api/common/project/ProjectProperties.java @@ -81,13 +81,13 @@ private static String RESOURCE_ICON_CLASSPATH = "org/netbeans/modules/java/api/common/project/ui/resources/referencedClasspath.gif"; //NOI18N - public static ImageIcon ICON_JAR = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_JAR ) ); - public static ImageIcon ICON_LIBRARY = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_LIBRARY ) ); - public static ImageIcon ICON_ARTIFACT = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_ARTIFACT ) ); - public static ImageIcon ICON_BROKEN_BADGE = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_BROKEN_BADGE ) ); - public static ImageIcon ICON_JAVADOC_BADGE = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_JAVADOC_BADGE ) ); - public static ImageIcon ICON_SOURCE_BADGE = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_SOURCE_BADGE ) ); - public static ImageIcon ICON_CLASSPATH = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_CLASSPATH ) ); + public static ImageIcon ICON_JAR = ImageUtilities.loadImageIcon(RESOURCE_ICON_JAR, false); + public static ImageIcon ICON_LIBRARY = ImageUtilities.loadImageIcon(RESOURCE_ICON_LIBRARY, false); + public static ImageIcon ICON_ARTIFACT = ImageUtilities.loadImageIcon(RESOURCE_ICON_ARTIFACT, false); + public static ImageIcon ICON_BROKEN_BADGE = ImageUtilities.loadImageIcon(RESOURCE_ICON_BROKEN_BADGE, false); + public static ImageIcon ICON_JAVADOC_BADGE = ImageUtilities.loadImageIcon(RESOURCE_ICON_JAVADOC_BADGE, false); + public static ImageIcon ICON_SOURCE_BADGE = ImageUtilities.loadImageIcon(RESOURCE_ICON_SOURCE_BADGE, false); + public static ImageIcon ICON_CLASSPATH = ImageUtilities.loadImageIcon(RESOURCE_ICON_CLASSPATH, false); public static final String INCLUDES = "includes"; // NOI18N public static final String EXCLUDES = "excludes"; // NOI18N diff --git a/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/LibrariesNode.java b/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/LibrariesNode.java --- a/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/LibrariesNode.java +++ b/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/LibrariesNode.java @@ -401,7 +401,7 @@ Library lib = refHelper.findLibrary(eval); if (lib != null) { List/**/ roots = lib.getContent("classpath"); //NOI18N - Icon libIcon = new ImageIcon (ImageUtilities.loadImage(LIBRARIES_ICON)); + Icon libIcon = ImageUtilities.loadImageIcon(LIBRARIES_ICON, false); for (Iterator it = roots.iterator(); it.hasNext();) { URL rootUrl = (URL) it.next(); rootsList.add (rootUrl); @@ -475,7 +475,7 @@ URL url = file.toURI().toURL(); if (FileUtil.isArchiveFile(url)) { url = FileUtil.getArchiveRoot(url); - icon = openedIcon = new ImageIcon (ImageUtilities.loadImage(ARCHIVE_ICON)); + icon = openedIcon = ImageUtilities.loadImageIcon(ARCHIVE_ICON, false); displayName = file.getName(); } else { diff --git a/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/PlatformNode.java b/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/PlatformNode.java --- a/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/PlatformNode.java +++ b/java.api.common/src/org/netbeans/modules/java/api/common/project/ui/PlatformNode.java @@ -215,7 +215,7 @@ Icon openedIcon; if ("jar".equals(roots[i].getURL().getProtocol())) { //NOI18N file = FileUtil.getArchiveFile (roots[i]); - icon = openedIcon = new ImageIcon (ImageUtilities.loadImage(ARCHIVE_ICON)); + icon = openedIcon = ImageUtilities.loadImageIcon(ARCHIVE_ICON, false); } else { file = roots[i]; diff --git a/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java b/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java --- a/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java +++ b/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java @@ -416,7 +416,7 @@ } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(JAVA_KEYWORD)); + if (icon == null) icon = ImageUtilities.loadImageIcon(JAVA_KEYWORD, false); return icon; } @@ -541,7 +541,7 @@ } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(PACKAGE)); + if (icon == null) icon = ImageUtilities.loadImageIcon(PACKAGE, false); return icon; } @@ -623,7 +623,7 @@ } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(CLASS)); + if (icon == null) icon = ImageUtilities.loadImageIcon(CLASS, false); return icon; } @@ -876,7 +876,7 @@ } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(INTERFACE)); + if (icon == null) icon = ImageUtilities.loadImageIcon(INTERFACE, false); return icon; } @@ -895,7 +895,7 @@ } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(ENUM)); + if (icon == null) icon = ImageUtilities.loadImageIcon(ENUM, false); return icon; } } @@ -910,7 +910,7 @@ } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(ANNOTATION)); + if (icon == null) icon = ImageUtilities.loadImageIcon(ANNOTATION, false); return icon; } } @@ -994,7 +994,7 @@ } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(LOCAL_VARIABLE)); + if (icon == null) icon = ImageUtilities.loadImageIcon(LOCAL_VARIABLE, false); return icon; } @@ -1123,7 +1123,7 @@ break; } } - ImageIcon newIcon = new ImageIcon(ImageUtilities.loadImage(iconPath)); + ImageIcon newIcon = ImageUtilities.loadImageIcon(iconPath, false); icon[isStatic?1:0][level] = newIcon; return newIcon; } @@ -1306,7 +1306,7 @@ break; } } - ImageIcon newIcon = new ImageIcon(ImageUtilities.loadImage(iconPath)); + ImageIcon newIcon = ImageUtilities.loadImageIcon(iconPath, false); icon[isStatic?1:0][level] = newIcon; return newIcon; } @@ -1464,8 +1464,8 @@ private static final String OVERRIDE_TEXT = NbBundle.getMessage(JavaCompletionItem.class, "override_Lbl"); private static final String IMPLEMENT_TEXT = NbBundle.getMessage(JavaCompletionItem.class, "implement_Lbl"); - private static ImageIcon implementBadge = new ImageIcon(ImageUtilities.loadImage(IMPL_BADGE_PATH)); - private static ImageIcon overrideBadge = new ImageIcon(ImageUtilities.loadImage(OVRD_BADGE_PATH)); + private static ImageIcon implementBadge = ImageUtilities.loadImageIcon(IMPL_BADGE_PATH, false); + private static ImageIcon overrideBadge = ImageUtilities.loadImageIcon(OVRD_BADGE_PATH, false); private static ImageIcon merged_icon[][] = new ImageIcon[2][4]; @@ -1650,13 +1650,13 @@ protected ImageIcon getIcon() { if (merged_icons[setter ? 1 : 0] == null) { if (superIcon == null) - superIcon = new ImageIcon(ImageUtilities.loadImage(METHOD_PUBLIC)); + superIcon = ImageUtilities.loadImageIcon(METHOD_PUBLIC, false); if (setter) { - ImageIcon setterBadge = new ImageIcon(ImageUtilities.loadImage(SETTER_BADGE_PATH)); + ImageIcon setterBadge = ImageUtilities.loadImageIcon(SETTER_BADGE_PATH, false); merged_icons[1] = new ImageIcon(ImageUtilities.mergeImages(superIcon.getImage(), setterBadge.getImage(), 16 - 8, 16 - 8)); } else { - ImageIcon getterBadge = new ImageIcon(ImageUtilities.loadImage(GETTER_BADGE_PATH)); + ImageIcon getterBadge = ImageUtilities.loadImageIcon(GETTER_BADGE_PATH, false); merged_icons[0] = new ImageIcon(ImageUtilities.mergeImages(superIcon.getImage(), getterBadge.getImage(), 16 - 8, 16 - 8)); } @@ -1864,7 +1864,7 @@ iconPath = CONSTRUCTOR_PUBLIC; break; } - ImageIcon newIcon = new ImageIcon(ImageUtilities.loadImage(iconPath)); + ImageIcon newIcon = ImageUtilities.loadImageIcon(iconPath, false); icon[level] = newIcon; return newIcon; } @@ -2070,7 +2070,7 @@ } protected ImageIcon getIcon() { - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(CONSTRUCTOR)); + if (icon == null) icon = ImageUtilities.loadImageIcon(CONSTRUCTOR, false); return icon; } @@ -2503,7 +2503,7 @@ } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(ATTRIBUTE)); + if (icon == null) icon = ImageUtilities.loadImageIcon(ATTRIBUTE, false); return icon; } @@ -2698,7 +2698,7 @@ } if (iconPath == null) return null; - ImageIcon newIcon = new ImageIcon(ImageUtilities.loadImage(iconPath)); + ImageIcon newIcon = ImageUtilities.loadImageIcon(iconPath, false); icon[isField ? 0 : 1][level - 1] = newIcon; return newIcon; } @@ -2944,7 +2944,7 @@ protected ImageIcon getIcon() { if (icon == null) - icon = new ImageIcon(ImageUtilities.loadImage(CONSTRUCTOR_PUBLIC)); + icon = ImageUtilities.loadImageIcon(CONSTRUCTOR_PUBLIC, false); return icon; } diff --git a/java.editor/src/org/netbeans/modules/java/editor/imports/JavaFixAllImports.java b/java.editor/src/org/netbeans/modules/java/editor/imports/JavaFixAllImports.java --- a/java.editor/src/org/netbeans/modules/java/editor/imports/JavaFixAllImports.java +++ b/java.editor/src/org/netbeans/modules/java/editor/imports/JavaFixAllImports.java @@ -164,7 +164,7 @@ variants[index][0] = NbBundle.getMessage(JavaFixAllImports.class, "FixDupImportStmts_CannotResolve"); //NOI18N defaults[index] = variants[index][0]; icons[index] = new Icon[1]; - icons[index][0] = new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/java/editor/resources/error-glyph.gif") );//NOI18N + icons[index][0] = ImageUtilities.loadImageIcon("org/netbeans/modules/java/editor/resources/error-glyph.gif", false);//NOI18N } index++; diff --git a/java.editor/src/org/netbeans/modules/java/editor/javadoc/JavadocCompletionItem.java b/java.editor/src/org/netbeans/modules/java/editor/javadoc/JavadocCompletionItem.java --- a/java.editor/src/org/netbeans/modules/java/editor/javadoc/JavadocCompletionItem.java +++ b/java.editor/src/org/netbeans/modules/java/editor/javadoc/JavadocCompletionItem.java @@ -130,7 +130,7 @@ } protected ImageIcon createIcon() { - return new ImageIcon(ImageUtilities.loadImage(iconPath)); + return ImageUtilities.loadImageIcon(iconPath, false); } protected String getLeftHtmlText() { diff --git a/java.hints/src/org/netbeans/modules/java/hints/introduce/ErrorLabel.java b/java.hints/src/org/netbeans/modules/java/hints/introduce/ErrorLabel.java --- a/java.hints/src/org/netbeans/modules/java/hints/introduce/ErrorLabel.java +++ b/java.hints/src/org/netbeans/modules/java/hints/introduce/ErrorLabel.java @@ -121,7 +121,7 @@ } protected Icon getErrorIcon() { - return new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/java/editor/resources/error-glyph.gif") ); + return ImageUtilities.loadImageIcon("org/netbeans/modules/java/editor/resources/error-glyph.gif", false); } /** diff --git a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java b/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java --- a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java +++ b/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java @@ -141,7 +141,7 @@ */ public final class J2SEProject implements Project, AntProjectListener { - private static final Icon J2SE_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png")); // NOI18N + private static final Icon J2SE_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png", false); // NOI18N private static final Logger LOG = Logger.getLogger(J2SEProject.class.getName()); private final AuxiliaryConfiguration aux; diff --git a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectType.java b/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectType.java --- a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectType.java +++ b/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectType.java @@ -81,7 +81,7 @@ } public Icon getIcon() { - return ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png", true)); + return ImageUtilities.loadImageIcon("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png", true); } } diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/ClassMemberFilters.java b/java.navigation/src/org/netbeans/modules/java/navigation/ClassMemberFilters.java --- a/java.navigation/src/org/netbeans/modules/java/navigation/ClassMemberFilters.java +++ b/java.navigation/src/org/netbeans/modules/java/navigation/ClassMemberFilters.java @@ -127,29 +127,25 @@ desc.addFilter(SHOW_INHERITED, NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowInherited"), //NOI18N NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowInheritedTip"), //NOI18N - false, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/java/navigation/resources/filterHideInherited.png")), //NOI18N + false, ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/filterHideInherited.png", false), //NOI18N null ); desc.addFilter(SHOW_FIELDS, NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowFields"), //NOI18N NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowFieldsTip"), //NOI18N - true, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/java/navigation/resources/filterHideFields.gif")), //NOI18N + true, ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/filterHideFields.gif", false), //NOI18N null ); desc.addFilter(SHOW_STATIC, NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowStatic"), //NOI18N NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowStaticTip"), //NOI18N - true, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/java/navigation/resources/filterHideStatic.png")), //NOI18N + true, ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/filterHideStatic.png", false), //NOI18N null ); desc.addFilter(SHOW_NON_PUBLIC, NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowNonPublic"), //NOI18N NbBundle.getMessage(ClassMemberFilters.class, "LBL_ShowNonPublicTip"), //NOI18N - true, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/java/navigation/resources/filterHideNonPublic.png")), //NOI18N + true, ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/filterHideNonPublic.png", false), //NOI18N null ); diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/DocumentationScrollPane.java b/java.navigation/src/org/netbeans/modules/java/navigation/DocumentationScrollPane.java --- a/java.navigation/src/org/netbeans/modules/java/navigation/DocumentationScrollPane.java +++ b/java.navigation/src/org/netbeans/modules/java/navigation/DocumentationScrollPane.java @@ -135,7 +135,7 @@ } private ImageIcon resolveIcon(String res){ - return new ImageIcon(ImageUtilities.loadImage (res)); + return ImageUtilities.loadImageIcon(res, false); } private void installTitleComponent() { diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/JavaMembersAndHierarchyIcons.java b/java.navigation/src/org/netbeans/modules/java/navigation/JavaMembersAndHierarchyIcons.java --- a/java.navigation/src/org/netbeans/modules/java/navigation/JavaMembersAndHierarchyIcons.java +++ b/java.navigation/src/org/netbeans/modules/java/navigation/JavaMembersAndHierarchyIcons.java @@ -55,20 +55,15 @@ * @author Sandip Chitale (Sandip.Chitale@Sun.Com) */ final class JavaMembersAndHierarchyIcons { - public static final Icon INHERITED_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/filterHideInherited.png")); // NOI18N + public static final Icon INHERITED_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/filterHideInherited.png", false); // NOI18N - public static final Icon SUPER_TYPE_HIERARCHY_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/supertypehierarchy.gif")); // NOI18N + public static final Icon SUPER_TYPE_HIERARCHY_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/supertypehierarchy.gif", false); // NOI18N - public static final Icon SUB_TYPE_HIERARCHY_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/subtypehierarchy.gif")); // NOI18N + public static final Icon SUB_TYPE_HIERARCHY_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/subtypehierarchy.gif", false); // NOI18N - public static final Icon EXPAND_ALL_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/expandall.gif")); // NOI18N + public static final Icon EXPAND_ALL_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/expandall.gif", false); // NOI18N - public static final Icon FQN_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/fqn.gif")); // NOI18N + public static final Icon FQN_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/fqn.gif", false); // NOI18N public static final Icon CLASS_ICON = ElementIcons.getElementIcon(ElementKind.CLASS, EnumSet.of(Modifier.PUBLIC)); @@ -90,14 +85,9 @@ EnumSet.of(Modifier.PUBLIC)); public static final Icon ENUM_CONSTANTS_ICON = ElementIcons.getElementIcon(ElementKind.ENUM_CONSTANT, EnumSet.of(Modifier.PUBLIC)); - public static final Icon PACKAGE_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/package.gif")); // NOI18N - public static final Icon PRIVATE_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/private.gif")); // NOI18N - public static final Icon PROTECTED_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/protected.gif")); // NOI18N - public static final Icon PUBLIC_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/public.gif")); // NOI18N - public static final Icon STATIC_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/navigation/resources/static.gif")); // NOI18N + public static final Icon PACKAGE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/package.gif", false); // NOI18N + public static final Icon PRIVATE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/private.gif", false); // NOI18N + public static final Icon PROTECTED_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/protected.gif", false); // NOI18N + public static final Icon PUBLIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/public.gif", false); // NOI18N + public static final Icon STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/static.gif", false); // NOI18N } diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/actions/DeclarationAction.java b/java.navigation/src/org/netbeans/modules/java/navigation/actions/DeclarationAction.java --- a/java.navigation/src/org/netbeans/modules/java/navigation/actions/DeclarationAction.java +++ b/java.navigation/src/org/netbeans/modules/java/navigation/actions/DeclarationAction.java @@ -60,7 +60,7 @@ public DeclarationAction() { super(NbBundle.getMessage(DeclarationAction.class, "CTL_DeclarationAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(DeclarationTopComponent.ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(DeclarationTopComponent.ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/actions/JavadocAction.java b/java.navigation/src/org/netbeans/modules/java/navigation/actions/JavadocAction.java --- a/java.navigation/src/org/netbeans/modules/java/navigation/actions/JavadocAction.java +++ b/java.navigation/src/org/netbeans/modules/java/navigation/actions/JavadocAction.java @@ -59,7 +59,7 @@ public JavadocAction() { super(NbBundle.getMessage(JavadocAction.class, "CTL_JavadocAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(JavadocTopComponent.ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(JavadocTopComponent.ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/actions/SortActionSupport.java b/java.navigation/src/org/netbeans/modules/java/navigation/actions/SortActionSupport.java --- a/java.navigation/src/org/netbeans/modules/java/navigation/actions/SortActionSupport.java +++ b/java.navigation/src/org/netbeans/modules/java/navigation/actions/SortActionSupport.java @@ -92,7 +92,7 @@ public SortByNameAction ( ClassMemberFilters filters) { super(filters); putValue(Action.NAME, NbBundle.getMessage(SortByNameAction.class, "LBL_SortByName")); //NOI18N - putValue(Action.SMALL_ICON, new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/java/navigation/resources/sortAlpha.png"))); //NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/sortAlpha.png", false)); //NOI18N } public void actionPerformed (ActionEvent e) { @@ -113,7 +113,7 @@ public SortBySourceAction ( ClassMemberFilters filters ) { super(filters); putValue(Action.NAME, NbBundle.getMessage(SortBySourceAction.class, "LBL_SortBySource")); //NOI18N - putValue(Action.SMALL_ICON, new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/java/navigation/resources/sortPosition.png"))); //NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/java/navigation/resources/sortPosition.png", false)); //NOI18N } public void actionPerformed (ActionEvent e) { diff --git a/java.platform/src/org/netbeans/modules/java/platform/wizard/LocationChooser.java b/java.platform/src/org/netbeans/modules/java/platform/wizard/LocationChooser.java --- a/java.platform/src/org/netbeans/modules/java/platform/wizard/LocationChooser.java +++ b/java.platform/src/org/netbeans/modules/java/platform/wizard/LocationChooser.java @@ -348,8 +348,8 @@ private static class PlatformFileView extends FileView { - private static final Icon BADGE = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/java/platform/resources/platformBadge.gif")); // NOI18N - private static final Icon EMPTY = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/java/platform/resources/empty.gif")); // NOI18N + private static final Icon BADGE = ImageUtilities.loadImageIcon("org/netbeans/modules/java/platform/resources/platformBadge.gif", false); // NOI18N + private static final Icon EMPTY = ImageUtilities.loadImageIcon("org/netbeans/modules/java/platform/resources/empty.gif", false); // NOI18N private FileSystemView fsv; private Icon lastOriginal; diff --git a/java.project/src/org/netbeans/modules/java/project/BrokenReferencesCustomizer.java b/java.project/src/org/netbeans/modules/java/project/BrokenReferencesCustomizer.java --- a/java.project/src/org/netbeans/modules/java/project/BrokenReferencesCustomizer.java +++ b/java.project/src/org/netbeans/modules/java/project/BrokenReferencesCustomizer.java @@ -238,8 +238,8 @@ private javax.swing.JScrollPane jScrollPane2; // End of variables declaration//GEN-END:variables - private static Icon brokenRef = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/java/project/resources/broken-reference.gif")); // NOI18N - private static Icon resolvedRef = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/java/project/resources/resolved-reference.gif")); // NOI18N + private static Icon brokenRef = ImageUtilities.loadImageIcon("org/netbeans/modules/java/project/resources/broken-reference.gif", false); // NOI18N + private static Icon resolvedRef = ImageUtilities.loadImageIcon("org/netbeans/modules/java/project/resources/resolved-reference.gif", false); // NOI18N private static class ListCellRendererImpl extends DefaultListCellRenderer { diff --git a/javadoc/src/org/netbeans/modules/javadoc/search/DocSearchIcons.java b/javadoc/src/org/netbeans/modules/javadoc/search/DocSearchIcons.java --- a/javadoc/src/org/netbeans/modules/javadoc/search/DocSearchIcons.java +++ b/javadoc/src/org/netbeans/modules/javadoc/search/DocSearchIcons.java @@ -45,10 +45,9 @@ import javax.lang.model.element.ElementKind; import javax.lang.model.element.Modifier; import javax.swing.Icon; -import javax.swing.ImageIcon; import org.netbeans.api.java.source.UiUtils; -import org.openide.util.Utilities; +import org.openide.util.ImageUtilities; /** @@ -78,21 +77,21 @@ try { final EnumSet mods = EnumSet.of(Modifier.PUBLIC); final EnumSet modsSt = EnumSet.of(Modifier.PUBLIC, Modifier.STATIC); - icons[ ICON_NOTRESOLVED ] = new ImageIcon (Utilities.loadImage("org/netbeans/modules/javadoc/resources/pending.gif")); // NOI18N - icons[ ICON_PACKAGE ] = new ImageIcon (Utilities.loadImage ("org/netbeans/modules/javadoc/comments/resources/package.gif")); // NOI18N + icons[ ICON_NOTRESOLVED ] = ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/pending.gif", false); // NOI18N + icons[ ICON_PACKAGE ] = ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/comments/resources/package.gif", false); // NOI18N icons[ ICON_CLASS ] = UiUtils.getElementIcon(ElementKind.CLASS, mods); icons[ ICON_INTERFACE ] = UiUtils.getElementIcon(ElementKind.INTERFACE, mods); icons[ ICON_ENUM ] = UiUtils.getElementIcon(ElementKind.ENUM, mods); icons[ ICON_ANNTYPE ] = UiUtils.getElementIcon(ElementKind.ANNOTATION_TYPE, mods); - icons[ ICON_EXCEPTION ] = new ImageIcon (Utilities.loadImage ("org/netbeans/modules/javadoc/resources/exception.gif")); // NOI18N - icons[ ICON_ERROR ] = new ImageIcon (Utilities.loadImage ("org/netbeans/modules/javadoc/resources/error.gif")); // NOI18N + icons[ ICON_EXCEPTION ] = ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/exception.gif", false); // NOI18N + icons[ ICON_ERROR ] = ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/error.gif", false); // NOI18N icons[ ICON_CONSTRUCTOR ] = UiUtils.getElementIcon(ElementKind.CONSTRUCTOR, mods); icons[ ICON_METHOD ] = UiUtils.getElementIcon(ElementKind.METHOD, mods); icons[ ICON_METHOD_ST ] = UiUtils.getElementIcon(ElementKind.METHOD, modsSt); icons[ ICON_VARIABLE ] = UiUtils.getElementIcon(ElementKind.FIELD, mods); icons[ ICON_VARIABLE_ST ] = UiUtils.getElementIcon(ElementKind.FIELD, modsSt); - icons[ ICON_NOT_FOUND ] = new ImageIcon (Utilities.loadImage ("org/netbeans/modules/javadoc/resources/notFound.gif")); // NOI18N - icons[ ICON_WAIT ] = new ImageIcon (Utilities.loadImage ("org/netbeans/modules/javadoc/resources/wait.png")); // NOI18N + icons[ ICON_NOT_FOUND ] = ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/notFound.gif", false); // NOI18N + icons[ ICON_WAIT ] = ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/wait.png", false); // NOI18N } catch (Throwable w) { w.printStackTrace (); diff --git a/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java b/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java --- a/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java +++ b/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java @@ -206,12 +206,12 @@ - sourceButton.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/javadoc/resources/showSource.gif"))); // NOI18N - byReferenceButton.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/javadoc/resources/refSort.gif"))); // NOI18N - byTypeButton.setIcon(new ImageIcon(Utilities.loadImage("org/netbeans/modules/javadoc/resources/typeSort.gif"))); // NOI18N - byNameButton.setIcon(new ImageIcon(Utilities.loadImage("org/netbeans/modules/javadoc/resources/alphaSort.gif"))); // NOI18N - quickViewButton.setIcon(new ImageIcon(Utilities.loadImage("org/netbeans/modules/javadoc/resources/list_only.gif"))); // NOI18N - quickViewButton.setSelectedIcon(new ImageIcon(Utilities.loadImage("org/netbeans/modules/javadoc/resources/list_html.gif"))); // NOI18N + sourceButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/showSource.gif", false)); // NOI18N + byReferenceButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/refSort.gif", false)); // NOI18N + byTypeButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/typeSort.gif", false)); // NOI18N + byNameButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/alphaSort.gif", false)); // NOI18N + quickViewButton.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/list_only.gif", false)); // NOI18N + quickViewButton.setSelectedIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/javadoc/resources/list_html.gif", false)); // NOI18N javax.swing.ButtonGroup bg = new javax.swing.ButtonGroup(); bg.add( byReferenceButton ); diff --git a/javascript.editing/src/org/netbeans/modules/javascript/editing/JsCodeCompletion.java b/javascript.editing/src/org/netbeans/modules/javascript/editing/JsCodeCompletion.java --- a/javascript.editing/src/org/netbeans/modules/javascript/editing/JsCodeCompletion.java +++ b/javascript.editing/src/org/netbeans/modules/javascript/editing/JsCodeCompletion.java @@ -2754,7 +2754,7 @@ } if (keywordIcon == null) { - keywordIcon = new ImageIcon(ImageUtilities.loadImage(Js_KEYWORD)); + keywordIcon = ImageUtilities.loadImageIcon(Js_KEYWORD, false); } return keywordIcon; diff --git a/javascript.editing/src/org/netbeans/modules/javascript/editing/JsTypeSearcher.java b/javascript.editing/src/org/netbeans/modules/javascript/editing/JsTypeSearcher.java --- a/javascript.editing/src/org/netbeans/modules/javascript/editing/JsTypeSearcher.java +++ b/javascript.editing/src/org/netbeans/modules/javascript/editing/JsTypeSearcher.java @@ -420,7 +420,7 @@ initProjectInfo(); } if (isLibrary) { - return new ImageIcon(ImageUtilities.loadImage(ICON_PATH)); + return ImageUtilities.loadImageIcon(ICON_PATH, false); } return projectIcon; } diff --git a/jconsole/src/org/netbeans/modules/jmx/jconsole/LaunchAction.java b/jconsole/src/org/netbeans/modules/jmx/jconsole/LaunchAction.java --- a/jconsole/src/org/netbeans/modules/jmx/jconsole/LaunchAction.java +++ b/jconsole/src/org/netbeans/modules/jmx/jconsole/LaunchAction.java @@ -212,9 +212,7 @@ //Needed in Tools|Options|...| ToolBars action icons putValue ( - Action.SMALL_ICON, - new javax.swing.ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/jmx/jconsole/resources/console.png")) // NOI18N - ); + Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/jmx/jconsole/resources/console.png", false)); } public org.openide.util.HelpCtx getHelpCtx() { diff --git a/jconsole/src/org/netbeans/modules/jmx/jconsole/runtime/AntActions.java b/jconsole/src/org/netbeans/modules/jmx/jconsole/runtime/AntActions.java --- a/jconsole/src/org/netbeans/modules/jmx/jconsole/runtime/AntActions.java +++ b/jconsole/src/org/netbeans/modules/jmx/jconsole/runtime/AntActions.java @@ -98,9 +98,7 @@ //Needed in Tools|Options|...| ToolBars action icons a.putValue ( - Action.SMALL_ICON, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/jmx/jconsole/resources/run_project.png")) // NOI18N - ); + Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/jmx/jconsole/resources/run_project.png", false)); return a; } @@ -128,9 +126,7 @@ ); //Needed in Tools|Options|...| ToolBars action icons a.putValue ( - Action.SMALL_ICON, - new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/jmx/jconsole/resources/debug_project.png")) // NOI18N - ); + Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/jmx/jconsole/resources/debug_project.png", false)); return a; } diff --git a/jumpto/src/org/netbeans/modules/jumpto/file/FileDescription.java b/jumpto/src/org/netbeans/modules/jumpto/file/FileDescription.java --- a/jumpto/src/org/netbeans/modules/jumpto/file/FileDescription.java +++ b/jumpto/src/org/netbeans/modules/jumpto/file/FileDescription.java @@ -276,7 +276,7 @@ public static class Renderer extends DefaultListCellRenderer implements ChangeListener { - public static Icon WAIT_ICON = new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/jumpto/resources/wait.gif") ); // NOI18N + public static Icon WAIT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/jumpto/resources/wait.gif", false); // NOI18N private JPanel rendererComponent; diff --git a/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToPanel.java b/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToPanel.java --- a/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToPanel.java +++ b/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToPanel.java @@ -80,8 +80,8 @@ */ public class GoToPanel extends javax.swing.JPanel { - private static Icon WAIT_ICON = new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/jumpto/resources/wait.gif") ); // NOI18N - private static Icon WARN_ICON = new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/jumpto/resources/warning.png") ); // NOI18N + private static Icon WAIT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/jumpto/resources/wait.gif", false); // NOI18N + private static Icon WARN_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/jumpto/resources/warning.png", false); // NOI18N private static final int BRIGHTER_COLOR_COMPONENT = 10; private ContentProvider contentProvider; diff --git a/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java b/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java --- a/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java +++ b/jumpto/src/org/netbeans/modules/jumpto/symbol/GoToSymbolAction.java @@ -624,7 +624,7 @@ jlName.setText( "Sample" ); // NOI18N //jlName.setIcon(UiUtils.getElementIcon(ElementKind.CLASS, null)); - jlName.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/jumpto/type/sample.png"))); + jlName.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/jumpto/type/sample.png", false)); jList.setFixedCellHeight(jlName.getPreferredSize().height); jList.setFixedCellWidth(jv.getExtentSize().width); diff --git a/jumpto/src/org/netbeans/modules/jumpto/type/GoToPanel.java b/jumpto/src/org/netbeans/modules/jumpto/type/GoToPanel.java --- a/jumpto/src/org/netbeans/modules/jumpto/type/GoToPanel.java +++ b/jumpto/src/org/netbeans/modules/jumpto/type/GoToPanel.java @@ -78,8 +78,8 @@ */ public class GoToPanel extends javax.swing.JPanel { - private static Icon WAIT_ICON = new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/jumpto/resources/wait.gif") ); // NOI18N - private static Icon WARN_ICON = new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/jumpto/resources/warning.png") ); // NOI18N + private static Icon WAIT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/jumpto/resources/wait.gif", false); // NOI18N + private static Icon WARN_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/jumpto/resources/warning.png", false); // NOI18N private static final int BRIGHTER_COLOR_COMPONENT = 10; private ContentProvider contentProvider; diff --git a/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java b/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java --- a/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java +++ b/jumpto/src/org/netbeans/modules/jumpto/type/GoToTypeAction.java @@ -623,7 +623,7 @@ jlName.setText( "Sample" ); // NOI18N //jlName.setIcon(UiUtils.getElementIcon(ElementKind.CLASS, null)); - jlName.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/jumpto/type/sample.png"))); + jlName.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/jumpto/type/sample.png", false)); jList.setFixedCellHeight(jlName.getPreferredSize().height); jList.setFixedCellWidth(jv.getExtentSize().width); diff --git a/junit/src/org/netbeans/modules/junit/output/StatisticsPanel.java b/junit/src/org/netbeans/modules/junit/output/StatisticsPanel.java --- a/junit/src/org/netbeans/modules/junit/output/StatisticsPanel.java +++ b/junit/src/org/netbeans/modules/junit/output/StatisticsPanel.java @@ -106,10 +106,7 @@ /** */ private void createFilterButton() { - btnFilter = new JToggleButton(new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/junit/output/res/filter.png", //NOI18N - true))); + btnFilter = new JToggleButton(ImageUtilities.loadImageIcon("org/netbeans/modules/junit/output/res/filter.png", true)); btnFilter.getAccessibleContext().setAccessibleName( NbBundle.getMessage(getClass(), "ACSN_FilterButton")); //NOI18N btnFilter.addItemListener(this); diff --git a/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlCompletion.java b/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlCompletion.java --- a/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlCompletion.java +++ b/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlCompletion.java @@ -280,7 +280,7 @@ public ImageIcon getIcon() { if (keywordIcon == null) { - keywordIcon = new ImageIcon(ImageUtilities.loadImage(YAML_KEYWORD)); + keywordIcon = ImageUtilities.loadImageIcon(YAML_KEYWORD, false); } return keywordIcon; diff --git a/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/LoadAction.java b/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/LoadAction.java --- a/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/LoadAction.java +++ b/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/LoadAction.java @@ -76,7 +76,7 @@ /** Creates a new instance of StopAction */ public LoadAction(final Engine provider) { - super(java.util.ResourceBundle.getBundle("org/netbeans/modules/loadgenerator/actions/Bundle").getString("Start"), new ImageIcon(ImageUtilities.loadImage(ICON))); + super(java.util.ResourceBundle.getBundle("org/netbeans/modules/loadgenerator/actions/Bundle").getString("Start"),ImageUtilities.loadImageIcon(ICON, false)); this.provider = provider; this.provider.addPropertyChangeListener(Engine.STATE, WeakListeners.propertyChange(listener, provider)); diff --git a/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/RemoveStoppedAction.java b/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/RemoveStoppedAction.java --- a/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/RemoveStoppedAction.java +++ b/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/RemoveStoppedAction.java @@ -72,7 +72,7 @@ /** Creates a new instance of RemoveStoppedAction */ public RemoveStoppedAction(final Engine engine) { - super(java.util.ResourceBundle.getBundle("org/netbeans/modules/loadgenerator/actions/Bundle").getString("Remove_All_Stopped"), new ImageIcon(ImageUtilities.loadImage(ICON))); + super(java.util.ResourceBundle.getBundle("org/netbeans/modules/loadgenerator/actions/Bundle").getString("Remove_All_Stopped"),ImageUtilities.loadImageIcon(ICON, false)); this.engine = engine; this.engine.addPropertyChangeListener(ProcessInstance.STATE, WeakListeners.propertyChange(listener, engine)); } diff --git a/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/StartAction.java b/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/StartAction.java --- a/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/StartAction.java +++ b/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/StartAction.java @@ -75,7 +75,7 @@ /** Creates a new instance of StopAction */ public StartAction(final ProcessInstance provider) { - super(java.util.ResourceBundle.getBundle("org/netbeans/modules/loadgenerator/actions/Bundle").getString("Restart"), new ImageIcon(ImageUtilities.loadImage(ICON))); + super(java.util.ResourceBundle.getBundle("org/netbeans/modules/loadgenerator/actions/Bundle").getString("Restart"),ImageUtilities.loadImageIcon(ICON, false)); this.provider = provider; this.provider.addPropertyChangeListener(ProcessInstance.STATE, WeakListeners.propertyChange(listener, provider)); } diff --git a/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/StopAction.java b/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/StopAction.java --- a/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/StopAction.java +++ b/loadgenerator/src/org/netbeans/modules/loadgenerator/actions/StopAction.java @@ -74,7 +74,7 @@ /** Creates a new instance of StopAction */ public StopAction(final ProcessInstance provider) { - super(java.util.ResourceBundle.getBundle("org/netbeans/modules/loadgenerator/actions/Bundle").getString("Stop"), new ImageIcon(ImageUtilities.loadImage(ICON))); + super(java.util.ResourceBundle.getBundle("org/netbeans/modules/loadgenerator/actions/Bundle").getString("Stop"),ImageUtilities.loadImageIcon(ICON, false)); this.provider = provider; this.provider.addPropertyChangeListener(ProcessInstance.STATE, WeakListeners.propertyChange(listener, provider)); } diff --git a/maven.grammar/src/org/netbeans/modules/maven/grammar/AbstractSchemaBasedGrammar.java b/maven.grammar/src/org/netbeans/modules/maven/grammar/AbstractSchemaBasedGrammar.java --- a/maven.grammar/src/org/netbeans/modules/maven/grammar/AbstractSchemaBasedGrammar.java +++ b/maven.grammar/src/org/netbeans/modules/maven/grammar/AbstractSchemaBasedGrammar.java @@ -467,7 +467,7 @@ MyElement(String name) { this.name = name; - setIcon(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/maven/grammar/element.png"))); //NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/grammar/element.png", false)); //NOI18N } public short getNodeType() { @@ -494,7 +494,7 @@ MyTextElement(String name, String prefix) { this.name = name; this.prefix = prefix; - setIcon(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/maven/grammar/value.png"))); //NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/grammar/value.png", false)); //NOI18N } public short getNodeType() { diff --git a/maven.graph/src/org/netbeans/modules/maven/graph/DependencyGraphTopComponent.java b/maven.graph/src/org/netbeans/modules/maven/graph/DependencyGraphTopComponent.java --- a/maven.graph/src/org/netbeans/modules/maven/graph/DependencyGraphTopComponent.java +++ b/maven.graph/src/org/netbeans/modules/maven/graph/DependencyGraphTopComponent.java @@ -172,7 +172,7 @@ jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); - btnBigger.setIcon(new ImageIcon(Utilities.loadImage("org/netbeans/modules/maven/graph/zoomin.gif"))); + btnBigger.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/graph/zoomin.gif", false)); btnBigger.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBiggerActionPerformed(evt); @@ -180,7 +180,7 @@ }); jPanel1.add(btnBigger); - btnSmaller.setIcon(new ImageIcon(Utilities.loadImage("org/netbeans/modules/maven/graph/zoomout.gif"))); + btnSmaller.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/graph/zoomout.gif", false)); btnSmaller.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSmallerActionPerformed(evt); diff --git a/maven.repository/src/org/netbeans/modules/maven/repository/M2RepositoryBrowserAction.java b/maven.repository/src/org/netbeans/modules/maven/repository/M2RepositoryBrowserAction.java --- a/maven.repository/src/org/netbeans/modules/maven/repository/M2RepositoryBrowserAction.java +++ b/maven.repository/src/org/netbeans/modules/maven/repository/M2RepositoryBrowserAction.java @@ -55,7 +55,7 @@ public M2RepositoryBrowserAction() { super(NbBundle.getMessage(M2RepositoryBrowserAction.class, "CTL_M2RepositoryBrowserAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(M2RepositoryBrowserTopComponent.ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(M2RepositoryBrowserTopComponent.ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/maven.repository/src/org/netbeans/modules/maven/repository/M2RepositoryBrowserTopComponent.java b/maven.repository/src/org/netbeans/modules/maven/repository/M2RepositoryBrowserTopComponent.java --- a/maven.repository/src/org/netbeans/modules/maven/repository/M2RepositoryBrowserTopComponent.java +++ b/maven.repository/src/org/netbeans/modules/maven/repository/M2RepositoryBrowserTopComponent.java @@ -95,9 +95,9 @@ map.put("delete", ExplorerUtils.actionDelete(manager, true)); //NOI18N associateLookup(ExplorerUtils.createLookup(manager, map)); pnlBrowse.add(btv, BorderLayout.CENTER); - btnIndex.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/repository/refreshRepo.png"))); //NOI18N - btnAddRepo.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/repository/AddRepo.png"))); //NOI18N - btnFind.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/repository/FindInRepo.png"))); //NOI18N + btnIndex.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/repository/refreshRepo.png", false)); //NOI18N + btnAddRepo.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/repository/AddRepo.png", false)); //NOI18N + btnFind.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/repository/FindInRepo.png", false)); //NOI18N btnIndex.setText(null); btnAddRepo.setText(null); btnFind.setText(null); diff --git a/maven/src/org/netbeans/modules/maven/NbMavenProjectFactory.java b/maven/src/org/netbeans/modules/maven/NbMavenProjectFactory.java --- a/maven/src/org/netbeans/modules/maven/NbMavenProjectFactory.java +++ b/maven/src/org/netbeans/modules/maven/NbMavenProjectFactory.java @@ -81,7 +81,7 @@ public ProjectManager.Result isProject2(FileObject projectDirectory) { if (isProject(projectDirectory)) { - return new ProjectManager.Result(ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/maven/Maven2Icon.gif", true))); //NOI18N + return new ProjectManager.Result(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/Maven2Icon.gif", true)); //NOI18N } return null; } diff --git a/maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java b/maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java --- a/maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java +++ b/maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java @@ -246,8 +246,8 @@ public ReRunAction(boolean debug) { this.debug = debug; - this.putValue(Action.SMALL_ICON, debug ? new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/execute/refreshdebug.png")) : //NOI18N - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/execute/refresh.png")));//NOI18N + this.putValue(Action.SMALL_ICON, debug ? ImageUtilities.loadImageIcon("org/netbeans/modules/maven/execute/refreshdebug.png", false) : //NOI18N + ImageUtilities.loadImageIcon("org/netbeans/modules/maven/execute/refresh.png", false));//NOI18N putValue(Action.NAME, debug ? NbBundle.getMessage(AbstractMavenExecutor.class, "TXT_Rerun_extra") : NbBundle.getMessage(AbstractMavenExecutor.class, "TXT_Rerun")); putValue(Action.SHORT_DESCRIPTION, debug ? NbBundle.getMessage(AbstractMavenExecutor.class, "TIP_Rerun_Extra") : NbBundle.getMessage(AbstractMavenExecutor.class, "TIP_Rerun")); @@ -283,7 +283,7 @@ private AbstractMavenExecutor exec; StopAction() { - putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/execute/stop.png"))); //NOi18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/maven/execute/stop.png", false)); //NOi18N putValue(Action.NAME, NbBundle.getMessage(AbstractMavenExecutor.class, "TXT_Stop_execution")); putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(AbstractMavenExecutor.class, "TIP_Stop_Execution")); @@ -306,7 +306,7 @@ private MavenBuildPlanSupport mbps; BuildPlanAction() { - putValue(Action.SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/execute/buildplangoals.png"))); //NOi18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/maven/execute/buildplangoals.png", false)); //NOi18N putValue(Action.NAME, NbBundle.getMessage(AbstractMavenExecutor.class, "TXT_Build_Plan")); putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(AbstractMavenExecutor.class, "TIP_Build_Plan_tip")); diff --git a/maven/src/org/netbeans/modules/maven/execute/ui/RunGoalsPanel.java b/maven/src/org/netbeans/modules/maven/execute/ui/RunGoalsPanel.java --- a/maven/src/org/netbeans/modules/maven/execute/ui/RunGoalsPanel.java +++ b/maven/src/org/netbeans/modules/maven/execute/ui/RunGoalsPanel.java @@ -79,8 +79,8 @@ public RunGoalsPanel() { initComponents(); historyMappings = new ArrayList(); - btnPrev.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/execute/back.png"))); //NOI18N - btnNext.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/maven/execute/forward.png"))); //NOI18N + btnPrev.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/execute/back.png", false)); //NOI18N + btnNext.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/maven/execute/forward.png", false)); //NOI18N goalcompleter = new TextValueCompleter(new ArrayList(0), txtGoals, " "); //NOI18N goalcompleter.setLoading(true); diff --git a/mercurial/src/org/netbeans/modules/mercurial/ui/status/OpenVersioningAction.java b/mercurial/src/org/netbeans/modules/mercurial/ui/status/OpenVersioningAction.java --- a/mercurial/src/org/netbeans/modules/mercurial/ui/status/OpenVersioningAction.java +++ b/mercurial/src/org/netbeans/modules/mercurial/ui/status/OpenVersioningAction.java @@ -61,7 +61,7 @@ public OpenVersioningAction() { putValue("noIconInMenu", Boolean.FALSE); // NOI18N - setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/mercurial/resources/icons/versioning-view.png"))); // NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/mercurial/resources/icons/versioning-view.png", false)); // NOI18N } public String getName() { diff --git a/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/wizard/FindPanel.java b/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/wizard/FindPanel.java --- a/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/wizard/FindPanel.java +++ b/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/wizard/FindPanel.java @@ -191,8 +191,7 @@ }//GEN-LAST:event_jButton1ActionPerformed private static final class Badger extends FileFilter implements FileChooserBuilder.BadgeProvider { - final Icon badge = new ImageIcon (ImageUtilities.loadImage( - "org/netbeans/modules/java/platform/resources/platformBadge.gif")); + final Icon badge = ImageUtilities.loadImageIcon("org/netbeans/modules/java/platform/resources/platformBadge.gif", false); public boolean accept(File f) { return f.isDirectory(); diff --git a/mobility.editor/src/org/netbeans/modules/mobility/editor/PPDirectiveCompletionItem.java b/mobility.editor/src/org/netbeans/modules/mobility/editor/PPDirectiveCompletionItem.java --- a/mobility.editor/src/org/netbeans/modules/mobility/editor/PPDirectiveCompletionItem.java +++ b/mobility.editor/src/org/netbeans/modules/mobility/editor/PPDirectiveCompletionItem.java @@ -93,7 +93,7 @@ synchronized (this) { if (icon == null) { - icon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/mobility/editor/resources/d.png")); + icon = ImageUtilities.loadImageIcon("org/netbeans/modules/mobility/editor/resources/d.png", false); } } diff --git a/mobility.editor/src/org/netbeans/modules/mobility/editor/PPVariableCompletionItem.java b/mobility.editor/src/org/netbeans/modules/mobility/editor/PPVariableCompletionItem.java --- a/mobility.editor/src/org/netbeans/modules/mobility/editor/PPVariableCompletionItem.java +++ b/mobility.editor/src/org/netbeans/modules/mobility/editor/PPVariableCompletionItem.java @@ -116,7 +116,7 @@ synchronized (this) { if (icon == null) { - icon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/mobility/editor/resources/v.png")); + icon = ImageUtilities.loadImageIcon("org/netbeans/modules/mobility/editor/resources/v.png", false); } } diff --git a/mobility.jsr172/src/org/netbeans/modules/mobility/jsr172/wizard/ValidationNotifier.java b/mobility.jsr172/src/org/netbeans/modules/mobility/jsr172/wizard/ValidationNotifier.java --- a/mobility.jsr172/src/org/netbeans/modules/mobility/jsr172/wizard/ValidationNotifier.java +++ b/mobility.jsr172/src/org/netbeans/modules/mobility/jsr172/wizard/ValidationNotifier.java @@ -121,8 +121,8 @@ } } - private static final Icon ICON_WARNING = new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/mobility/jsr172/resources/warning.png" )); - private static final Icon ICON_ERROR = new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/mobility/jsr172/resources/error.png" )); + private static final Icon ICON_WARNING = ImageUtilities.loadImageIcon("org/netbeans/modules/mobility/jsr172/resources/warning.png", false); + private static final Icon ICON_ERROR = ImageUtilities.loadImageIcon("org/netbeans/modules/mobility/jsr172/resources/error.png", false); private static final class IconListRenderer implements ListCellRenderer { diff --git a/mobility.project/src/org/netbeans/modules/mobility/project/J2MEProject.java b/mobility.project/src/org/netbeans/modules/mobility/project/J2MEProject.java --- a/mobility.project/src/org/netbeans/modules/mobility/project/J2MEProject.java +++ b/mobility.project/src/org/netbeans/modules/mobility/project/J2MEProject.java @@ -144,8 +144,7 @@ * @author Jesse Glick, Adam Sotona, Tim Boudreau */ public final class J2MEProject implements Project, AntProjectListener { - final Icon J2ME_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/mobility/project/ui/resources/mobile-project.png" )); // NOI18N + final Icon J2ME_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/mobility/project/ui/resources/mobile-project.png", false); // NOI18N private static final URLStreamHandler COMPOSED_STREAM_HANDLER = new URLStreamHandler() { protected URLConnection openConnection(URL u) throws IOException { return new ComposedConnection(u); diff --git a/mobility.project/src/org/netbeans/modules/mobility/project/ui/OneResourceNode.java b/mobility.project/src/org/netbeans/modules/mobility/project/ui/OneResourceNode.java --- a/mobility.project/src/org/netbeans/modules/mobility/project/ui/OneResourceNode.java +++ b/mobility.project/src/org/netbeans/modules/mobility/project/ui/OneResourceNode.java @@ -204,7 +204,7 @@ //Add a jar file if ("jar".equals(file.getURL().getProtocol())) { //NOI18N file = FileUtil.getArchiveFile(file); - icon = openedIcon = new ImageIcon(ImageUtilities.loadImage(ARCHIVE_ICON)); + icon = openedIcon = ImageUtilities.loadImageIcon(ARCHIVE_ICON, false); result = PackageView.createPackageView(new LibrariesSourceGroup(file, file.getNameExt(), icon, openedIcon)); } else { if (file.isFolder()) { diff --git a/mobility.svgcore/src/org/netbeans/modules/mobility/svgcore/navigator/SVGNavigatorContent.java b/mobility.svgcore/src/org/netbeans/modules/mobility/svgcore/navigator/SVGNavigatorContent.java --- a/mobility.svgcore/src/org/netbeans/modules/mobility/svgcore/navigator/SVGNavigatorContent.java +++ b/mobility.svgcore/src/org/netbeans/modules/mobility/svgcore/navigator/SVGNavigatorContent.java @@ -440,22 +440,19 @@ desc.addFilter(ATTRIBUTES_FILTER, NbBundle.getMessage(SVGNavigatorContent.class, "LBL_ShowAttributes"), //NOI18N NbBundle.getMessage(SVGNavigatorContent.class, "LBL_ShowAttributesTip"), //NOI18N - SVGNavigatorTree.showAttributes, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/mobility/svgcore/resources/a.png")), //NOI18N + SVGNavigatorTree.showAttributes, ImageUtilities.loadImageIcon("org/netbeans/modules/mobility/svgcore/resources/a.png", false), //NOI18N null ); desc.addFilter(ID_FILTER, NbBundle.getMessage(SVGNavigatorContent.class, "LBL_ShowId"), //NOI18N NbBundle.getMessage(SVGNavigatorContent.class, "LBL_ShowIdTip"), //NOI18N - SVGNavigatorTree.showIdOnly, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/mobility/svgcore/resources/filterIdentified.png")), //NOI18N + SVGNavigatorTree.showIdOnly, ImageUtilities.loadImageIcon("org/netbeans/modules/mobility/svgcore/resources/filterIdentified.png", false), //NOI18N null ); desc.addFilter(ANIMATION_FILTER, NbBundle.getMessage(SVGNavigatorContent.class, "LBL_ShowAnimation"), //NOI18N NbBundle.getMessage(SVGNavigatorContent.class, "LBL_ShowAnimationTip"), //NOI18N - SVGNavigatorTree.showAnimationsOnly, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/mobility/svgcore/resources/filterAnimations.png")), //NOI18N + SVGNavigatorTree.showAnimationsOnly, ImageUtilities.loadImageIcon("org/netbeans/modules/mobility/svgcore/resources/filterAnimations.png", false), //NOI18N null ); diff --git a/mobility.svgcore/src/org/netbeans/modules/mobility/svgcore/navigator/SVGNavigatorTreeCellRenderer.java b/mobility.svgcore/src/org/netbeans/modules/mobility/svgcore/navigator/SVGNavigatorTreeCellRenderer.java --- a/mobility.svgcore/src/org/netbeans/modules/mobility/svgcore/navigator/SVGNavigatorTreeCellRenderer.java +++ b/mobility.svgcore/src/org/netbeans/modules/mobility/svgcore/navigator/SVGNavigatorTreeCellRenderer.java @@ -123,7 +123,7 @@ } private ImageIcon getImageIcon(String name, boolean error){ - ImageIcon icon = new ImageIcon(ImageUtilities.loadImage(name)); + ImageIcon icon = ImageUtilities.loadImageIcon(name, false); if(error) return new ImageIcon(ImageUtilities.mergeImages( icon.getImage(), ERROR_IMAGE, 15, 7 )); else diff --git a/o.n.bluej/src/org/netbeans/bluej/BluejProject.java b/o.n.bluej/src/org/netbeans/bluej/BluejProject.java --- a/o.n.bluej/src/org/netbeans/bluej/BluejProject.java +++ b/o.n.bluej/src/org/netbeans/bluej/BluejProject.java @@ -91,7 +91,7 @@ */ public final class BluejProject implements Project, AntProjectListener { - private static final Icon BLUEJ_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/bluej/resources/bluejproject.png")); // NOI18N + private static final Icon BLUEJ_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/bluej/resources/bluejproject.png", false); // NOI18N private static final String PROP_BLUEJ_HOME = "bluej.userlib"; //NOI18N diff --git a/o.n.bluej/src/org/netbeans/bluej/BluejSources.java b/o.n.bluej/src/org/netbeans/bluej/BluejSources.java --- a/o.n.bluej/src/org/netbeans/bluej/BluejSources.java +++ b/o.n.bluej/src/org/netbeans/bluej/BluejSources.java @@ -115,7 +115,7 @@ } public Icon getIcon(boolean b) { - return new ImageIcon(ImageUtilities.loadImage("/org/netbeans/bluej/resources/bluejproject.png")); // NOI18N + return ImageUtilities.loadImageIcon("/org/netbeans/bluej/resources/bluejproject.png", false); // NOI18N } public boolean contains(FileObject fileObject) throws IllegalArgumentException { diff --git a/o.n.core/src/org/netbeans/core/NotifyExcPanel.java b/o.n.core/src/org/netbeans/core/NotifyExcPanel.java --- a/o.n.core/src/org/netbeans/core/NotifyExcPanel.java +++ b/o.n.core/src/org/netbeans/core/NotifyExcPanel.java @@ -604,7 +604,7 @@ public static Component getNotificationVisualizer() { //do not create flashing icon if not allowed in system properties if( null == flasher ) { - ImageIcon img1 = new ImageIcon( ImageUtilities.loadImage("org/netbeans/core/resources/exception.gif", true) ); + ImageIcon img1 = ImageUtilities.loadImageIcon("org/netbeans/core/resources/exception.gif", true); flasher = new ExceptionFlasher( img1 ); } return flasher; diff --git a/o.n.swing.dirchooser/src/org/netbeans/swing/dirchooser/DirectoryChooserUI.java b/o.n.swing.dirchooser/src/org/netbeans/swing/dirchooser/DirectoryChooserUI.java --- a/o.n.swing.dirchooser/src/org/netbeans/swing/dirchooser/DirectoryChooserUI.java +++ b/o.n.swing.dirchooser/src/org/netbeans/swing/dirchooser/DirectoryChooserUI.java @@ -595,7 +595,7 @@ // on Mac all icons from UIManager are the same, some default, so load our own. // it's also fallback if icon from UIManager not found, may happen if (isMac || upFolderIcon == null) { - upFolderIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/swing/dirchooser/resources/upFolderIcon.gif")); + upFolderIcon = ImageUtilities.loadImageIcon("org/netbeans/swing/dirchooser/resources/upFolderIcon.gif", false); } upFolderButton.setIcon(upFolderIcon); upFolderButton.setToolTipText(upFolderToolTipText); @@ -618,7 +618,7 @@ homeIcon = UIManager.getIcon("FileChooser.homeFolderIcon"); } if (isMac || homeIcon == null) { - homeIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/swing/dirchooser/resources/homeIcon.gif")); + homeIcon = ImageUtilities.loadImageIcon("org/netbeans/swing/dirchooser/resources/homeIcon.gif", false); } homeButton.setIcon(homeIcon); homeButton.setText(null); @@ -646,7 +646,7 @@ // on Mac all icons from UIManager are the same, some default, so load our own. // it's also fallback if icon from UIManager not found, may happen if (isMac || newFolderIcon == null) { - newFolderIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/swing/dirchooser/resources/newFolderIcon.gif")); + newFolderIcon = ImageUtilities.loadImageIcon("org/netbeans/swing/dirchooser/resources/newFolderIcon.gif", false); } newFolderButton.setIcon(newFolderIcon); newFolderButton.setToolTipText(newFolderToolTipText); diff --git a/openide.awt/src/org/openide/awt/Actions.java b/openide.awt/src/org/openide/awt/Actions.java --- a/openide.awt/src/org/openide/awt/Actions.java +++ b/openide.awt/src/org/openide/awt/Actions.java @@ -1120,9 +1120,7 @@ if (!popup) { boolean jdk16orNewer = "1.6".compareTo(System.getProperty("java.version")) <= 0; - button.setIcon(new ImageIcon(Utilities.loadImage( - jdk16orNewer ? "org/openide/resources/actions/empty.gif" // NOI18N - : "org/openide/resources/actions/gap.gif", true))); // NOI18N + button.setIcon(ImageUtilities.loadImageIcon(jdk16orNewer ? "org/openide/resources/actions/empty.gif" : "org/openide/resources/actions/gap.gif", true)); // NOI18N } } diff --git a/openide.awt/src/org/openide/awt/IconWithArrow.java b/openide.awt/src/org/openide/awt/IconWithArrow.java --- a/openide.awt/src/org/openide/awt/IconWithArrow.java +++ b/openide.awt/src/org/openide/awt/IconWithArrow.java @@ -61,7 +61,7 @@ private static final String ARROW_IMAGE_NAME = "org/openide/awt/resources/arrow.png"; //NOI18N private Icon orig; - private Icon arrow = new ImageIcon( ImageUtilities.loadImage( ARROW_IMAGE_NAME ) ); + private Icon arrow = ImageUtilities.loadImageIcon(ARROW_IMAGE_NAME, false); private boolean paintRollOver; private static final int GAP = 6; diff --git a/openide.awt/src/org/openide/awt/JInlineMenu.java b/openide.awt/src/org/openide/awt/JInlineMenu.java --- a/openide.awt/src/org/openide/awt/JInlineMenu.java +++ b/openide.awt/src/org/openide/awt/JInlineMenu.java @@ -69,9 +69,7 @@ public class JInlineMenu extends JMenuItem implements DynamicMenuContent { /** generated Serialized Version UID */ static final long serialVersionUID = -2310488127953523571L; - private static final Icon BLANK_ICON = new ImageIcon( - ImageUtilities.loadImage("org/openide/resources/actions/empty.gif") - ); // NOI18N + private static final Icon BLANK_ICON = ImageUtilities.loadImageIcon("org/openide/resources/actions/empty.gif", false); // NOI18N // /** north separator */ // private JSeparator north = new JSeparator(); diff --git a/openide.dialogs/src/org/openide/DialogDisplayer.java b/openide.dialogs/src/org/openide/DialogDisplayer.java --- a/openide.dialogs/src/org/openide/DialogDisplayer.java +++ b/openide.dialogs/src/org/openide/DialogDisplayer.java @@ -513,18 +513,15 @@ if (msg != null && msg.trim().length() > 0) { switch (msgType) { case StandardDialog.MSG_TYPE_ERROR: - prepareMessage(dialog.notificationLine, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/dialogs/error.gif")), + prepareMessage(dialog.notificationLine, ImageUtilities.loadImageIcon("org/netbeans/modules/dialogs/error.gif", false), dialog.nbErrorForeground); break; case StandardDialog.MSG_TYPE_WARNING: - prepareMessage(dialog.notificationLine, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/dialogs/warning.gif")), + prepareMessage(dialog.notificationLine, ImageUtilities.loadImageIcon("org/netbeans/modules/dialogs/warning.gif", false), dialog.nbWarningForeground); break; case StandardDialog.MSG_TYPE_INFO: - prepareMessage(dialog.notificationLine, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/dialogs/info.png")), + prepareMessage(dialog.notificationLine, ImageUtilities.loadImageIcon("org/netbeans/modules/dialogs/info.png", false), dialog.nbInfoForeground); break; default: diff --git a/openide.dialogs/src/org/openide/WizardDescriptor.java b/openide.dialogs/src/org/openide/WizardDescriptor.java --- a/openide.dialogs/src/org/openide/WizardDescriptor.java +++ b/openide.dialogs/src/org/openide/WizardDescriptor.java @@ -2554,18 +2554,15 @@ if (msg != null && msg.trim().length() > 0) { switch (msgType) { case MSG_TYPE_ERROR: - prepareMessage(m_lblMessage, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/dialogs/error.gif")), + prepareMessage(m_lblMessage, ImageUtilities.loadImageIcon("org/netbeans/modules/dialogs/error.gif", false), nbErrorForeground); break; case MSG_TYPE_WARNING: - prepareMessage(m_lblMessage, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/dialogs/warning.gif")), + prepareMessage(m_lblMessage, ImageUtilities.loadImageIcon("org/netbeans/modules/dialogs/warning.gif", false), nbWarningForeground); break; case MSG_TYPE_INFO: - prepareMessage(m_lblMessage, - new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/dialogs/info.png")), + prepareMessage(m_lblMessage, ImageUtilities.loadImageIcon("org/netbeans/modules/dialogs/info.png", false), nbInfoForeground); break; default: diff --git a/openide.explorer/src/org/openide/explorer/propertysheet/EditorPropertyDisplayer.java b/openide.explorer/src/org/openide/explorer/propertysheet/EditorPropertyDisplayer.java --- a/openide.explorer/src/org/openide/explorer/propertysheet/EditorPropertyDisplayer.java +++ b/openide.explorer/src/org/openide/explorer/propertysheet/EditorPropertyDisplayer.java @@ -512,7 +512,7 @@ //See if there's an icon to display, either invalid state or //a property-specified icon if (env.getState() == env.STATE_INVALID) { - ic = new ImageIcon(ImageUtilities.loadImage("org/openide/resources/propertysheet/invalid.gif")); //NOI18N + ic = ImageUtilities.loadImageIcon("org/openide/resources/propertysheet/invalid.gif", false); //NOI18N } else if (getProperty().getValue("valueIcon") != null) { //NOI18N Object o = getProperty().getValue("valueIcon"); //NOI18N diff --git a/openide.explorer/src/org/openide/explorer/propertysheet/IconPanel.java b/openide.explorer/src/org/openide/explorer/propertysheet/IconPanel.java --- a/openide.explorer/src/org/openide/explorer/propertysheet/IconPanel.java +++ b/openide.explorer/src/org/openide/explorer/propertysheet/IconPanel.java @@ -200,7 +200,7 @@ FeatureDescriptor fd = env.getFeatureDescriptor(); if (env.getState() == env.STATE_INVALID) { - ic = new ImageIcon(ImageUtilities.loadImage("org/openide/resources/propertysheet/invalid.gif")); //NOI18N + ic = ImageUtilities.loadImageIcon("org/openide/resources/propertysheet/invalid.gif", false); //NOI18N } else if (fd != null) { ic = (Icon) fd.getValue("valueIcon"); //NOI18N } diff --git a/openide.explorer/src/org/openide/explorer/view/TreeTableView.java b/openide.explorer/src/org/openide/explorer/view/TreeTableView.java --- a/openide.explorer/src/org/openide/explorer/view/TreeTableView.java +++ b/openide.explorer/src/org/openide/explorer/view/TreeTableView.java @@ -1656,9 +1656,9 @@ private ImageIcon getProperIcon(boolean descending) { if (descending) { - return new ImageIcon(ImageUtilities.loadImage(SORT_DESC_ICON)); + return ImageUtilities.loadImageIcon(SORT_DESC_ICON, false); } else { - return new ImageIcon(ImageUtilities.loadImage(SORT_ASC_ICON)); + return ImageUtilities.loadImageIcon(SORT_ASC_ICON, false); } } } diff --git a/openide.explorer/src/org/openide/explorer/view/VisualizerNode.java b/openide.explorer/src/org/openide/explorer/view/VisualizerNode.java --- a/openide.explorer/src/org/openide/explorer/view/VisualizerNode.java +++ b/openide.explorer/src/org/openide/explorer/view/VisualizerNode.java @@ -620,7 +620,7 @@ /** Loads default icon if not loaded. */ private static Icon getDefaultIcon() { if (defaultIcon == null) { - defaultIcon = ImageUtilities.image2Icon(ImageUtilities.loadImage(DEFAULT_ICON)); + defaultIcon = ImageUtilities.loadImageIcon(DEFAULT_ICON, false); } return defaultIcon; } diff --git a/openide.loaders/src/org/openide/awt/DynaMenuModel.java b/openide.loaders/src/org/openide/awt/DynaMenuModel.java --- a/openide.loaders/src/org/openide/awt/DynaMenuModel.java +++ b/openide.loaders/src/org/openide/awt/DynaMenuModel.java @@ -67,8 +67,7 @@ * @author mkleint */ class DynaMenuModel { - private static final Icon BLANK_ICON = new ImageIcon( - ImageUtilities.loadImage("org/openide/loaders/empty.gif")); // NOI18N + private static final Icon BLANK_ICON = ImageUtilities.loadImageIcon("org/openide/loaders/empty.gif", false); // NOI18N private List menuItems; private HashMap actionToMenuMap; diff --git a/openide.loaders/src/org/openide/awt/Toolbar.java b/openide.loaders/src/org/openide/awt/Toolbar.java --- a/openide.loaders/src/org/openide/awt/Toolbar.java +++ b/openide.loaders/src/org/openide/awt/Toolbar.java @@ -440,7 +440,7 @@ } if (null == a.getValue(Action.SMALL_ICON) && (null == a.getValue(Action.NAME) || a.getValue(Action.NAME).toString().length() == 0)) { - a.putValue(Action.SMALL_ICON, new ImageIcon( ImageUtilities.loadImage( "org/openide/loaders/unknown.gif") )); + a.putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/openide/loaders/unknown.gif", false)); } org.openide.awt.Actions.connect(b, a); b.putClientProperty("file", file); @@ -563,7 +563,7 @@ Icon retValue = super.getIcon(); if( null == retValue && (null == getText() || getText().length() == 0 ) ) { if (unknownIcon == null) { - unknownIcon = new ImageIcon( ImageUtilities.loadImage( "org/openide/loaders/unknown.gif") ); //NOI18N + unknownIcon = ImageUtilities.loadImageIcon("org/openide/loaders/unknown.gif", false); //NOI18N } retValue = unknownIcon; } diff --git a/options.api/src/org/netbeans/modules/options/advanced/Advanced.java b/options.api/src/org/netbeans/modules/options/advanced/Advanced.java --- a/options.api/src/org/netbeans/modules/options/advanced/Advanced.java +++ b/options.api/src/org/netbeans/modules/options/advanced/Advanced.java @@ -70,10 +70,7 @@ @Override public Icon getIcon () { if (icon == null) - icon = new ImageIcon ( - ImageUtilities.loadImage - ("org/netbeans/modules/options/resources/advanced.png") - ); + icon = ImageUtilities.loadImageIcon("org/netbeans/modules/options/resources/advanced.png", false); return icon; } diff --git a/options.api/test/unit/src/org/netbeans/api/options/MyAdvancedCategory.java b/options.api/test/unit/src/org/netbeans/api/options/MyAdvancedCategory.java --- a/options.api/test/unit/src/org/netbeans/api/options/MyAdvancedCategory.java +++ b/options.api/test/unit/src/org/netbeans/api/options/MyAdvancedCategory.java @@ -51,7 +51,7 @@ @Override public Icon getIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/options/resources/advanced.png")); + return ImageUtilities.loadImageIcon("org/netbeans/modules/options/resources/advanced.png", false); } public String getCategoryName() { diff --git a/php.project/src/org/netbeans/modules/php/project/PhpProject.java b/php.project/src/org/netbeans/modules/php/project/PhpProject.java --- a/php.project/src/org/netbeans/modules/php/project/PhpProject.java +++ b/php.project/src/org/netbeans/modules/php/project/PhpProject.java @@ -92,8 +92,7 @@ public static final String USG_LOGGER_NAME = "org.netbeans.ui.metrics.php"; //NOI18N - private static final Icon PROJECT_ICON = new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/php/project/ui/resources/phpProject.png")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/php/project/ui/resources/phpProject.png", false); // NOI18N final AntProjectHelper helper; final UpdateHelper updateHelper; diff --git a/php.project/src/org/netbeans/modules/php/project/connections/ui/SortColumnHeaderRenderer.java b/php.project/src/org/netbeans/modules/php/project/connections/ui/SortColumnHeaderRenderer.java --- a/php.project/src/org/netbeans/modules/php/project/connections/ui/SortColumnHeaderRenderer.java +++ b/php.project/src/org/netbeans/modules/php/project/connections/ui/SortColumnHeaderRenderer.java @@ -111,16 +111,14 @@ private ImageIcon getSortAscIcon () { if (sortAscIcon == null) { - sortAscIcon = new ImageIcon (ImageUtilities.loadImage ( - "org/netbeans/modules/php/project/ui/resources/columnsSortedDesc.gif")); // NOI18N + sortAscIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/php/project/ui/resources/columnsSortedDesc.gif", false); // NOI18N } return sortAscIcon; } private ImageIcon getSortDescIcon () { if (sortDescIcon == null) { - sortDescIcon = new ImageIcon (ImageUtilities.loadImage ( - "org/netbeans/modules/php/project/ui/resources/columnsSortedAsc.gif")); // NOI18N + sortDescIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/php/project/ui/resources/columnsSortedAsc.gif", false); // NOI18N } return sortDescIcon; } diff --git a/php.project/src/org/netbeans/modules/php/project/ui/IncludePathUiSupport.java b/php.project/src/org/netbeans/modules/php/project/ui/IncludePathUiSupport.java --- a/php.project/src/org/netbeans/modules/php/project/ui/IncludePathUiSupport.java +++ b/php.project/src/org/netbeans/modules/php/project/ui/IncludePathUiSupport.java @@ -209,8 +209,8 @@ private static final String RESOURCE_ICON_CLASSPATH = "org/netbeans/modules/php/project/ui/resources/referencedClasspath.gif"; //NOI18N - private static final ImageIcon ICON_BROKEN_BADGE = new ImageIcon(ImageUtilities.loadImage(RESOURCE_ICON_BROKEN_BADGE)); - private static final ImageIcon ICON_CLASSPATH = new ImageIcon(ImageUtilities.loadImage(RESOURCE_ICON_CLASSPATH)); + private static final ImageIcon ICON_BROKEN_BADGE = ImageUtilities.loadImageIcon(RESOURCE_ICON_BROKEN_BADGE, false); + private static final ImageIcon ICON_CLASSPATH = ImageUtilities.loadImageIcon(RESOURCE_ICON_CLASSPATH, false); private static ImageIcon ICON_FOLDER = null; private static ImageIcon ICON_BROKEN_FOLDER = null; diff --git a/php.project/src/org/netbeans/modules/php/project/ui/logicalview/IncludePathNodeFactory.java b/php.project/src/org/netbeans/modules/php/project/ui/logicalview/IncludePathNodeFactory.java --- a/php.project/src/org/netbeans/modules/php/project/ui/logicalview/IncludePathNodeFactory.java +++ b/php.project/src/org/netbeans/modules/php/project/ui/logicalview/IncludePathNodeFactory.java @@ -95,7 +95,7 @@ private PhpProject project; private static final String RESOURCE_ICON_CLASSPATH = "org/netbeans/modules/php/project/ui/resources/referencedClasspath.gif"; //NOI18N - private static final ImageIcon ICON_CLASSPATH = new ImageIcon(ImageUtilities.loadImage(RESOURCE_ICON_CLASSPATH)); + private static final ImageIcon ICON_CLASSPATH = ImageUtilities.loadImageIcon(RESOURCE_ICON_CLASSPATH, false); public IncludePathRootNode(PhpProject project) { super(createChildren(project)); @@ -171,7 +171,7 @@ private static class IncludePathNode extends DummyNode { private static final String ICON_PATH = "org/netbeans/modules/php/project/ui/resources/libraries.gif"; //NOI18N - private static final ImageIcon ICON = new ImageIcon(ImageUtilities.loadImage(ICON_PATH)); + private static final ImageIcon ICON = ImageUtilities.loadImageIcon(ICON_PATH, false); public IncludePathNode(DataObject dobj, PhpProject project) { super(dobj.getNodeDelegate(), (dobj instanceof DataFolder) ? diff --git a/php.project/src/org/netbeans/modules/php/project/ui/options/PHPOptionsCategory.java b/php.project/src/org/netbeans/modules/php/project/ui/options/PHPOptionsCategory.java --- a/php.project/src/org/netbeans/modules/php/project/ui/options/PHPOptionsCategory.java +++ b/php.project/src/org/netbeans/modules/php/project/ui/options/PHPOptionsCategory.java @@ -56,7 +56,7 @@ @Override public Icon getIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/php/project/ui/resources/php-options-icon.png")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/php/project/ui/resources/php-options-icon.png", false); // NOI18N } @Override diff --git a/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/ui/Utils.java b/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/ui/Utils.java --- a/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/ui/Utils.java +++ b/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/ui/Utils.java @@ -53,10 +53,10 @@ //~ Static fields/initializers ----------------------------------------------------------------------------------------------- // J2EE projects - public static ImageIcon J2EEPROJECTS_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/j2ee/ui/resources/j2eeProjects.png")); // NOI18N + public static ImageIcon J2EEPROJECTS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/j2ee/ui/resources/j2eeProjects.png", false); // NOI18N // jsp - public static ImageIcon JSP_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/j2ee/ui/resources/jsp16.png")); // NOI18N + public static ImageIcon JSP_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/j2ee/ui/resources/jsp16.png", false); // NOI18N // jsp folder public static ImageIcon JSP_FOLDER_ICON = new ImageIcon(ImageUtilities.mergeImages(org.netbeans.modules.profiler.ui.Utils.PACKAGE_ICON @@ -65,14 +65,14 @@ 0, 7)); // NOI18N // tag - public static ImageIcon TAG_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/j2ee/ui/resources/tag16.png")); // NOI18N + public static ImageIcon TAG_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/j2ee/ui/resources/tag16.png", false); // NOI18N // servlet - public static ImageIcon SERVLET_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/j2ee/ui/resources/servletObject.png")); // NOI18N + public static ImageIcon SERVLET_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/j2ee/ui/resources/servletObject.png", false); // NOI18N // filter - public static ImageIcon FILTER_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/j2ee/ui/resources/servletObject.png")); // NOI18N + public static ImageIcon FILTER_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/j2ee/ui/resources/servletObject.png", false); // NOI18N // listener - public static ImageIcon LISTENER_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/j2ee/ui/resources/servletObject.png")); // NOI18N + public static ImageIcon LISTENER_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/j2ee/ui/resources/servletObject.png", false); // NOI18N } diff --git a/profiler.selector.spi/src/org/netbeans/modules/profiler/selector/spi/nodes/IconResource.java b/profiler.selector.spi/src/org/netbeans/modules/profiler/selector/spi/nodes/IconResource.java --- a/profiler.selector.spi/src/org/netbeans/modules/profiler/selector/spi/nodes/IconResource.java +++ b/profiler.selector.spi/src/org/netbeans/modules/profiler/selector/spi/nodes/IconResource.java @@ -50,36 +50,36 @@ */ public class IconResource { // package - public static ImageIcon PACKAGE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/package.png")); // NOI18N + public static ImageIcon PACKAGE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/package.png", false); // NOI18N // libraries - public static ImageIcon LIBRARIES_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/libraries.png")); // NOI18N + public static ImageIcon LIBRARIES_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/libraries.png", false); // NOI18N // class - public static ImageIcon CLASS_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/class.png")); // NOI18N + public static ImageIcon CLASS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/class.png", false); // NOI18N // interface - public static ImageIcon INTERFACE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/interface.png")); // NOI18N + public static ImageIcon INTERFACE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/interface.png", false); // NOI18N // initializer - public static ImageIcon INITIALIZER_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/initializer.png")); // NOI18N - public static ImageIcon INITIALIZER_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/initializerSt.png")); // NOI18N + public static ImageIcon INITIALIZER_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/initializer.png", false); // NOI18N + public static ImageIcon INITIALIZER_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/initializerSt.png", false); // NOI18N // constructor - public static ImageIcon CONSTRUCTORS_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructors.png")); // NOI18N - public static ImageIcon CONSTRUCTOR_PUBLIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructorPublic.png")); // NOI18N - public static ImageIcon CONSTRUCTOR_PROTECTED_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructorProtected.png")); // NOI18N - public static ImageIcon CONSTRUCTOR_PRIVATE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructorPrivate.png")); // NOI18N - public static ImageIcon CONSTRUCTOR_PACKAGE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructorPackage.png")); // NOI18N + public static ImageIcon CONSTRUCTORS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructors.png", false); // NOI18N + public static ImageIcon CONSTRUCTOR_PUBLIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructorPublic.png", false); // NOI18N + public static ImageIcon CONSTRUCTOR_PROTECTED_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructorProtected.png", false); // NOI18N + public static ImageIcon CONSTRUCTOR_PRIVATE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructorPrivate.png", false); // NOI18N + public static ImageIcon CONSTRUCTOR_PACKAGE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/constructorPackage.png", false); // NOI18N // method - public static ImageIcon METHODS_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methods.png")); // NOI18N - public static ImageIcon METHOD_PUBLIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodPublic.png")); // NOI18N - public static ImageIcon METHOD_PROTECTED_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodProtected.png")); // NOI18N - public static ImageIcon METHOD_PRIVATE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodPrivate.png")); // NOI18N - public static ImageIcon METHOD_PACKAGE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodPackage.png")); // NOI18N - public static ImageIcon METHOD_PUBLIC_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodStPublic.png")); // NOI18N - public static ImageIcon METHOD_PROTECTED_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodStProtected.png")); // NOI18N - public static ImageIcon METHOD_PRIVATE_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodStPrivate.png")); // NOI18N - public static ImageIcon METHOD_PACKAGE_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodStPackage.png")); // NOI18N + public static ImageIcon METHODS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methods.png", false); // NOI18N + public static ImageIcon METHOD_PUBLIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodPublic.png", false); // NOI18N + public static ImageIcon METHOD_PROTECTED_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodProtected.png", false); // NOI18N + public static ImageIcon METHOD_PRIVATE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodPrivate.png", false); // NOI18N + public static ImageIcon METHOD_PACKAGE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodPackage.png", false); // NOI18N + public static ImageIcon METHOD_PUBLIC_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodStPublic.png", false); // NOI18N + public static ImageIcon METHOD_PROTECTED_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodStProtected.png", false); // NOI18N + public static ImageIcon METHOD_PRIVATE_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodStPrivate.png", false); // NOI18N + public static ImageIcon METHOD_PACKAGE_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/selector/spi/nodes/resources/methodStPackage.png", false); // NOI18N } diff --git a/profiler/src/org/netbeans/modules/profiler/CPUSnapshotPanel.java b/profiler/src/org/netbeans/modules/profiler/CPUSnapshotPanel.java --- a/profiler/src/org/netbeans/modules/profiler/CPUSnapshotPanel.java +++ b/profiler/src/org/netbeans/modules/profiler/CPUSnapshotPanel.java @@ -311,22 +311,14 @@ private static final ImageIcon CLASSES_ICON = Utils.CLASS_ICON; private static final ImageIcon METHODS_ICON = Utils.METHODS_ICON; private static final ImageIcon PACKAGES_ICON = Utils.PACKAGE_ICON; - private static final ImageIcon CALL_TREE_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/callTreeTab.png") // NOI18N - ); - private static final ImageIcon HOTSPOTS_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/hotspotsTab.png") // NOI18N - ); - private static final ImageIcon COMBINED_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/combinedTab.png") // NOI18N - ); - private static final ImageIcon INFO_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/infoTab.png") // NOI18N - ); - private static final ImageIcon BACK_TRACES_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/backTracesTab.png") // NOI18N - ); - private static final ImageIcon SUBTREE_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/subtree.png") // NOI18N - ); - private static final ImageIcon SLAVE_DOWN_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/slaveDown.png") // NOI18N - ); - private static final ImageIcon SLAVE_UP_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/slaveUp.png") // NOI18N - ); + private static final ImageIcon CALL_TREE_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/callTreeTab.png", false); + private static final ImageIcon HOTSPOTS_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/hotspotsTab.png", false); + private static final ImageIcon COMBINED_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/combinedTab.png", false); + private static final ImageIcon INFO_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/infoTab.png", false); + private static final ImageIcon BACK_TRACES_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/backTracesTab.png", false); + private static final ImageIcon SUBTREE_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/subtree.png", false); + private static final ImageIcon SLAVE_DOWN_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/slaveDown.png", false); + private static final ImageIcon SLAVE_UP_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/slaveUp.png", false); private static final double SPLIT_HALF = 0.5d; //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/ExportSnapshotAction.java b/profiler/src/org/netbeans/modules/profiler/ExportSnapshotAction.java --- a/profiler/src/org/netbeans/modules/profiler/ExportSnapshotAction.java +++ b/profiler/src/org/netbeans/modules/profiler/ExportSnapshotAction.java @@ -57,7 +57,7 @@ private static final String EXPORT_SNAPSHOT_ACTION_DESCR = NbBundle.getMessage(ExportSnapshotAction.class, "ExportSnapshotAction_ExportSnapshotActionDescr"); //NOI18N // ----- - private static final ImageIcon ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/export.png")); // NOI18N + private static final ImageIcon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/export.png", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/LiveResultsWindow.java b/profiler/src/org/netbeans/modules/profiler/LiveResultsWindow.java --- a/profiler/src/org/netbeans/modules/profiler/LiveResultsWindow.java +++ b/profiler/src/org/netbeans/modules/profiler/LiveResultsWindow.java @@ -282,10 +282,10 @@ private static final class GraphTab extends JPanel implements ActionListener, ChartActionListener { //~ Static fields/initializers ------------------------------------------------------------------------------------------- - private static final ImageIcon zoomInIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/zoomIn.png")); //NOI18N - private static final ImageIcon zoomOutIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/zoomOut.png")); //NOI18N - private static final ImageIcon zoomIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/zoom.png")); //NOI18N - private static final ImageIcon scaleToFitIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/scaleToFit.png")); //NOI18N + private static final ImageIcon zoomInIcon = ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/zoomIn.png", false); //NOI18N + private static final ImageIcon zoomOutIcon = ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/zoomOut.png", false); //NOI18N + private static final ImageIcon zoomIcon = ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/zoom.png", false); //NOI18N + private static final ImageIcon scaleToFitIcon = ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/scaleToFit.png", false); //NOI18N //~ Instance fields ------------------------------------------------------------------------------------------------------ @@ -560,8 +560,7 @@ final JLabel noResultsLabel = new JLabel(NO_PROFILING_RESULTS_LABEL_TEXT); noResultsLabel.setFont(noResultsLabel.getFont().deriveFont(14)); - noResultsLabel.setIcon(new javax.swing.ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ui/resources/monitoring.png")) //NOI18N - ); + noResultsLabel.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ui/resources/monitoring.png", false)); noResultsLabel.setIconTextGap(10); noResultsLabel.setEnabled(false); noResultsPanel.add(noResultsLabel, BorderLayout.NORTH); @@ -980,8 +979,7 @@ toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); //NOI18N toolBar.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); - autoToggle = new JToggleButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/autoRefresh.png") // NOI18N - )); + autoToggle = new JToggleButton(ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/autoRefresh.png", false)); autoToggle.setSelected(true); autoToggle.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { @@ -991,8 +989,7 @@ autoToggle.setToolTipText(UPDATE_RESULTS_AUTOMATICALLY_TOOLTIP); autoToggle.getAccessibleContext().setAccessibleName(UPDATE_RESULTS_AUTOMATICALLY_TOOLTIP); - updateNowButton = new JButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/updateNow.png") // NOI18N - )); + updateNowButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/updateNow.png", false)); updateNowButton.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { requestProfilingDataUpdate(true); @@ -1001,8 +998,7 @@ updateNowButton.setToolTipText(UPDATE_RESULTS_NOW_TOOLTIP); updateNowButton.getAccessibleContext().setAccessibleName(UPDATE_RESULTS_NOW_TOOLTIP); - runGCButton = new JButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/runGC.png") // NOI18N - )); + runGCButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/runGC.png", false)); runGCButton.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { try { diff --git a/profiler/src/org/netbeans/modules/profiler/MemoryDiffPanel.java b/profiler/src/org/netbeans/modules/profiler/MemoryDiffPanel.java --- a/profiler/src/org/netbeans/modules/profiler/MemoryDiffPanel.java +++ b/profiler/src/org/netbeans/modules/profiler/MemoryDiffPanel.java @@ -114,12 +114,9 @@ private static final String FIND_ACTION_TOOLTIP = NbBundle.getMessage(MemoryDiffPanel.class, "MemorySnapshotPanel_FindActionTooltip"); // NOI18N // ----- - private static final ImageIcon MEMORY_RESULTS_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/memoryResultsTab.png") // NOI18N - ); - private static final ImageIcon INFO_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/infoTab.png") // NOI18N - ); - private static final ImageIcon STACK_TRACES_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/stackTracesTab.png") // NOI18N - ); + private static final ImageIcon MEMORY_RESULTS_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/memoryResultsTab.png", false); + private static final ImageIcon INFO_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/infoTab.png", false); + private static final ImageIcon STACK_TRACES_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/stackTracesTab.png", false); //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/MemorySnapshotPanel.java b/profiler/src/org/netbeans/modules/profiler/MemorySnapshotPanel.java --- a/profiler/src/org/netbeans/modules/profiler/MemorySnapshotPanel.java +++ b/profiler/src/org/netbeans/modules/profiler/MemorySnapshotPanel.java @@ -122,12 +122,9 @@ private static final String FIND_ACTION_TOOLTIP = NbBundle.getMessage(MemorySnapshotPanel.class, "MemorySnapshotPanel_FindActionTooltip"); // NOI18N // ----- - private static final ImageIcon MEMORY_RESULTS_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/memoryResultsTab.png") // NOI18N - ); - private static final ImageIcon INFO_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/infoTab.png") // NOI18N - ); - private static final ImageIcon STACK_TRACES_TAB_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/stackTracesTab.png") // NOI18N - ); + private static final ImageIcon MEMORY_RESULTS_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/memoryResultsTab.png", false); + private static final ImageIcon INFO_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/infoTab.png", false); + private static final ImageIcon STACK_TRACES_TAB_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/stackTracesTab.png", false); //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/ProfilerControlPanel2.java b/profiler/src/org/netbeans/modules/profiler/ProfilerControlPanel2.java --- a/profiler/src/org/netbeans/modules/profiler/ProfilerControlPanel2.java +++ b/profiler/src/org/netbeans/modules/profiler/ProfilerControlPanel2.java @@ -587,18 +587,12 @@ private static final int CPU = 1; private static final int MEMORY = 2; private static final int FRAGMENT = 3; - private static final ImageIcon TAKE_SNAPSHOT_CPU_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/takeSnapshotCPU.png") // NOI18N - ); - private static final ImageIcon TAKE_SNAPSHOT_MEMORY_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/takeSnapshotMem.png") // NOI18N - ); - private static final ImageIcon TAKE_SNAPSHOT_FRAGMENT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/takeSnapshotFragment.png") // NOI18N - ); - private static final ImageIcon LIVE_RESULTS_CPU_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/liveResultsCPUView.png") // NOI18N - ); - private static final ImageIcon LIVE_RESULTS_MEMORY_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/liveResultsMemView.png") // NOI18N - ); - private static final ImageIcon LIVE_RESULTS_FRAGMENT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/liveResultsFragmentView.png") // NOI18N - ); + private static final ImageIcon TAKE_SNAPSHOT_CPU_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/takeSnapshotCPU.png", false); + private static final ImageIcon TAKE_SNAPSHOT_MEMORY_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/takeSnapshotMem.png", false); + private static final ImageIcon TAKE_SNAPSHOT_FRAGMENT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/takeSnapshotFragment.png", false); + private static final ImageIcon LIVE_RESULTS_CPU_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/liveResultsCPUView.png", false); + private static final ImageIcon LIVE_RESULTS_MEMORY_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/liveResultsMemView.png", false); + private static final ImageIcon LIVE_RESULTS_FRAGMENT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/liveResultsFragmentView.png", false); //~ Instance fields ------------------------------------------------------------------------------------------------------ @@ -1568,9 +1562,7 @@ Color.LIGHT_GRAY), new FlatToolBar.FlatMarginBorder()); - vmTelemetryButton = new JButton(TELEMETRY_BUTTON_NAME, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/vmTelemetryView.png") // NOI18N - )); + vmTelemetryButton = new JButton(TELEMETRY_BUTTON_NAME, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/vmTelemetryView.png", false)); UIUtils.fixButtonUI(vmTelemetryButton); vmTelemetryButton.addActionListener(this); vmTelemetryButton.setContentAreaFilled(false); @@ -1581,9 +1573,7 @@ vmTelemetryButton.setBorder(myRolloverBorder); vmTelemetryButton.setToolTipText(TELEMETRY_BUTTON_TOOLTIP); - threadsButton = new JButton(THREADS_BUTTON_NAME, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/threadsView.png") // NOI18N - )); + threadsButton = new JButton(THREADS_BUTTON_NAME, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/threadsView.png", false)); UIUtils.fixButtonUI(threadsButton); threadsButton.addActionListener(this); threadsButton.setContentAreaFilled(false); @@ -1747,14 +1737,10 @@ private static final HelpCtx HELP_CTX = new HelpCtx(HELP_CTX_KEY); private static ProfilerControlPanel2 defaultInstance; private static final Image windowIcon = ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/controlPanelWindow.gif"); // NOI18N - private static final ImageIcon cpuIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/cpuSmall.png") // NOI18N - ); // NOI18N - private static final ImageIcon fragmentIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/fragmentSmall.png") // NOI18N - ); // NOI18N - private static final ImageIcon memoryIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/memorySmall.png") // NOI18N - ); // NOI18N - private static final ImageIcon emptyIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/empty16.gif") // NOI18N - ); // NOI18N + private static final ImageIcon cpuIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/cpuSmall.png", false); // NOI18N + private static final ImageIcon fragmentIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/fragmentSmall.png", false); // NOI18N + private static final ImageIcon memoryIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/memorySmall.png", false); // NOI18N + private static final ImageIcon emptyIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/empty16.gif", false); // NOI18N private static final String ID = "profiler_cp"; // NOI18N // for winsys persistence private static final Integer EXTERNALIZABLE_VERSION_WITH_SNAPSHOTS = new Integer(3); diff --git a/profiler/src/org/netbeans/modules/profiler/SaveSnapshotAction.java b/profiler/src/org/netbeans/modules/profiler/SaveSnapshotAction.java --- a/profiler/src/org/netbeans/modules/profiler/SaveSnapshotAction.java +++ b/profiler/src/org/netbeans/modules/profiler/SaveSnapshotAction.java @@ -55,7 +55,7 @@ private static final String ACTION_NAME = NbBundle.getMessage(SaveSnapshotAction.class, "SaveSnapshotAction_ActionName"); // NOI18N private static final String ACTION_DESCR = NbBundle.getMessage(SaveSnapshotAction.class, "SaveSnapshotAction_ActionDescr"); // NOI18N // ----- - private static final ImageIcon ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/save.png")); // NOI18N + private static final ImageIcon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/save.png", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/SaveViewAction.java b/profiler/src/org/netbeans/modules/profiler/SaveViewAction.java --- a/profiler/src/org/netbeans/modules/profiler/SaveViewAction.java +++ b/profiler/src/org/netbeans/modules/profiler/SaveViewAction.java @@ -133,7 +133,7 @@ "SaveViewAction_SaveDialogVisible"); //NOI18N private static final String OOME_SAVING_MSG = NbBundle.getMessage(ExportSnapshotAction.class, "SaveViewAction_OomeSavingMsg"); //NOI18N // ----- - private static final ImageIcon ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/saveView.png")); // NOI18N + private static final ImageIcon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/saveView.png", false); // NOI18N private static File exportDir; //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/TelemetryWindow.java b/profiler/src/org/netbeans/modules/profiler/TelemetryWindow.java --- a/profiler/src/org/netbeans/modules/profiler/TelemetryWindow.java +++ b/profiler/src/org/netbeans/modules/profiler/TelemetryWindow.java @@ -79,10 +79,10 @@ SaveViewAction.ViewProvider { //~ Static fields/initializers ------------------------------------------------------------------------------------------- - private static final ImageIcon zoomInIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/zoomIn.png")); //NOI18N - private static final ImageIcon zoomOutIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/zoomOut.png")); //NOI18N - private static final ImageIcon zoomIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/zoom.png")); //NOI18N - private static final ImageIcon scaleToFitIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/scaleToFit.png")); //NOI18N + private static final ImageIcon zoomInIcon = ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/zoomIn.png", false); //NOI18N + private static final ImageIcon zoomOutIcon = ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/zoomOut.png", false); //NOI18N + private static final ImageIcon zoomIcon = ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/zoom.png", false); //NOI18N + private static final ImageIcon scaleToFitIcon = ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/scaleToFit.png", false); //NOI18N //~ Instance fields ------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/actions/AntActions.java b/profiler/src/org/netbeans/modules/profiler/actions/AntActions.java --- a/profiler/src/org/netbeans/modules/profiler/actions/AntActions.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/AntActions.java @@ -147,9 +147,7 @@ a.putValue("iconBase", // NOI18N "org/netbeans/modules/profiler/actions/resources/profile.png" // NOI18N ); - a.putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/profile.png")) //NOI18N - ); + a.putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/profile.png", false)); return a; } diff --git a/profiler/src/org/netbeans/modules/profiler/actions/AttachAction.java b/profiler/src/org/netbeans/modules/profiler/actions/AttachAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/AttachAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/AttachAction.java @@ -67,9 +67,7 @@ putValue("iconBase", // NOI18N "org/netbeans/modules/profiler/actions/resources/attach.png" // NOI18N ); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/attach.png")) //NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/attach.png", false)); } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/actions/CompareSnapshotsAction.java b/profiler/src/org/netbeans/modules/profiler/actions/CompareSnapshotsAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/CompareSnapshotsAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/CompareSnapshotsAction.java @@ -782,9 +782,9 @@ private static final String SNAPSHOTS_LIST_ACCESS_DESCR = NbBundle.getMessage(CompareSnapshotsAction.class, "CompareSnapshotsAction_SnapshotsListAccessDescr"); // NOI18N // ----- - private static final ImageIcon cpuIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/cpuSmall.png")); // NOI18N - private static final ImageIcon fragmentIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/fragmentSmall.png")); // NOI18N - private static final ImageIcon memoryIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/memorySmall.png")); // NOI18N + private static final ImageIcon cpuIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/cpuSmall.png", false); // NOI18N + private static final ImageIcon fragmentIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/fragmentSmall.png", false); // NOI18N + private static final ImageIcon memoryIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/memorySmall.png", false); // NOI18N private static JFileChooser snapshotFileChooser; //~ Instance fields ---------------------------------------------------------------------------------------------------------- @@ -799,8 +799,7 @@ snapshot = null; putValue(Action.NAME, ACTION_NAME); putValue(Action.SHORT_DESCRIPTION, ACTION_DESCR); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/compareSnapshots.png"))); // NOI18N + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/compareSnapshots.png", false)); // NOI18N } public CompareSnapshotsAction(LoadedSnapshot snapshot) { diff --git a/profiler/src/org/netbeans/modules/profiler/actions/ControlPanelAction.java b/profiler/src/org/netbeans/modules/profiler/actions/ControlPanelAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/ControlPanelAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/ControlPanelAction.java @@ -64,9 +64,7 @@ public ControlPanelAction() { putValue(Action.NAME, NAME_STRING); putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_STRING); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/controlPanel.gif")) //NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/controlPanel.gif", false)); } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/actions/FindNextAction.java b/profiler/src/org/netbeans/modules/profiler/actions/FindNextAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/FindNextAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/FindNextAction.java @@ -72,9 +72,7 @@ this.findPerformer = findPerformer; putValue(Action.NAME, ACTION_NAME); putValue(Action.SHORT_DESCRIPTION, ACTION_DESCR); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/find_next.png")) //NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/find_next.png", false)); } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/actions/FindPreviousAction.java b/profiler/src/org/netbeans/modules/profiler/actions/FindPreviousAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/FindPreviousAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/FindPreviousAction.java @@ -72,9 +72,7 @@ this.findPerformer = findPerformer; putValue(Action.NAME, ACTION_NAME); putValue(Action.SHORT_DESCRIPTION, ACTION_DESCR); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/find_previous.png")) //NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/find_previous.png", false)); } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/actions/LoadSnapshotAction.java b/profiler/src/org/netbeans/modules/profiler/actions/LoadSnapshotAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/LoadSnapshotAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/LoadSnapshotAction.java @@ -89,9 +89,7 @@ public LoadSnapshotAction() { putValue(Action.NAME, ACTION_NAME); putValue(Action.SHORT_DESCRIPTION, ACTION_DESCR); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/openSnapshot.png")) //NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/openSnapshot.png", false)); } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/actions/ResetResultsAction.java b/profiler/src/org/netbeans/modules/profiler/actions/ResetResultsAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/ResetResultsAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/ResetResultsAction.java @@ -67,9 +67,7 @@ )); putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(ResetResultsAction.class, "HINT_ResetResultsAction" // NOI18N )); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/resetResults.png")) //NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/resetResults.png", false)); putValue("iconBase", // NOI18N "org/netbeans/modules/profiler/actions/resources/resetResults.png" // NOI18N ); diff --git a/profiler/src/org/netbeans/modules/profiler/actions/SelfSamplerAction.java b/profiler/src/org/netbeans/modules/profiler/actions/SelfSamplerAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/SelfSamplerAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/SelfSamplerAction.java @@ -86,9 +86,9 @@ putValue(Action.NAME, ACTION_NAME_START); putValue(Action.SHORT_DESCRIPTION, ACTION_DESCR); putValue(Action.SMALL_ICON, - ImageUtilities.image2Icon( - ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/openSnapshot.png") //NOI18N - ) + ImageUtilities.loadImageIcon( + "org/netbeans/modules/profiler/actions/resources/openSnapshot.png" //NOI18N + , false) ); builder.setIgnoredThreads(Collections.singleton(THREAD_NAME)); @@ -107,9 +107,9 @@ if (isRunning.compareAndSet(false, true)) { putValue(Action.NAME, ACTION_NAME_STOP); putValue(Action.SMALL_ICON, - ImageUtilities.image2Icon( - ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/modifyProfiling.png") //NOI18N - ) + ImageUtilities.loadImageIcon( + "org/netbeans/modules/profiler/actions/resources/modifyProfiling.png" //NOI18N + , false) ); executor = Executors.newSingleThreadScheduledExecutor(threadFactory); startTime = System.currentTimeMillis(); @@ -122,9 +122,9 @@ } else if (isRunning.compareAndSet(true, false)) { putValue(Action.NAME, ACTION_NAME_START); putValue(Action.SMALL_ICON, - ImageUtilities.image2Icon( - ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/openSnapshot.png") //NOI18N - ) + ImageUtilities.loadImageIcon( + "org/netbeans/modules/profiler/actions/resources/openSnapshot.png" //NOI18N + , false) ); try { executor.shutdown(); diff --git a/profiler/src/org/netbeans/modules/profiler/actions/ShowLiveResultsWindowAction.java b/profiler/src/org/netbeans/modules/profiler/actions/ShowLiveResultsWindowAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/ShowLiveResultsWindowAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/ShowLiveResultsWindowAction.java @@ -66,9 +66,7 @@ public ShowLiveResultsWindowAction() { putValue(Action.NAME, NAME_STRING); putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_STRING); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/liveResults.png")) // NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/liveResults.png", false)); putValue("iconBase", "org/netbeans/modules/profiler/actions/resources/liveResults.png"); // NOI18N } diff --git a/profiler/src/org/netbeans/modules/profiler/actions/ShowTelemetryViewAction.java b/profiler/src/org/netbeans/modules/profiler/actions/ShowTelemetryViewAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/ShowTelemetryViewAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/ShowTelemetryViewAction.java @@ -65,9 +65,7 @@ public ShowTelemetryViewAction() { putValue(Action.NAME, NAME_STRING); putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_STRING); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/telemetryWindow.png")) // NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/telemetryWindow.png", false)); putValue("iconBase", "org/netbeans/modules/profiler/resources/telemetryWindow.png"); // NOI18N } diff --git a/profiler/src/org/netbeans/modules/profiler/actions/ShowThreadsViewAction.java b/profiler/src/org/netbeans/modules/profiler/actions/ShowThreadsViewAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/ShowThreadsViewAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/ShowThreadsViewAction.java @@ -68,9 +68,7 @@ public ShowThreadsViewAction() { putValue(Action.NAME, ACTION_NAME); putValue(Action.SHORT_DESCRIPTION, ACTION_DESCR); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/threadsWindow.png")) // NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/threadsWindow.png", false)); putValue("iconBase", "org/netbeans/modules/profiler/resources/threadsWindow.png"); // NOI18N } diff --git a/profiler/src/org/netbeans/modules/profiler/actions/StopAction.java b/profiler/src/org/netbeans/modules/profiler/actions/StopAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/StopAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/StopAction.java @@ -158,9 +158,7 @@ )); putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(StopAction.class, "HINT_StopAction" // NOI18N )); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/stop.png")) //NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/stop.png", false)); putValue("iconBase", // NOI18N "org/netbeans/modules/profiler/actions/resources/stop.png" // NOI18N ); @@ -169,9 +167,7 @@ )); putValue(Action.SHORT_DESCRIPTION, NbBundle.getMessage(StopAction.class, "HINT_DetachAction" // NOI18N )); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/detach.png")) //NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/detach.png", false)); putValue("iconBase", // NOI18N "org/netbeans/modules/profiler/actions/resources/detach.png" // NOI18N ); diff --git a/profiler/src/org/netbeans/modules/profiler/actions/TelemetryOverviewAction.java b/profiler/src/org/netbeans/modules/profiler/actions/TelemetryOverviewAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/TelemetryOverviewAction.java +++ b/profiler/src/org/netbeans/modules/profiler/actions/TelemetryOverviewAction.java @@ -65,9 +65,7 @@ public TelemetryOverviewAction() { putValue(Action.NAME, NAME_STRING); putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_STRING); - putValue(Action.SMALL_ICON, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/telemetryOverviewWindow.png")) // NOI18N - ); + putValue(Action.SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/telemetryOverviewWindow.png", false)); putValue("iconBase", "org/netbeans/modules/profiler/resources/telemetryOverviewWindow.png"); // NOI18N } diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ClassPresenterPanel.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ClassPresenterPanel.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ClassPresenterPanel.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ClassPresenterPanel.java @@ -97,7 +97,7 @@ private static final String TOTAL_SIZE_STRING = NbBundle.getMessage(ClassPresenterPanel.class, "ClassPresenterPanel_TotalSizeString"); // NOI18N // ----- - private static ImageIcon ICON_CLASS = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/class.png")); // NOI18N + private static ImageIcon ICON_CLASS = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/class.png", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/model/BrowserUtils.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/model/BrowserUtils.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/model/BrowserUtils.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/model/BrowserUtils.java @@ -79,13 +79,13 @@ // I18N String constants private static final String OUT_OF_MEMORY_MSG = NbBundle.getMessage(BrowserUtils.class, "BrowserUtils_OutOfMemoryMsg"); // NOI18N // ----- - public static ImageIcon ICON_INSTANCE = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/instance.png")); // NOI18N - public static ImageIcon ICON_PRIMITIVE = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/primitive.png")); // NOI18N - public static ImageIcon ICON_ARRAY = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/array.png")); // NOI18N - public static ImageIcon ICON_PROGRESS = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/progress.png")); // NOI18N - public static ImageIcon ICON_STATIC = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/static.png")); // NOI18N - public static ImageIcon ICON_LOOP = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/loop.png")); // NOI18N - public static ImageIcon ICON_GCROOT = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/gcRoot.png")); // NOI18N + public static ImageIcon ICON_INSTANCE = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/instance.png", false); // NOI18N + public static ImageIcon ICON_PRIMITIVE = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/primitive.png", false); // NOI18N + public static ImageIcon ICON_ARRAY = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/array.png", false); // NOI18N + public static ImageIcon ICON_PROGRESS = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/progress.png", false); // NOI18N + public static ImageIcon ICON_STATIC = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/static.png", false); // NOI18N + public static ImageIcon ICON_LOOP = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/loop.png", false); // NOI18N + public static ImageIcon ICON_GCROOT = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/gcRoot.png", false); // NOI18N private static RequestProcessor requestProcessor = new RequestProcessor("HeapWalker Processor", 3); // NOI18N //~ Methods ------------------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/AnalysisControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/AnalysisControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/AnalysisControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/AnalysisControllerUI.java @@ -132,7 +132,7 @@ private static class Presenter extends JToggleButton { //~ Static fields/initializers ------------------------------------------------------------------------------------------- - private static ImageIcon ICON_INFO = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/memoryLint.png")); // NOI18N + private static ImageIcon ICON_INFO = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/memoryLint.png", false); // NOI18N //~ Constructors --------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ClassesControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ClassesControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ClassesControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ClassesControllerUI.java @@ -70,7 +70,7 @@ private static class Presenter extends JToggleButton { //~ Static fields/initializers ------------------------------------------------------------------------------------------- - private static ImageIcon ICON_CLASS = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/class.png")); // NOI18N + private static ImageIcon ICON_CLASS = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/class.png", false); // NOI18N //~ Constructors --------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ClassesListControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ClassesListControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ClassesListControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ClassesListControllerUI.java @@ -256,7 +256,7 @@ private static final String CLASSES_TABLE_ACCESS_DESCR = NbBundle.getMessage(ClassesListControllerUI.class, "ClassesListControllerUI_ClassesTableAccessDescr"); // NOI18N // ----- - private static ImageIcon ICON_CLASSES = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/classes.png")); // NOI18N + private static ImageIcon ICON_CLASSES = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/classes.png", false); // NOI18N private static String filterValue = ""; // NOI18N private static int filterType = CommonConstants.FILTER_CONTAINS; @@ -487,7 +487,7 @@ } private JButton createHeaderPopupCornerButton(final JPopupMenu headerPopup) { - final JButton cornerButton = new JButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/hideColumn.png"))); // NOI18N + final JButton cornerButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/hideColumn.png", false)); // NOI18N cornerButton.setToolTipText(SHOW_HIDE_COLUMNS_STRING); cornerButton.setDefaultCapable(false); diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/FieldsBrowserControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/FieldsBrowserControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/FieldsBrowserControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/FieldsBrowserControllerUI.java @@ -247,7 +247,7 @@ private static final String VALUE_COLUMN_DESCR = NbBundle.getMessage(FieldsBrowserControllerUI.class, "FieldsBrowserControllerUI_ValueColumnDescr"); // NOI18N // ----- - private static ImageIcon ICON_FIELDS = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/data.png")); // NOI18N + private static ImageIcon ICON_FIELDS = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/data.png", false); // NOI18N // --- UI definition --------------------------------------------------------- private static final String DATA = "Data"; // NOI18N @@ -398,7 +398,7 @@ } private JButton createHeaderPopupCornerButton(final JPopupMenu headerPopup) { - final JButton cornerButton = new JButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/hideColumn.png"))); // NOI18N + final JButton cornerButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/hideColumn.png", false)); // NOI18N cornerButton.setToolTipText(SHOW_HIDE_COLUMNS_STRING); cornerButton.setDefaultCapable(false); diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/HeapFragmentWalkerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/HeapFragmentWalkerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/HeapFragmentWalkerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/HeapFragmentWalkerUI.java @@ -81,8 +81,8 @@ // ----- // --- UI definition --------------------------------------------------------- - private static ImageIcon ICON_BACK = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/back.png")); // NOI18N - private static ImageIcon ICON_FORWARD = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/forward.png")); // NOI18N + private static ImageIcon ICON_BACK = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/back.png", false); // NOI18N + private static ImageIcon ICON_FORWARD = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/forward.png", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/InstancesControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/InstancesControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/InstancesControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/InstancesControllerUI.java @@ -74,7 +74,7 @@ private static class Presenter extends JToggleButton { //~ Static fields/initializers ------------------------------------------------------------------------------------------- - private static ImageIcon ICON_INSTANCE = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/instance.png")); // NOI18N + private static ImageIcon ICON_INSTANCE = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/instance.png", false); // NOI18N //~ Constructors --------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/InstancesListControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/InstancesListControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/InstancesListControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/InstancesListControllerUI.java @@ -221,7 +221,7 @@ private static final String REACHABLE_SIZE_COLUMN_DESCR = NbBundle.getMessage(InstancesListControllerUI.class, "InstancesListControllerUI_ReachableSizeColumnDescr"); // NOI18N // ----- - private static ImageIcon ICON_INSTANCES = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/instances.png")); // NOI18N + private static ImageIcon ICON_INSTANCES = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/instances.png", false); // NOI18N private static final int columnCount = 2; // TODO: restore back to 4 once retained & reachable size implemented //~ Instance fields ---------------------------------------------------------------------------------------------------------- @@ -397,7 +397,7 @@ } private JButton createHeaderPopupCornerButton(final JPopupMenu headerPopup) { - final JButton cornerButton = new JButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/hideColumn.png"))); // NOI18N + final JButton cornerButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/hideColumn.png", false)); // NOI18N cornerButton.setToolTipText(SHOW_HIDE_COLUMNS_STRING); cornerButton.setDefaultCapable(false); diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/OQLControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/OQLControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/OQLControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/OQLControllerUI.java @@ -87,7 +87,7 @@ private static class Presenter extends JToggleButton { //~ Static fields/initializers ------------------------------------------------------------------------------------------- - private static ImageIcon ICON_INFO = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/oql.png")); // NOI18N + private static ImageIcon ICON_INFO = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/oql.png", false); // NOI18N //~ Constructors --------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/OpenHeapWalkerAction.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/OpenHeapWalkerAction.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/OpenHeapWalkerAction.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/OpenHeapWalkerAction.java @@ -75,7 +75,7 @@ public OpenHeapWalkerAction() { putValue("noIconInMenu", null); // NOI18N - setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/memory.png", true))); // NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/memory.png", true)); // NOI18N } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ReferencesBrowserControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ReferencesBrowserControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ReferencesBrowserControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ReferencesBrowserControllerUI.java @@ -243,7 +243,7 @@ private static final String VALUE_COLUMN_DESCR = NbBundle.getMessage(FieldsBrowserControllerUI.class, "ReferencesBrowserControllerUI_ValueColumnDescr"); // NOI18N // ----- - private static ImageIcon ICON_FIELDS = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/heapwalk/ui/resources/incomingRef.png")); // NOI18N + private static ImageIcon ICON_FIELDS = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/heapwalk/ui/resources/incomingRef.png", false); // NOI18N // --- UI definition --------------------------------------------------------- private static final String DATA = "Data"; // NOI18N @@ -389,7 +389,7 @@ } private JButton createHeaderPopupCornerButton(final JPopupMenu headerPopup) { - final JButton cornerButton = new JButton(new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/profiler/ui/resources/hideColumn.png"))); // NOI18N + final JButton cornerButton = new JButton(ImageUtilities.loadImageIcon("org/netbeans/lib/profiler/ui/resources/hideColumn.png", false)); // NOI18N cornerButton.setToolTipText(SHOW_HIDE_COLUMNS_STRING); cornerButton.setDefaultCapable(false); diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/SummaryControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/SummaryControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/SummaryControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/SummaryControllerUI.java @@ -87,7 +87,7 @@ private static class Presenter extends JToggleButton { //~ Static fields/initializers ------------------------------------------------------------------------------------------- - private static ImageIcon ICON_INFO = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/infoTab.png")); // NOI18N + private static ImageIcon ICON_INFO = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/infoTab.png", false); // NOI18N //~ Constructors --------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ThreadsControllerUI.java b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ThreadsControllerUI.java --- a/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ThreadsControllerUI.java +++ b/profiler/src/org/netbeans/modules/profiler/heapwalk/ui/ThreadsControllerUI.java @@ -71,7 +71,7 @@ private static class Presenter extends JToggleButton { //~ Static fields/initializers ------------------------------------------------------------------------------------------- - private static ImageIcon ICON_INSTANCE = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/threadsWindow.png")); // NOI18N + private static ImageIcon ICON_INSTANCE = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/threadsWindow.png", false); // NOI18N //~ Constructors --------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/LoadGenProfilingPointFactory.java b/profiler/src/org/netbeans/modules/profiler/ppoints/LoadGenProfilingPointFactory.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/LoadGenProfilingPointFactory.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/LoadGenProfilingPointFactory.java @@ -78,7 +78,7 @@ private static final String PP_DEFAULT_NAME = NbBundle.getMessage(LoadGenProfilingPointFactory.class, "LoadGenProfilingPointFactory_PpDefaultName"); // NOI18N // ----- - private static final Icon LOADGEN_PP_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/loadgenProfilingPoint.png")); // NOI18N + private static final Icon LOADGEN_PP_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/loadgenProfilingPoint.png", false); // NOI18N private static final String LOADGEN_PP_TYPE = PP_TYPE; private static final String LOADGEN_PP_DESCR = PP_DESCR; private static final String START_LOCATION_PREFIX = "start_"; // NOI18N diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/ProfilingPointFactory.java b/profiler/src/org/netbeans/modules/profiler/ppoints/ProfilingPointFactory.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/ProfilingPointFactory.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/ProfilingPointFactory.java @@ -78,8 +78,8 @@ private static final String PROFILING_POINT_STORAGE_EXT = "pp"; // NOI18N public static final int SCOPE_CODE = 1; // Scope of the Profiling Point: Code (see CodeProfilingPoint) public static final int SCOPE_GLOBAL = 2; // Scope of the Profiling Point: Global (see GlobalProfilingPoint) - public static final Icon SCOPE_CODE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/codeProfilingPoint.png")); // NOI18N - public static final Icon SCOPE_GLOBAL_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/globalProfilingPoint.png")); // NOI18N + public static final Icon SCOPE_CODE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/codeProfilingPoint.png", false); // NOI18N + public static final Icon SCOPE_GLOBAL_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/globalProfilingPoint.png", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/ResetResultsProfilingPointFactory.java b/profiler/src/org/netbeans/modules/profiler/ppoints/ResetResultsProfilingPointFactory.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/ResetResultsProfilingPointFactory.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/ResetResultsProfilingPointFactory.java @@ -71,7 +71,7 @@ private static final String PP_DEFAULT_NAME = NbBundle.getMessage(ResetResultsProfilingPointFactory.class, "ResetResultsProfilingPointFactory_PpDefaultName"); // NOI18N // ----- - public static final Icon RESET_RESULTS_PP_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/resetResultsProfilingPoint.png")); // NOI18N + public static final Icon RESET_RESULTS_PP_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/resetResultsProfilingPoint.png", false); // NOI18N public static final String RESET_RESULTS_PP_TYPE = PP_TYPE; public static final String RESET_RESULTS_PP_DESCR = PP_DESCR; diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/StopwatchProfilingPointFactory.java b/profiler/src/org/netbeans/modules/profiler/ppoints/StopwatchProfilingPointFactory.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/StopwatchProfilingPointFactory.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/StopwatchProfilingPointFactory.java @@ -71,7 +71,7 @@ private static final String PP_DEFAULT_NAME = NbBundle.getMessage(StopwatchProfilingPointFactory.class, "StopwatchProfilingPointFactory_PpDefaultName"); // NOI18N // ----- - public static final Icon RESET_RESULTS_PP_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/stopwatchProfilingPoint.png")); + public static final Icon RESET_RESULTS_PP_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/stopwatchProfilingPoint.png", false); public static final String RESET_RESULTS_PP_TYPE = PP_TYPE; public static final String RESET_RESULTS_PP_DESCR = PP_DESCR; private static final String START_LOCATION_PREFIX = "start_"; // NOI18N diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/TakeSnapshotProfilingPointFactory.java b/profiler/src/org/netbeans/modules/profiler/ppoints/TakeSnapshotProfilingPointFactory.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/TakeSnapshotProfilingPointFactory.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/TakeSnapshotProfilingPointFactory.java @@ -71,7 +71,7 @@ private static final String PP_DEFAULT_NAME = NbBundle.getMessage(TakeSnapshotProfilingPointFactory.class, "TakeSnapshotProfilingPointFactory_PpDefaultName"); // NOI18N // ----- - public static final Icon TAKE_SNAPSHOT_PP_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/takeSnapshotProfilingPoint.png")); // NOI18N + public static final Icon TAKE_SNAPSHOT_PP_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/takeSnapshotProfilingPoint.png", false); // NOI18N public static final String TAKE_SNAPSHOT_PP_TYPE = PP_TYPE; public static final String TAKE_SNAPSHOT_PP_DESCR = PP_DESCR; diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/TimedTakeSnapshotProfilingPointFactory.java b/profiler/src/org/netbeans/modules/profiler/ppoints/TimedTakeSnapshotProfilingPointFactory.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/TimedTakeSnapshotProfilingPointFactory.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/TimedTakeSnapshotProfilingPointFactory.java @@ -70,7 +70,7 @@ private static final String PP_DEFAULT_NAME = NbBundle.getMessage(TimedTakeSnapshotProfilingPointFactory.class, "TimedTakeSnapshotProfilingPointFactory_PpDefaultName"); // NOI18N // ----- - public static final Icon TAKE_SNAPSHOT_PP_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/timedTakeSnapshotProfilingPoint.png")); // NOI18N + public static final Icon TAKE_SNAPSHOT_PP_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/timedTakeSnapshotProfilingPoint.png", false); // NOI18N public static final String TAKE_SNAPSHOT_PP_TYPE = PP_TYPE; public static final String TAKE_SNAPSHOT_PP_DESCR = PP_DESCR; diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/TriggeredTakeSnapshotProfilingPointFactory.java b/profiler/src/org/netbeans/modules/profiler/ppoints/TriggeredTakeSnapshotProfilingPointFactory.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/TriggeredTakeSnapshotProfilingPointFactory.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/TriggeredTakeSnapshotProfilingPointFactory.java @@ -70,7 +70,7 @@ private static final String PP_DEFAULT_NAME = NbBundle.getMessage(TriggeredTakeSnapshotProfilingPointFactory.class, "TriggeredTakeSnapshotProfilingPointFactory_PpDefaultName"); // NOI18N // ----- - public static final Icon TAKE_SNAPSHOT_PP_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/triggeredTakeSnapshotProfilingPoint.png")); // NOI18N + public static final Icon TAKE_SNAPSHOT_PP_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/triggeredTakeSnapshotProfilingPoint.png", false); // NOI18N public static final String TAKE_SNAPSHOT_PP_TYPE = PP_TYPE; public static final String TAKE_SNAPSHOT_PP_DESCR = PP_DESCR; diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/Utils.java b/profiler/src/org/netbeans/modules/profiler/ppoints/Utils.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/Utils.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/Utils.java @@ -337,7 +337,7 @@ private static final String PROJECT_DIRECTORY_MARK = "{$projectDirectory}"; // NOI18N // TODO: Move to more "universal" location - public static final ImageIcon EMPTY_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/empty16.gif")); // NOI18N + public static final ImageIcon EMPTY_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/empty16.gif", false); // NOI18N private static final ProjectPresenterRenderer projectRenderer = new ProjectPresenterRenderer(); private static final ProjectPresenterListRenderer projectListRenderer = new ProjectPresenterListRenderer(); private static final EnhancedTableCellRenderer scopeRenderer = new ProfilingPointScopeRenderer(); diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/ui/OpenProfilingPointsWindowAction.java b/profiler/src/org/netbeans/modules/profiler/ppoints/ui/OpenProfilingPointsWindowAction.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/ui/OpenProfilingPointsWindowAction.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/ui/OpenProfilingPointsWindowAction.java @@ -66,8 +66,7 @@ public OpenProfilingPointsWindowAction() { putValue("noIconInMenu", null); // NOI18N - setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/ppoint.png", - true))); // NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/ppoint.png", true)); // NOI18N } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/ui/ProfilingPointsWindowUI.java b/profiler/src/org/netbeans/modules/profiler/ppoints/ui/ProfilingPointsWindowUI.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/ui/ProfilingPointsWindowUI.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/ui/ProfilingPointsWindowUI.java @@ -162,10 +162,10 @@ private static final String NO_END_DEFINED_MSG = NbBundle.getMessage(ProfilingPointsWindowUI.class, "ProfilingPointsWindowUI_NoEndDefinedMsg"); // NOI18N // ----- - private static final ImageIcon PPOINT_ADD_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/ppointAdd.png")); // NOI18N - private static final ImageIcon PPOINT_REMOVE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/ppointRemove.png")); // NOI18N - private static final ImageIcon PPOINT_EDIT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/ppointEdit.png")); // NOI18N - private static final ImageIcon PPOINT_ENABLE_DISABLE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ppoints/ui/resources/ppointEnableDisable.png")); // NOI18N + private static final ImageIcon PPOINT_ADD_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/ppointAdd.png", false); // NOI18N + private static final ImageIcon PPOINT_REMOVE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/ppointRemove.png", false); // NOI18N + private static final ImageIcon PPOINT_EDIT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/ppointEdit.png", false); // NOI18N + private static final ImageIcon PPOINT_ENABLE_DISABLE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ppoints/ui/resources/ppointEnableDisable.png", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/ppoints/ui/WizardPanel1UI.java b/profiler/src/org/netbeans/modules/profiler/ppoints/ui/WizardPanel1UI.java --- a/profiler/src/org/netbeans/modules/profiler/ppoints/ui/WizardPanel1UI.java +++ b/profiler/src/org/netbeans/modules/profiler/ppoints/ui/WizardPanel1UI.java @@ -132,9 +132,9 @@ // ----- private static final String HELP_CTX_KEY = "PPointsWizardPanel1UI.HelpCtx"; // NOI18N private static final HelpCtx HELP_CTX = new HelpCtx(HELP_CTX_KEY); - private static final Icon MONITOR_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/telemetryWindow.png")); // NOI18N - private static final Icon CPU_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/cpu.png")); // NOI18N - private static final Icon MEMORY_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/memory.png")); // NOI18N + private static final Icon MONITOR_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/telemetryWindow.png", false); // NOI18N + private static final Icon CPU_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/cpu.png", false); // NOI18N + private static final Icon MEMORY_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/memory.png", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/ui/Utils.java b/profiler/src/org/netbeans/modules/profiler/ui/Utils.java --- a/profiler/src/org/netbeans/modules/profiler/ui/Utils.java +++ b/profiler/src/org/netbeans/modules/profiler/ui/Utils.java @@ -62,61 +62,61 @@ //public static ImageIcon EMPRY_ICON = new ImageIcon(Utilities.loadImage("org/netbeans/modules/profiler/resources/ide/empty.gif")); // NOI18N // error - public static ImageIcon ERROR_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/error.png")); // NOI18N + public static ImageIcon ERROR_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/error.png", false); // NOI18N // projects //public static ImageIcon PROJECTS_ICON = new ImageIcon(Utilities.loadImage("org/netbeans/modules/project/ui/resources/projectTab.png")); // NOI18N // package - public static ImageIcon PACKAGE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/package.png")); // NOI18N + public static ImageIcon PACKAGE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/package.png", false); // NOI18N //public static ImageIcon PACKAGE_PUBLIC_ICON = new ImageIcon(Utilities.loadImage("org/netbeans/spi/java/project/support/ui/packagePublic.png")); // NOI18N //public static ImageIcon PACKAGE_PRIVATE_ICON = new ImageIcon(Utilities.loadImage("org/netbeans/spi/java/project/support/ui/packagePrivate.png")); // NOI18N //public static ImageIcon PACKAGE_EMPTY_ICON = new ImageIcon(Utilities.loadImage("org/netbeans/spi/java/project/support/ui/packageEmpty.png")); // NOI18N // libraries - public static ImageIcon LIBRARIES_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/libraries.png")); // NOI18N + public static ImageIcon LIBRARIES_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/libraries.png", false); // NOI18N // class - public static ImageIcon CLASS_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/class.png")); // NOI18N + public static ImageIcon CLASS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/class.png", false); // NOI18N //public static ImageIcon CLASS_MAIN_ICON = new ImageIcon(Utilities.loadImage("org/netbeans/modules/java/resources/main-class.png")); // NOI18N // interface - public static ImageIcon INTERFACE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/interface.png")); // NOI18N + public static ImageIcon INTERFACE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/interface.png", false); // NOI18N // initializer - public static ImageIcon INITIALIZER_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/initializer.png")); // NOI18N - public static ImageIcon INITIALIZER_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/initializerSt.png")); // NOI18N + public static ImageIcon INITIALIZER_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/initializer.png", false); // NOI18N + public static ImageIcon INITIALIZER_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/initializerSt.png", false); // NOI18N // constructor - public static ImageIcon CONSTRUCTORS_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/constructors.png")); // NOI18N - public static ImageIcon CONSTRUCTOR_PUBLIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/constructorPublic.png")); // NOI18N - public static ImageIcon CONSTRUCTOR_PROTECTED_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/constructorProtected.png")); // NOI18N - public static ImageIcon CONSTRUCTOR_PRIVATE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/constructorPrivate.png")); // NOI18N - public static ImageIcon CONSTRUCTOR_PACKAGE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/constructorPackage.png")); // NOI18N + public static ImageIcon CONSTRUCTORS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/constructors.png", false); // NOI18N + public static ImageIcon CONSTRUCTOR_PUBLIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/constructorPublic.png", false); // NOI18N + public static ImageIcon CONSTRUCTOR_PROTECTED_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/constructorProtected.png", false); // NOI18N + public static ImageIcon CONSTRUCTOR_PRIVATE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/constructorPrivate.png", false); // NOI18N + public static ImageIcon CONSTRUCTOR_PACKAGE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/constructorPackage.png", false); // NOI18N // method - public static ImageIcon METHODS_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methods.png")); // NOI18N - public static ImageIcon METHOD_PUBLIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methodPublic.png")); // NOI18N - public static ImageIcon METHOD_PROTECTED_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methodProtected.png")); // NOI18N - public static ImageIcon METHOD_PRIVATE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methodPrivate.png")); // NOI18N - public static ImageIcon METHOD_PACKAGE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methodPackage.png")); // NOI18N - public static ImageIcon METHOD_PUBLIC_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methodStPublic.png")); // NOI18N - public static ImageIcon METHOD_PROTECTED_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methodStProtected.png")); // NOI18N - public static ImageIcon METHOD_PRIVATE_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methodStPrivate.png")); // NOI18N - public static ImageIcon METHOD_PACKAGE_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/methodStPackage.png")); // NOI18N + public static ImageIcon METHODS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methods.png", false); // NOI18N + public static ImageIcon METHOD_PUBLIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methodPublic.png", false); // NOI18N + public static ImageIcon METHOD_PROTECTED_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methodProtected.png", false); // NOI18N + public static ImageIcon METHOD_PRIVATE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methodPrivate.png", false); // NOI18N + public static ImageIcon METHOD_PACKAGE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methodPackage.png", false); // NOI18N + public static ImageIcon METHOD_PUBLIC_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methodStPublic.png", false); // NOI18N + public static ImageIcon METHOD_PROTECTED_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methodStProtected.png", false); // NOI18N + public static ImageIcon METHOD_PRIVATE_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methodStPrivate.png", false); // NOI18N + public static ImageIcon METHOD_PACKAGE_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/methodStPackage.png", false); // NOI18N // variable - public static ImageIcon VARIABLES_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variables.png")); // NOI18N - public static ImageIcon VARIABLE_PUBLIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variablePublic.png")); // NOI18N - public static ImageIcon VARIABLE_PROTECTED_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variableProtected.png")); // NOI18N - public static ImageIcon VARIABLE_PRIVATE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variablePrivate.png")); // NOI18N - public static ImageIcon VARIABLE_PACKAGE_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variablePackage.png")); // NOI18N - public static ImageIcon VARIABLE_PUBLIC_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variableStPublic.png")); // NOI18N - public static ImageIcon VARIABLE_PROTECTED_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variableStProtected.png")); // NOI18N - public static ImageIcon VARIABLE_PRIVATE_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variableStPrivate.png")); // NOI18N - public static ImageIcon VARIABLE_PACKAGE_STATIC_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/variableStPackage.png")); // NOI18N + public static ImageIcon VARIABLES_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variables.png", false); // NOI18N + public static ImageIcon VARIABLE_PUBLIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variablePublic.png", false); // NOI18N + public static ImageIcon VARIABLE_PROTECTED_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variableProtected.png", false); // NOI18N + public static ImageIcon VARIABLE_PRIVATE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variablePrivate.png", false); // NOI18N + public static ImageIcon VARIABLE_PACKAGE_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variablePackage.png", false); // NOI18N + public static ImageIcon VARIABLE_PUBLIC_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variableStPublic.png", false); // NOI18N + public static ImageIcon VARIABLE_PROTECTED_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variableStProtected.png", false); // NOI18N + public static ImageIcon VARIABLE_PRIVATE_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variableStPrivate.png", false); // NOI18N + public static ImageIcon VARIABLE_PACKAGE_STATIC_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/variableStPackage.png", false); // NOI18N // find - public static ImageIcon FIND_ACTION_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/ide/find.gif")); // NOI18N + public static ImageIcon FIND_ACTION_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/ide/find.gif", false); // NOI18N } diff --git a/profiler/src/org/netbeans/modules/profiler/ui/stp/NewCustomConfiguration.java b/profiler/src/org/netbeans/modules/profiler/ui/stp/NewCustomConfiguration.java --- a/profiler/src/org/netbeans/modules/profiler/ui/stp/NewCustomConfiguration.java +++ b/profiler/src/org/netbeans/modules/profiler/ui/stp/NewCustomConfiguration.java @@ -130,9 +130,9 @@ private static NewCustomConfiguration defaultInstance; // --- UI components declaration --------------------------------------------- - private static final Icon ICON_MONITOR = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/telemetryWindow.png")); // NOI18N - private static final Icon ICON_CPU = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/cpu.png")); // NOI18N - private static final Icon ICON_MEMORY = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/resources/memory.png")); // NOI18N + private static final Icon ICON_MONITOR = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/telemetryWindow.png", false); // NOI18N + private static final Icon ICON_CPU = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/cpu.png", false); // NOI18N + private static final Icon ICON_MEMORY = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/resources/memory.png", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/profiler/src/org/netbeans/modules/profiler/ui/stp/SelectProfilingTask.java b/profiler/src/org/netbeans/modules/profiler/ui/stp/SelectProfilingTask.java --- a/profiler/src/org/netbeans/modules/profiler/ui/stp/SelectProfilingTask.java +++ b/profiler/src/org/netbeans/modules/profiler/ui/stp/SelectProfilingTask.java @@ -220,11 +220,11 @@ // --- UI components declaration --------------------------------------------- private static final Image BACKGROUND_IMAGE = UIUtils.isNimbus() ? null : ImageUtilities.loadImage("org/netbeans/modules/profiler/ui/stp/resources/sptBar.png"); // NOI18N - private static final Icon MONITOR_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ui/resources/monitoring.png")); // NOI18N - private static final Icon CPU_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ui/resources/cpu.png")); // NOI18N - private static final Icon MEMORY_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/ui/resources/memory.png")); // NOI18N - private static final Icon RUN_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/runButton.gif")); // NOI18N - private static final Icon ATTACH_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/profiler/actions/resources/attachButton.gif")); // NOI18N + private static final Icon MONITOR_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ui/resources/monitoring.png", false); // NOI18N + private static final Icon CPU_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ui/resources/cpu.png", false); // NOI18N + private static final Icon MEMORY_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/ui/resources/memory.png", false); // NOI18N + private static final Icon RUN_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/runButton.gif", false); // NOI18N + private static final Icon ATTACH_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/profiler/actions/resources/attachButton.gif", false); // NOI18N //~ Instance fields ---------------------------------------------------------------------------------------------------------- diff --git a/projectapi/src/org/netbeans/api/project/ProjectUtils.java b/projectapi/src/org/netbeans/api/project/ProjectUtils.java --- a/projectapi/src/org/netbeans/api/project/ProjectUtils.java +++ b/projectapi/src/org/netbeans/api/project/ProjectUtils.java @@ -227,7 +227,7 @@ } public Icon getIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/projectapi/resources/empty.gif")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/projectapi/resources/empty.gif", false); // NOI18N } public void addPropertyChangeListener(PropertyChangeListener listener) { diff --git a/projectimport.eclipse.j2se/src/org/netbeans/modules/projectimport/eclipse/j2se/J2SEProjectFactory.java b/projectimport.eclipse.j2se/src/org/netbeans/modules/projectimport/eclipse/j2se/J2SEProjectFactory.java --- a/projectimport.eclipse.j2se/src/org/netbeans/modules/projectimport/eclipse/j2se/J2SEProjectFactory.java +++ b/projectimport.eclipse.j2se/src/org/netbeans/modules/projectimport/eclipse/j2se/J2SEProjectFactory.java @@ -73,7 +73,7 @@ public class J2SEProjectFactory implements ProjectTypeUpdater { private static final String JAVA_NATURE = "org.eclipse.jdt.core.javanature"; // NOI18N - private static final Icon J2SE_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png")); // NOI18N + private static final Icon J2SE_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png", false); // NOI18N public J2SEProjectFactory() { } diff --git a/projectimport.eclipse.web/src/org/netbeans/modules/projectimport/eclipse/web/WebProjectFactory.java b/projectimport.eclipse.web/src/org/netbeans/modules/projectimport/eclipse/web/WebProjectFactory.java --- a/projectimport.eclipse.web/src/org/netbeans/modules/projectimport/eclipse/web/WebProjectFactory.java +++ b/projectimport.eclipse.web/src/org/netbeans/modules/projectimport/eclipse/web/WebProjectFactory.java @@ -86,7 +86,7 @@ private static final Logger LOG = Logger.getLogger(WebProjectFactory.class.getName()); private static final String WEB_NATURE = "org.eclipse.wst.common.modulecore.ModuleCoreNature"; // NOI18N - private static final Icon WEB_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/web/project/ui/resources/webProjectIcon.gif")); //NOI18N + private static final Icon WEB_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/web/project/ui/resources/webProjectIcon.gif", false); //NOI18N private static final String MYECLIPSE_WEB_NATURE = "com.genuitec.eclipse.j2eedt.core.webnature"; // NOI18N diff --git a/projectui/src/org/netbeans/modules/project/ui/ExtIcon.java b/projectui/src/org/netbeans/modules/project/ui/ExtIcon.java --- a/projectui/src/org/netbeans/modules/project/ui/ExtIcon.java +++ b/projectui/src/org/netbeans/modules/project/ui/ExtIcon.java @@ -74,7 +74,7 @@ setIcon((Icon)obj); } } catch (Exception ex) { - setIcon(new ImageIcon(ImageUtilities.loadImage("org/openide/resources/actions/empty.gif"))); //NOI18N + setIcon(ImageUtilities.loadImageIcon("org/openide/resources/actions/empty.gif", false)); //NOI18N } finally { try { if (objin != null) { diff --git a/projectui/src/org/netbeans/modules/project/ui/actions/Actions.java b/projectui/src/org/netbeans/modules/project/ui/actions/Actions.java --- a/projectui/src/org/netbeans/modules/project/ui/actions/Actions.java +++ b/projectui/src/org/netbeans/modules/project/ui/actions/Actions.java @@ -163,8 +163,7 @@ public static Action testProject() { Action a = new ProjectAction ( "test", // XXX Define standard - NbBundle.getMessage(Actions.class, "LBL_TestProjectAction_Name" ), // NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/testProject.png" ) ), //NOI18N + NbBundle.getMessage(Actions.class, "LBL_TestProjectAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/testProject.png", false), //NOI18N null ); a.putValue("iconBase","org/netbeans/modules/project/ui/resources/testProject.png"); //NOI18N a.putValue("noIconInMenu", Boolean.TRUE); //NOI18N @@ -175,8 +174,7 @@ public static Action buildProject() { Action a = new ProjectAction ( ActionProvider.COMMAND_BUILD, - NbBundle.getMessage(Actions.class, "LBL_BuildProjectAction_Name" ), // NO18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/buildCurrentProject.gif" ) ), //NOI18N + NbBundle.getMessage(Actions.class, "LBL_BuildProjectAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/buildCurrentProject.gif", false), //NOI18N null ); a.putValue("iconBase","org/netbeans/modules/project/ui/resources/buildCurrentProject.gif"); //NOI18N return a; @@ -185,8 +183,7 @@ public static Action cleanProject() { Action a = new ProjectAction( ActionProvider.COMMAND_CLEAN, - NbBundle.getMessage(Actions.class, "LBL_CleanProjectAction_Name" ), // NO18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/cleanCurrentProject.gif" ) ), //NOI18N + NbBundle.getMessage(Actions.class, "LBL_CleanProjectAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/cleanCurrentProject.gif", false), //NOI18N null ); a.putValue("iconBase","org/netbeans/modules/project/ui/resources/cleanCurrentProject.gif"); //NOI18N return a; @@ -195,8 +192,7 @@ public static Action rebuildProject() { Action a = new ProjectAction( ActionProvider.COMMAND_REBUILD, - NbBundle.getMessage(Actions.class, "LBL_RebuildProjectAction_Name"), // NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/rebuildCurrentProject.gif" ) ), //NOI18N + NbBundle.getMessage(Actions.class, "LBL_RebuildProjectAction_Name"),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/rebuildCurrentProject.gif", false), //NOI18N null ); a.putValue("iconBase","org/netbeans/modules/project/ui/resources/rebuildCurrentProject.gif"); //NOI18N return a; @@ -205,8 +201,7 @@ public static Action runProject() { Action a = new ProjectAction( ActionProvider.COMMAND_RUN, - NbBundle.getMessage(Actions.class, "LBL_RunProjectAction_Name"), // NO18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/runCurrentProject.gif" ) ), //NOI18N + NbBundle.getMessage(Actions.class, "LBL_RunProjectAction_Name"),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/runCurrentProject.gif", false), //NOI18N null ); a.putValue("iconBase","org/netbeans/modules/project/ui/resources/runCurrentProject.gif"); //NOI18N return a; @@ -268,8 +263,7 @@ public static Action compileSingle() { Action a = new FileCommandAction ( "compile.single", // XXX Define standard - NbBundle.getMessage(Actions.class, "LBL_CompileSingleAction_Name" ),// NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/compileSingle.png" ) ), //NOI18N + NbBundle.getMessage(Actions.class, "LBL_CompileSingleAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/compileSingle.png", false), //NOI18N null ); //NOI18N a.putValue("iconBase","org/netbeans/modules/project/ui/resources/compileSingle.png"); //NOI18N a.putValue("noIconInMenu", Boolean.TRUE); //NOI18N @@ -279,8 +273,7 @@ public static Action runSingle() { Action a = new FileCommandAction ( "run.single", // XXX Define standard - NbBundle.getMessage(Actions.class, "LBL_RunSingleAction_Name"), // NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/runSingle.png" ) ), //NOI18N + NbBundle.getMessage(Actions.class, "LBL_RunSingleAction_Name"),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/runSingle.png", false), //NOI18N null); a.putValue("iconBase","org/netbeans/modules/project/ui/resources/runSingle.png"); //NOI18N a.putValue("noIconInMenu", Boolean.TRUE); //NOI18N @@ -290,8 +283,7 @@ public static Action testSingle() { Action a = new FileCommandAction ( "test.single", // XXX Define standard - NbBundle.getMessage(Actions.class, "LBL_TestSingleAction_Name" ),// NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/testSingle.png" ) ), //NOI18N + NbBundle.getMessage(Actions.class, "LBL_TestSingleAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/testSingle.png", false), //NOI18N null ); //NOI18N a.putValue("iconBase","org/netbeans/modules/project/ui/resources/testSingle.png"); //NOI18N a.putValue("noIconInMenu", Boolean.TRUE); //NOI18N @@ -304,8 +296,7 @@ public static Action buildMainProject() { Action a = new MainProjectAction ( ActionProvider.COMMAND_BUILD, - NbBundle.getMessage(Actions.class, "LBL_BuildMainProjectAction_Name" ), - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/buildProject.png" ) ) ); //NOI18N + NbBundle.getMessage(Actions.class, "LBL_BuildMainProjectAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/buildProject.png", false)); //NOI18N a.putValue("iconBase","org/netbeans/modules/project/ui/resources/buildProject.png"); //NOI18N return a; } @@ -313,8 +304,7 @@ public static Action cleanMainProject() { Action a = new MainProjectAction( ActionProvider.COMMAND_CLEAN, - NbBundle.getMessage(Actions.class, "LBL_CleanMainProjectAction_Name" ), - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/cleanProject.gif" ) ) ); //NOI18N + NbBundle.getMessage(Actions.class, "LBL_CleanMainProjectAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/cleanProject.gif", false)); //NOI18N a.putValue("iconBase","org/netbeans/modules/project/ui/resources/cleanProject.gif"); //NOI18N return a; } @@ -322,8 +312,7 @@ public static Action rebuildMainProject() { Action a = new MainProjectAction( ActionProvider.COMMAND_REBUILD, - NbBundle.getMessage(Actions.class, "LBL_RebuildMainProjectAction_Name"), // NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/rebuildProject.png" ) ) ); //NOI18N + NbBundle.getMessage(Actions.class, "LBL_RebuildMainProjectAction_Name"),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/rebuildProject.png", false)); //NOI18N a.putValue("iconBase","org/netbeans/modules/project/ui/resources/rebuildProject.png"); //NOI18N return a; } @@ -331,8 +320,7 @@ public static Action runMainProject() { Action a = new MainProjectAction( ActionProvider.COMMAND_RUN, - NbBundle.getMessage(Actions.class, "LBL_RunMainProjectAction_Name"), // NO18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/runProject.png" ) ) ); //NOI18N + NbBundle.getMessage(Actions.class, "LBL_RunMainProjectAction_Name"),ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/runProject.png", false)); //NOI18N a.putValue("iconBase","org/netbeans/modules/project/ui/resources/runProject.png"); //NOI18N return a; } diff --git a/projectui/src/org/netbeans/modules/project/ui/actions/BasicAction.java b/projectui/src/org/netbeans/modules/project/ui/actions/BasicAction.java --- a/projectui/src/org/netbeans/modules/project/ui/actions/BasicAction.java +++ b/projectui/src/org/netbeans/modules/project/ui/actions/BasicAction.java @@ -76,7 +76,7 @@ protected final void setSmallIcon( String iconResource ) { if ( iconResource != null ) { - putValue( SMALL_ICON, new ImageIcon( ImageUtilities.loadImage( iconResource ) ) ); + putValue( SMALL_ICON, ImageUtilities.loadImageIcon(iconResource, false)); } } diff --git a/projectui/src/org/netbeans/modules/project/ui/actions/FileCommandAction.java b/projectui/src/org/netbeans/modules/project/ui/actions/FileCommandAction.java --- a/projectui/src/org/netbeans/modules/project/ui/actions/FileCommandAction.java +++ b/projectui/src/org/netbeans/modules/project/ui/actions/FileCommandAction.java @@ -58,7 +58,7 @@ private String presenterName; public FileCommandAction( String command, String namePattern, String iconResource, Lookup lookup ) { - this( command, namePattern, new ImageIcon( ImageUtilities.loadImage( iconResource ) ), lookup ); + this( command, namePattern, ImageUtilities.loadImageIcon(iconResource, false), lookup ); } public FileCommandAction( String command, String namePattern, Icon icon, Lookup lookup ) { diff --git a/projectui/src/org/netbeans/modules/project/ui/actions/NewFile.java b/projectui/src/org/netbeans/modules/project/ui/actions/NewFile.java --- a/projectui/src/org/netbeans/modules/project/ui/actions/NewFile.java +++ b/projectui/src/org/netbeans/modules/project/ui/actions/NewFile.java @@ -79,7 +79,7 @@ */ public class NewFile extends ProjectAction implements PropertyChangeListener, Popup { - private static final Icon ICON = new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/newFile.png" ) ); //NOI18N + private static final Icon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/newFile.png", false); //NOI18N private static final String _NAME = NbBundle.getMessage( NewFile.class, "LBL_NewFileAction_Name" ); private static final String _SHORT_DESCRIPTION = NbBundle.getMessage( NewFile.class, "LBL_NewFileAction_Tooltip" ); private static final String POPUP_NAME = NbBundle.getMessage( NewFile.class, "LBL_NewFileAction_PopupName" ); diff --git a/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java b/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java --- a/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java +++ b/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java @@ -71,7 +71,7 @@ public class NewProject extends BasicAction { - private static final Icon ICON = new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/newProject.png" ) ); //NOI18N + private static final Icon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/newProject.png", false); //NOI18N private static final String NAME = NbBundle.getMessage( NewProject.class, "LBL_NewProjectAction_Name" ); // NOI18N private static final String _SHORT_DESCRIPTION = NbBundle.getMessage( NewProject.class, "LBL_NewProjectAction_Tooltip" ); // NOI18N diff --git a/projectui/src/org/netbeans/modules/project/ui/actions/OpenProject.java b/projectui/src/org/netbeans/modules/project/ui/actions/OpenProject.java --- a/projectui/src/org/netbeans/modules/project/ui/actions/OpenProject.java +++ b/projectui/src/org/netbeans/modules/project/ui/actions/OpenProject.java @@ -71,7 +71,7 @@ /** Creates a new instance of BrowserAction */ public OpenProject() { - super( DISPLAY_NAME, new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/openProject.png" ) ) ); + super( DISPLAY_NAME, ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/openProject.png", false)); putValue("iconBase","org/netbeans/modules/project/ui/resources/openProject.png"); //NOI18N putValue(SHORT_DESCRIPTION, _SHORT_DESCRIPTION); } diff --git a/projectui/src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java b/projectui/src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java --- a/projectui/src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java +++ b/projectui/src/org/netbeans/modules/project/ui/actions/SelectNodeAction.java @@ -63,8 +63,8 @@ public class SelectNodeAction extends LookupSensitiveAction implements Presenter.Menu, Presenter.Popup { // XXX Better icons - private static final Icon SELECT_IN_PROJECTS_ICON = new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/projectTab.png" ) ); //NOI18N - private static final Icon SELECT_IN_FILES_ICON = new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/project/ui/resources/filesTab.png" ) ); //NOI18N + private static final Icon SELECT_IN_PROJECTS_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/projectTab.png", false); //NOI18N + private static final Icon SELECT_IN_FILES_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/project/ui/resources/filesTab.png", false); //NOI18N private static final String SELECT_IN_PROJECTS_NAME = NbBundle.getMessage( CloseProject.class, "LBL_SelectInProjectsAction_Name" ); // NOI18N private static final String SELECT_IN_FILES_NAME = NbBundle.getMessage( CloseProject.class, "LBL_SelectInFilesAction_Name" ); // NOI18N diff --git a/properties/src/org/netbeans/modules/properties/BundleEditPanel.java b/properties/src/org/netbeans/modules/properties/BundleEditPanel.java --- a/properties/src/org/netbeans/modules/properties/BundleEditPanel.java +++ b/properties/src/org/netbeans/modules/properties/BundleEditPanel.java @@ -720,14 +720,12 @@ private ImageIcon getSortIcon(boolean ascending) { if (ascending) { if (iconSortAsc == null) { - iconSortAsc = new ImageIcon( - ImageUtilities.loadImage(SORT_ASC_ICON)); + iconSortAsc = ImageUtilities.loadImageIcon(SORT_ASC_ICON, false); } return iconSortAsc; } else { if (iconSortDesc == null) { - iconSortDesc = new ImageIcon( - ImageUtilities.loadImage(SORT_DESC_ICON)); + iconSortDesc = ImageUtilities.loadImageIcon(SORT_DESC_ICON, false); } return iconSortDesc; } diff --git a/properties/src/org/netbeans/modules/properties/BundleNodeCustomizer.java b/properties/src/org/netbeans/modules/properties/BundleNodeCustomizer.java --- a/properties/src/org/netbeans/modules/properties/BundleNodeCustomizer.java +++ b/properties/src/org/netbeans/modules/properties/BundleNodeCustomizer.java @@ -90,7 +90,7 @@ /** Utility method. Gets icon for key item in key list. */ private static Icon getLocaleIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/properties/propertiesLocale.gif")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/properties/propertiesLocale.gif", false); // NOI18N } /** Retrieves entry locales. Utility method. diff --git a/properties/src/org/netbeans/modules/properties/LocaleNodeCustomizer.java b/properties/src/org/netbeans/modules/properties/LocaleNodeCustomizer.java --- a/properties/src/org/netbeans/modules/properties/LocaleNodeCustomizer.java +++ b/properties/src/org/netbeans/modules/properties/LocaleNodeCustomizer.java @@ -118,7 +118,7 @@ /** Utility method. Gets icon for key item in key list. */ private static Icon getKeyIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/properties/propertiesKey.gif")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/properties/propertiesKey.gif", false); // NOI18N } /** Gets locale which represents the entry. Utility method. diff --git a/python.console/src/org/netbeans/modules/python/console/PythonConsoleAction.java b/python.console/src/org/netbeans/modules/python/console/PythonConsoleAction.java --- a/python.console/src/org/netbeans/modules/python/console/PythonConsoleAction.java +++ b/python.console/src/org/netbeans/modules/python/console/PythonConsoleAction.java @@ -22,7 +22,7 @@ public static String ICON_PATH = "org/netbeans/modules/python/console/actions/pyConsole.png"; public PythonConsoleAction() { super(NbBundle.getMessage(PythonConsoleAction.class, "CTL_PythonConsoleAction")); - putValue(SMALL_ICON, new ImageIcon(Utilities.loadImage(ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/python.debugger/src/org/netbeans/modules/python/debugger/actions/PythonDebugConsoleAction.java b/python.debugger/src/org/netbeans/modules/python/debugger/actions/PythonDebugConsoleAction.java --- a/python.debugger/src/org/netbeans/modules/python/debugger/actions/PythonDebugConsoleAction.java +++ b/python.debugger/src/org/netbeans/modules/python/debugger/actions/PythonDebugConsoleAction.java @@ -55,7 +55,7 @@ public PythonDebugConsoleAction() { super(NbBundle.getMessage(PythonDebugConsoleAction.class, "CTL_PythonDebugConsoleAction")); - putValue(SMALL_ICON, new ImageIcon(Utilities.loadImage(ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/python.editor/src/org/netbeans/modules/python/editor/PythonCodeCompleter.java b/python.editor/src/org/netbeans/modules/python/editor/PythonCodeCompleter.java --- a/python.editor/src/org/netbeans/modules/python/editor/PythonCodeCompleter.java +++ b/python.editor/src/org/netbeans/modules/python/editor/PythonCodeCompleter.java @@ -2182,7 +2182,7 @@ if (element.getKind() == ElementKind.CLASS && element.getModifiers().contains(Modifier.PRIVATE)) { // GSF doesn't automatically handle icons on private classes, so I have to // work around that here - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/python/editor/resources/private-class.png")); //NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/python/editor/resources/private-class.png", false); //NOI18N } return null; @@ -2324,7 +2324,7 @@ } if (keywordIcon == null) { - keywordIcon = new ImageIcon(ImageUtilities.loadImage(PYTHON_KEYWORD)); + keywordIcon = ImageUtilities.loadImageIcon(PYTHON_KEYWORD, false); } return keywordIcon; @@ -2442,7 +2442,7 @@ } public ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/gsfret/source/resources/icons/implement-glyph.gif")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/gsfret/source/resources/icons/implement-glyph.gif", false); // NOI18N } public Set getModifiers() { diff --git a/python.editor/src/org/netbeans/modules/python/editor/PythonIndexSearcher.java b/python.editor/src/org/netbeans/modules/python/editor/PythonIndexSearcher.java --- a/python.editor/src/org/netbeans/modules/python/editor/PythonIndexSearcher.java +++ b/python.editor/src/org/netbeans/modules/python/editor/PythonIndexSearcher.java @@ -172,7 +172,7 @@ initProjectInfo(); } if (isLibrary) { - return new ImageIcon(org.openide.util.ImageUtilities.loadImage(ICON_PATH)); + return ImageUtilities.loadImageIcon(ICON_PATH, false); } return projectIcon; } diff --git a/python.editor/src/org/netbeans/modules/python/editor/PythonStructureItem.java b/python.editor/src/org/netbeans/modules/python/editor/PythonStructureItem.java --- a/python.editor/src/org/netbeans/modules/python/editor/PythonStructureItem.java +++ b/python.editor/src/org/netbeans/modules/python/editor/PythonStructureItem.java @@ -113,7 +113,7 @@ if (kind == ElementKind.CLASS && getModifiers().contains(Modifier.PRIVATE)) { // GSF doesn't automatically handle icons on private classes, so I have to // work around that here - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/python/editor/resources/private-class.png")); //NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/python/editor/resources/private-class.png", false); //NOI18N } return null; diff --git a/python.editor/src/org/netbeans/modules/python/editor/imports/FixImportsAction.java b/python.editor/src/org/netbeans/modules/python/editor/imports/FixImportsAction.java --- a/python.editor/src/org/netbeans/modules/python/editor/imports/FixImportsAction.java +++ b/python.editor/src/org/netbeans/modules/python/editor/imports/FixImportsAction.java @@ -185,7 +185,7 @@ variants[index][0] = NbBundle.getMessage(FixImportsAction.class, "FixDupImportStmts_CannotResolve"); //NOI18N defaults[index] = variants[index][0]; icons[index] = new Icon[1]; - icons[index][0] = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/python/editor/imports/error-glyph.gif"));//NOI18N + icons[index][0] = ImageUtilities.loadImageIcon("org/netbeans/modules/python/editor/imports/error-glyph.gif", false);//NOI18N } index++; diff --git a/python.editor/src/org/netbeans/modules/python/editor/imports/ImportModulePanel.java b/python.editor/src/org/netbeans/modules/python/editor/imports/ImportModulePanel.java --- a/python.editor/src/org/netbeans/modules/python/editor/imports/ImportModulePanel.java +++ b/python.editor/src/org/netbeans/modules/python/editor/imports/ImportModulePanel.java @@ -376,7 +376,7 @@ } // TODO - depend on gsf directly and get icons from there! //setIcon( ElementIcons.getElementIcon( td.kind, null ) ); - setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/python/editor/imports/module.png"))); // NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/python/editor/imports/module.png", false)); // NOI18N } else { setText(value.toString()); } diff --git a/python.options/src/org/netbeans/modules/python/options/OptionsOptionsCategory.java b/python.options/src/org/netbeans/modules/python/options/OptionsOptionsCategory.java --- a/python.options/src/org/netbeans/modules/python/options/OptionsOptionsCategory.java +++ b/python.options/src/org/netbeans/modules/python/options/OptionsOptionsCategory.java @@ -14,7 +14,7 @@ public final class OptionsOptionsCategory extends OptionsCategory { public Icon getIcon() { - return new ImageIcon(Utilities.loadImage("org/netbeans/modules/python/options/py_25_32.png")); + return ImageUtilities.loadImageIcon("org/netbeans/modules/python/options/py_25_32.png", false); } public String getCategoryName() { diff --git a/python.project/src/org/netbeans/modules/python/project/PythonProject.java b/python.project/src/org/netbeans/modules/python/project/PythonProject.java --- a/python.project/src/org/netbeans/modules/python/project/PythonProject.java +++ b/python.project/src/org/netbeans/modules/python/project/PythonProject.java @@ -48,8 +48,7 @@ */ public class PythonProject implements Project { - private static final ImageIcon PROJECT_ICON = new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/python/project/resources/py_25_16.png")); + private static final ImageIcon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/python/project/resources/py_25_16.png", false); protected AntProjectHelper helper; protected UpdateHelper updateHelper; diff --git a/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java b/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java --- a/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java +++ b/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringPanel.java @@ -214,9 +214,7 @@ private JToolBar getToolBar() { checkEventThread(); refreshButton = new JButton( - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/refactoring/api/resources/refresh.png")) // NOI18N - ); + ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/refresh.png", false)); Dimension dim = new Dimension(24, 24); refreshButton.setMaximumSize(dim); refreshButton.setMinimumSize(dim); @@ -230,13 +228,9 @@ refreshButton.addActionListener(getButtonListener()); // expand button settings expandButton = new JToggleButton( - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/refactoring/api/resources/expandTree.png")) // NOI18N - ); + ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/expandTree.png", false)); expandButton.setSelectedIcon( - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/refactoring/api/resources/colapseTree.png")) // NOI18N - ); + ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/colapseTree.png", false)); expandButton.setMaximumSize(dim); expandButton.setMinimumSize(dim); expandButton.setPreferredSize(dim); @@ -253,9 +247,7 @@ toolBar.setFloatable(false); logicalViewButton = new JToggleButton( - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/refactoring/api/resources/logical_view.png")) // NOI18N - ); + ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/logical_view.png", false)); logicalViewButton.setMaximumSize(dim); logicalViewButton.setMinimumSize(dim); @@ -270,9 +262,7 @@ logicalViewButton.addActionListener(getButtonListener()); physicalViewButton = new JToggleButton( - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/refactoring/api/resources/file_view.png")) // NOI18N - ); + ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/file_view.png", false)); physicalViewButton.setMaximumSize(dim); physicalViewButton.setMinimumSize(dim); @@ -298,9 +288,7 @@ } nextMatch = new JButton( - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/refactoring/api/resources/nextmatch.png")) // NOI18N - ); + ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/nextmatch.png", false)); nextMatch.setMaximumSize(dim); nextMatch.setMinimumSize(dim); @@ -311,9 +299,7 @@ nextMatch.addActionListener(getButtonListener()); prevMatch = new JButton( - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/refactoring/api/resources/prevmatch.png")) // NOI18N - ); + ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/prevmatch.png", false)); prevMatch.setMaximumSize(dim); prevMatch.setMinimumSize(dim); @@ -668,7 +654,7 @@ errorsDesc.append(""); // NOI18N } errorsDesc.append(']'); - final CheckNode root = new CheckNode(null, description + errorsDesc.toString(), new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/refactoring/api/resources/" + (isQuery ? "findusages.png" : "refactoring.gif")))); + final CheckNode root = new CheckNode(null, description + errorsDesc.toString(),ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/" + (isQuery ? "findusages.png" : "refactoring.gif"), false)); HashMap nodes = new HashMap(); final Cursor old = getCursor(); diff --git a/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyAction.java b/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyAction.java --- a/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyAction.java +++ b/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyAction.java @@ -60,8 +60,7 @@ public final class CallHierarchyAction extends JavaRefactoringGlobalAction { public CallHierarchyAction() { - super(NbBundle.getMessage(CallHierarchyAction.class, "CTL_CallHierarchyAction"), - new ImageIcon(ImageUtilities.loadImage(CallHierarchyTopComponent.ICON_PATH, true))); + super(NbBundle.getMessage(CallHierarchyAction.class, "CTL_CallHierarchyAction"),ImageUtilities.loadImageIcon(CallHierarchyTopComponent.ICON_PATH, true)); } public void performAction(Lookup context) { diff --git a/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTopComponent.java b/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTopComponent.java --- a/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTopComponent.java +++ b/refactoring.java/src/org/netbeans/modules/refactoring/java/callhierarchy/CallHierarchyTopComponent.java @@ -85,7 +85,7 @@ initComponents(); - jBtnRefresh.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/refactoring/api/resources/refresh.png"))); + jBtnRefresh.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/refresh.png", false)); ContextPanel ctxpanel = new ContextPanel(); ctxpanel.setLayout(new java.awt.BorderLayout()); diff --git a/ruby.hints/src/org/netbeans/modules/ruby/hints/introduce/ErrorLabel.java b/ruby.hints/src/org/netbeans/modules/ruby/hints/introduce/ErrorLabel.java --- a/ruby.hints/src/org/netbeans/modules/ruby/hints/introduce/ErrorLabel.java +++ b/ruby.hints/src/org/netbeans/modules/ruby/hints/introduce/ErrorLabel.java @@ -120,7 +120,7 @@ } protected Icon getErrorIcon() { - return new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/gsfret/source/resources/icons/error-glyph.gif") ); + return ImageUtilities.loadImageIcon("org/netbeans/modules/gsfret/source/resources/icons/error-glyph.gif", false); } /** diff --git a/ruby.javaint/src/org/netbeans/modules/ruby/javaint/RubyClassPathUi.java b/ruby.javaint/src/org/netbeans/modules/ruby/javaint/RubyClassPathUi.java --- a/ruby.javaint/src/org/netbeans/modules/ruby/javaint/RubyClassPathUi.java +++ b/ruby.javaint/src/org/netbeans/modules/ruby/javaint/RubyClassPathUi.java @@ -97,12 +97,12 @@ private static String RESOURCE_ICON_BROKEN_BADGE = "org/netbeans/modules/ruby/javaint//brokenProjectBadge.gif"; //NOI18N - private static ImageIcon ICON_JAR = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_JAR ) ); + private static ImageIcon ICON_JAR = ImageUtilities.loadImageIcon(RESOURCE_ICON_JAR, false); private static ImageIcon ICON_FOLDER = null; - private static ImageIcon ICON_LIBRARY = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_LIBRARY ) ); - private static ImageIcon ICON_ARTIFACT = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_ARTIFACT ) ); - private static ImageIcon ICON_CLASSPATH = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_CLASSPATH ) ); - private static ImageIcon ICON_BROKEN_BADGE = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_BROKEN_BADGE ) ); + private static ImageIcon ICON_LIBRARY = ImageUtilities.loadImageIcon(RESOURCE_ICON_LIBRARY, false); + private static ImageIcon ICON_ARTIFACT = ImageUtilities.loadImageIcon(RESOURCE_ICON_ARTIFACT, false); + private static ImageIcon ICON_CLASSPATH = ImageUtilities.loadImageIcon(RESOURCE_ICON_CLASSPATH, false); + private static ImageIcon ICON_BROKEN_BADGE = ImageUtilities.loadImageIcon(RESOURCE_ICON_BROKEN_BADGE, false); private static ImageIcon ICON_BROKEN_JAR; private static ImageIcon ICON_BROKEN_LIBRARY; diff --git a/ruby.merbproject/src/org/netbeans/modules/ruby/merbproject/MerbProject.java b/ruby.merbproject/src/org/netbeans/modules/ruby/merbproject/MerbProject.java --- a/ruby.merbproject/src/org/netbeans/modules/ruby/merbproject/MerbProject.java +++ b/ruby.merbproject/src/org/netbeans/modules/ruby/merbproject/MerbProject.java @@ -77,7 +77,7 @@ */ public final class MerbProject extends RubyBaseProject { - private static final Icon RUBY_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/ruby/merbproject/ui/resources/jruby.png")); // NOI18N + private static final Icon RUBY_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/ruby/merbproject/ui/resources/jruby.png", false); // NOI18N private MerbSourceRoots sourceRoots; private MerbSourceRoots testRoots; diff --git a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/JavaClassPathUi.java b/ruby.project/src/org/netbeans/modules/ruby/rubyproject/JavaClassPathUi.java --- a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/JavaClassPathUi.java +++ b/ruby.project/src/org/netbeans/modules/ruby/rubyproject/JavaClassPathUi.java @@ -82,12 +82,12 @@ private static String RESOURCE_ICON_BROKEN_BADGE = "org/netbeans/modules/ruby/rubyproject/ui/resources/brokenProjectBadge.gif"; //NOI18N - private static ImageIcon ICON_JAR = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_JAR ) ); + private static ImageIcon ICON_JAR = ImageUtilities.loadImageIcon(RESOURCE_ICON_JAR, false); private static ImageIcon ICON_FOLDER = null; - private static ImageIcon ICON_LIBRARY = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_LIBRARY ) ); - private static ImageIcon ICON_ARTIFACT = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_ARTIFACT ) ); - private static ImageIcon ICON_CLASSPATH = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_CLASSPATH ) ); - private static ImageIcon ICON_BROKEN_BADGE = new ImageIcon( ImageUtilities.loadImage( RESOURCE_ICON_BROKEN_BADGE ) ); + private static ImageIcon ICON_LIBRARY = ImageUtilities.loadImageIcon(RESOURCE_ICON_LIBRARY, false); + private static ImageIcon ICON_ARTIFACT = ImageUtilities.loadImageIcon(RESOURCE_ICON_ARTIFACT, false); + private static ImageIcon ICON_CLASSPATH = ImageUtilities.loadImageIcon(RESOURCE_ICON_CLASSPATH, false); + private static ImageIcon ICON_BROKEN_BADGE = ImageUtilities.loadImageIcon(RESOURCE_ICON_BROKEN_BADGE, false); private static ImageIcon ICON_BROKEN_JAR; private static ImageIcon ICON_BROKEN_LIBRARY; diff --git a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/RubyProject.java b/ruby.project/src/org/netbeans/modules/ruby/rubyproject/RubyProject.java --- a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/RubyProject.java +++ b/ruby.project/src/org/netbeans/modules/ruby/rubyproject/RubyProject.java @@ -74,7 +74,7 @@ */ public final class RubyProject extends RubyBaseProject { - private static final Icon RUBY_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/ruby/rubyproject/ui/resources/jruby.png")); // NOI18N + private static final Icon RUBY_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/ruby/rubyproject/ui/resources/jruby.png", false); // NOI18N private SourceRoots sourceRoots; private SourceRoots testRoots; diff --git a/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsProject.java b/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsProject.java --- a/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsProject.java +++ b/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsProject.java @@ -79,7 +79,7 @@ */ public class RailsProject extends RubyBaseProject { - private static final Icon RUBY_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/ruby/railsprojects/ui/resources/rails.png")); // NOI18N + private static final Icon RUBY_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/ruby/railsprojects/ui/resources/rails.png", false); // NOI18N protected SourceRoots sourceRoots; protected SourceRoots testRoots; diff --git a/ruby/src/org/netbeans/modules/ruby/RubyCompletionItem.java b/ruby/src/org/netbeans/modules/ruby/RubyCompletionItem.java --- a/ruby/src/org/netbeans/modules/ruby/RubyCompletionItem.java +++ b/ruby/src/org/netbeans/modules/ruby/RubyCompletionItem.java @@ -57,6 +57,7 @@ import org.netbeans.modules.ruby.elements.IndexedMethod; import org.netbeans.modules.ruby.elements.IndexedVariable; import org.netbeans.modules.ruby.elements.KeywordElement; +import org.openide.util.ImageUtilities; class RubyCompletionItem extends DefaultCompletionProposal { @@ -181,7 +182,7 @@ @Override public ImageIcon getIcon() { if (keywordIcon == null) { - keywordIcon = new ImageIcon(org.openide.util.ImageUtilities.loadImage(RUBY_KEYWORD)); + keywordIcon = ImageUtilities.loadImageIcon(RUBY_KEYWORD, false); } return keywordIcon; @@ -321,7 +322,7 @@ @Override public ImageIcon getIcon() { if (symbolIcon == null) { - symbolIcon = new ImageIcon(org.openide.util.ImageUtilities.loadImage(CONSTANT_ICON)); + symbolIcon = ImageUtilities.loadImageIcon(CONSTANT_ICON, false); } return symbolIcon; diff --git a/ruby/src/org/netbeans/modules/ruby/RubyStructureAnalyzer.java b/ruby/src/org/netbeans/modules/ruby/RubyStructureAnalyzer.java --- a/ruby/src/org/netbeans/modules/ruby/RubyStructureAnalyzer.java +++ b/ruby/src/org/netbeans/modules/ruby/RubyStructureAnalyzer.java @@ -107,6 +107,7 @@ import org.netbeans.modules.ruby.lexer.RubyTokenId; import org.openide.filesystems.FileObject; import org.openide.util.Exceptions; +import org.openide.util.ImageUtilities; /** * @todo Rewrite various other helper classes to use the scanned structure @@ -1564,7 +1565,7 @@ public ImageIcon getCustomIcon() { if (keywordIcon == null) { - keywordIcon = new ImageIcon(org.openide.util.ImageUtilities.loadImage(RUBY_KEYWORD)); + keywordIcon = ImageUtilities.loadImageIcon(RUBY_KEYWORD, false); } return keywordIcon; diff --git a/ruby/src/org/netbeans/modules/ruby/RubyTypeSearcher.java b/ruby/src/org/netbeans/modules/ruby/RubyTypeSearcher.java --- a/ruby/src/org/netbeans/modules/ruby/RubyTypeSearcher.java +++ b/ruby/src/org/netbeans/modules/ruby/RubyTypeSearcher.java @@ -49,7 +49,6 @@ import java.util.logging.Logger; import java.util.regex.Pattern; import javax.swing.Icon; -import javax.swing.ImageIcon; import org.jruby.nb.ast.Node; import org.netbeans.modules.gsf.api.ElementHandle; import org.netbeans.modules.gsf.api.Index; @@ -70,6 +69,7 @@ import org.openide.filesystems.FileUtil; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; +import org.openide.util.ImageUtilities; import org.openide.util.NbBundle; /** @@ -321,7 +321,7 @@ initProjectInfo(); } if (isLibrary) { - return new ImageIcon(org.openide.util.ImageUtilities.loadImage(RUBY_KEYWORD)); + return ImageUtilities.loadImageIcon(RUBY_KEYWORD, false); } return projectIcon; } diff --git a/soa.reportgenerator/src/org/netbeans/modules/reportgenerator/api/CustomizeReportAction.java b/soa.reportgenerator/src/org/netbeans/modules/reportgenerator/api/CustomizeReportAction.java --- a/soa.reportgenerator/src/org/netbeans/modules/reportgenerator/api/CustomizeReportAction.java +++ b/soa.reportgenerator/src/org/netbeans/modules/reportgenerator/api/CustomizeReportAction.java @@ -34,8 +34,7 @@ public static final String ACCELERATOR = "alt shift F11"; // NOI18N - private static final Icon icon = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/reportgenerator/api/impl/resources/images/customizeReport.png")); + private static final Icon icon = ImageUtilities.loadImageIcon("org/netbeans/modules/reportgenerator/api/impl/resources/images/customizeReport.png", false); private static final String label = NbBundle.getMessage( GenerateReportAction.class,"NAME_Customize_Report"); diff --git a/soa.reportgenerator/src/org/netbeans/modules/reportgenerator/api/GenerateReportAction.java b/soa.reportgenerator/src/org/netbeans/modules/reportgenerator/api/GenerateReportAction.java --- a/soa.reportgenerator/src/org/netbeans/modules/reportgenerator/api/GenerateReportAction.java +++ b/soa.reportgenerator/src/org/netbeans/modules/reportgenerator/api/GenerateReportAction.java @@ -30,8 +30,7 @@ public static final String ACCELERATOR = "alt shift F10"; // NOI18N - private static final Icon icon = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/reportgenerator/api/impl/resources/images/generateReport.png")); + private static final Icon icon = ImageUtilities.loadImageIcon("org/netbeans/modules/reportgenerator/api/impl/resources/images/generateReport.png", false); private static final String label = NbBundle.getMessage( GenerateReportAction.class,"NAME_Generate_Report"); diff --git a/soa.ui/src/org/netbeans/modules/soa/ui/tree/TreeItemInfoProvider.java b/soa.ui/src/org/netbeans/modules/soa/ui/tree/TreeItemInfoProvider.java --- a/soa.ui/src/org/netbeans/modules/soa/ui/tree/TreeItemInfoProvider.java +++ b/soa.ui/src/org/netbeans/modules/soa/ui/tree/TreeItemInfoProvider.java @@ -37,7 +37,6 @@ Icon getIcon(TreeItem treeItem); String getToolTipText(TreeItem treeItem); - Icon UNKNOWN_IMAGE = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/soa/ui/tree/UNKNOWN_ICON.png")); + Icon UNKNOWN_IMAGE = ImageUtilities.loadImageIcon("org/netbeans/modules/soa/ui/tree/UNKNOWN_ICON.png", false); } diff --git a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/Utils.java b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/Utils.java --- a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/Utils.java +++ b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/Utils.java @@ -197,7 +197,7 @@ // } public static ImageIcon getIcon (String iconBase) { - return new ImageIcon (ImageUtilities.loadImage (iconBase+".gif")); + return ImageUtilities.loadImageIcon(iconBase + ".gif", false); } /** diff --git a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java --- a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java +++ b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java @@ -78,8 +78,7 @@ public DebugMainProjectAction() { delegate = MainProjectSensitiveActions.mainProjectCommandAction( ActionProvider.COMMAND_DEBUG, - NbBundle.getMessage(DebugMainProjectAction.class, "LBL_DebugMainProjectAction_Name" ), - new ImageIcon(ImageUtilities.loadImage( "org/netbeans/modules/debugger/resources/debugProject.png" ))); // NOI18N + NbBundle.getMessage(DebugMainProjectAction.class, "LBL_DebugMainProjectAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debugProject.png", false)); // NOI18N delegate.putValue("iconBase","org/netbeans/modules/debugger/resources/debugProject.png"); //NOI18N } diff --git a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebuggerAction.java b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebuggerAction.java --- a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebuggerAction.java +++ b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebuggerAction.java @@ -279,8 +279,7 @@ public static Action createDebugFileAction() { Action a = FileSensitiveActions.fileCommandAction( "debug.single", // XXX Define standard - NbBundle.getMessage(DebuggerAction.class, "LBL_DebugSingleAction_Name"), // NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/debugger/resources/debugSingle.png" ) )); //NOI18N + NbBundle.getMessage(DebuggerAction.class, "LBL_DebugSingleAction_Name"),ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debugSingle.png", false)); //NOI18N a.putValue("iconBase","org/netbeans/modules/debugger/resources/debugSingle.png"); //NOI18N a.putValue("noIconInMenu", Boolean.TRUE); //NOI18N return a; @@ -289,8 +288,7 @@ public static Action createDebugTestFileAction() { Action a = FileSensitiveActions.fileCommandAction( "debug.test.single", // XXX Define standard - NbBundle.getMessage(DebuggerAction.class, "LBL_DebugTestSingleAction_Name" ),// NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/debugger/resources/debugTestSingle.png" ) )); //NOI18N + NbBundle.getMessage(DebuggerAction.class, "LBL_DebugTestSingleAction_Name" ),ImageUtilities.loadImageIcon("org/netbeans/modules/debugger/resources/debugTestSingle.png", false)); //NOI18N a.putValue("iconBase","org/netbeans/modules/debugger/resources/debugTestSingle.png"); //NOI18N a.putValue("noIconInMenu", Boolean.TRUE); //NOI18N return a; diff --git a/spi.editor.hints/src/org/netbeans/modules/editor/hints/borrowed/ListCompletionView.java b/spi.editor.hints/src/org/netbeans/modules/editor/hints/borrowed/ListCompletionView.java --- a/spi.editor.hints/src/org/netbeans/modules/editor/hints/borrowed/ListCompletionView.java +++ b/spi.editor.hints/src/org/netbeans/modules/editor/hints/borrowed/ListCompletionView.java @@ -70,7 +70,7 @@ private final HtmlRenderer.Renderer defaultRenderer = HtmlRenderer.createRenderer(); private Font font; - private Icon icon = new ImageIcon (ImageUtilities.loadImage("org/netbeans/modules/editor/hints/resources/suggestion.gif")); // NOI18N + private Icon icon = ImageUtilities.loadImageIcon("org/netbeans/modules/editor/hints/resources/suggestion.gif", false); // NOI18N public ListCompletionView() { setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); diff --git a/spi.palette/src/org/netbeans/modules/palette/ShowPaletteAction.java b/spi.palette/src/org/netbeans/modules/palette/ShowPaletteAction.java --- a/spi.palette/src/org/netbeans/modules/palette/ShowPaletteAction.java +++ b/spi.palette/src/org/netbeans/modules/palette/ShowPaletteAction.java @@ -63,8 +63,7 @@ public ShowPaletteAction() { putValue(NAME, Utils.getBundleString("CTL_PaletteAction") ); - putValue(SMALL_ICON, new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/palette/resources/palette.png"))); // NOI18N + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/palette/resources/palette.png", false)); // NOI18N } diff --git a/spring.beans/src/org/netbeans/modules/spring/beans/completion/SpringXMLConfigCompletionItem.java b/spring.beans/src/org/netbeans/modules/spring/beans/completion/SpringXMLConfigCompletionItem.java --- a/spring.beans/src/org/netbeans/modules/spring/beans/completion/SpringXMLConfigCompletionItem.java +++ b/spring.beans/src/org/netbeans/modules/spring/beans/completion/SpringXMLConfigCompletionItem.java @@ -303,7 +303,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/spring/beans/resources/spring-bean.png")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/spring/beans/resources/spring-bean.png", false); // NOI18N } @Override @@ -419,7 +419,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(CLASS)); + return ImageUtilities.loadImageIcon(CLASS, false); } @Override @@ -475,7 +475,7 @@ @Override protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(PACKAGE)); + if (icon == null) icon = ImageUtilities.loadImageIcon(PACKAGE, false); return icon; } @@ -655,7 +655,7 @@ break; } } - ImageIcon newIcon = new ImageIcon(ImageUtilities.loadImage(iconPath)); + ImageIcon newIcon = ImageUtilities.loadImageIcon(iconPath, false); icon[isStatic?1:0][level] = newIcon; return newIcon; } @@ -875,13 +875,13 @@ if(cachedIcon == null) { switch(propertyType) { case READ_ONLY: - cachedIcon = new ImageIcon(ImageUtilities.loadImage(PROP_RO)); + cachedIcon = ImageUtilities.loadImageIcon(PROP_RO, false); break; case READ_WRITE: - cachedIcon = new ImageIcon(ImageUtilities.loadImage(PROP_RW)); + cachedIcon = ImageUtilities.loadImageIcon(PROP_RW, false); break; case WRITE_ONLY: - cachedIcon = new ImageIcon(ImageUtilities.loadImage(PROP_WO)); + cachedIcon = ImageUtilities.loadImageIcon(PROP_WO, false); break; } @@ -962,8 +962,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/spring/beans/resources/spring.png")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/spring/beans/resources/spring.png", false); // NOI18N } @Override diff --git a/spring.beans/src/org/netbeans/modules/spring/beans/jumpto/AbstractBeanTypeDescriptor.java b/spring.beans/src/org/netbeans/modules/spring/beans/jumpto/AbstractBeanTypeDescriptor.java --- a/spring.beans/src/org/netbeans/modules/spring/beans/jumpto/AbstractBeanTypeDescriptor.java +++ b/spring.beans/src/org/netbeans/modules/spring/beans/jumpto/AbstractBeanTypeDescriptor.java @@ -55,7 +55,7 @@ */ public abstract class AbstractBeanTypeDescriptor extends TypeDescriptor { - private static final Icon beanIcon = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/spring/beans/resources/spring-bean.png")); // NOI18N + private static final Icon beanIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/spring/beans/resources/spring-bean.png", false); // NOI18N private final String simpleName; private final FileObject fileObject; diff --git a/spring.beans/src/org/netbeans/modules/spring/beans/wizards/SpringXMLConfigNamespacesVisual.java b/spring.beans/src/org/netbeans/modules/spring/beans/wizards/SpringXMLConfigNamespacesVisual.java --- a/spring.beans/src/org/netbeans/modules/spring/beans/wizards/SpringXMLConfigNamespacesVisual.java +++ b/spring.beans/src/org/netbeans/modules/spring/beans/wizards/SpringXMLConfigNamespacesVisual.java @@ -45,7 +45,6 @@ import java.util.ArrayList; import java.util.List; -import javax.swing.ImageIcon; import javax.swing.JPanel; import javax.swing.ListSelectionModel; import javax.swing.table.TableColumn; @@ -53,8 +52,8 @@ import org.netbeans.api.java.classpath.ClassPath; import org.netbeans.api.project.libraries.Library; import org.netbeans.modules.spring.api.SpringUtilities; +import org.openide.util.ImageUtilities; import org.openide.util.NbBundle; -import org.openide.util.Utilities; public final class SpringXMLConfigNamespacesVisual extends JPanel { @@ -151,7 +150,7 @@ } }); - springNotOnClassPathLabel.setIcon(new ImageIcon(Utilities.loadImage("org/netbeans/modules/spring/beans/resources/warning.gif")) ); + springNotOnClassPathLabel.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/spring/beans/resources/warning.gif", false)); org.openide.awt.Mnemonics.setLocalizedText(springNotOnClassPathLabel, org.openide.util.NbBundle.getMessage(SpringXMLConfigNamespacesVisual.class, "LBL_SpringNotOnClassPath")); // NOI18N org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); diff --git a/sql.project/src/org/netbeans/modules/sql/project/IcanproProject.java b/sql.project/src/org/netbeans/modules/sql/project/IcanproProject.java --- a/sql.project/src/org/netbeans/modules/sql/project/IcanproProject.java +++ b/sql.project/src/org/netbeans/modules/sql/project/IcanproProject.java @@ -69,7 +69,7 @@ public final class IcanproProject implements Project, AntProjectListener { // private static final Icon PROJECT_ICON = new ImageIcon(Utilities.loadImage("com/sun/jbi/ui/devtoolT/projects/icanpro/ui/resources/icanproProjectIcon.gif")); // NOI18N - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/sql/project/ui/resources/sqlproProjectIcon.gif")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/sql/project/ui/resources/sqlproProjectIcon.gif", false); // NOI18N public static final String SOURCES_TYPE_ICANPRO = "BIZPRO"; private final AntProjectHelper helper; diff --git a/sql.project/src/org/netbeans/modules/sql/project/SQLproProject.java b/sql.project/src/org/netbeans/modules/sql/project/SQLproProject.java --- a/sql.project/src/org/netbeans/modules/sql/project/SQLproProject.java +++ b/sql.project/src/org/netbeans/modules/sql/project/SQLproProject.java @@ -100,7 +100,7 @@ */ public final class SQLproProject implements Project, AntProjectListener { - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/sql/project/ui/resources/sqlproProjectIcon.gif")); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/sql/project/ui/resources/sqlproProjectIcon.gif", false); // NOI18N public static final String SOURCES_TYPE_ICANPRO = "BIZPRO"; public static final String ARTIFACT_TYPE_JBI_ASA = "CAPS.asa"; diff --git a/subversion/src/org/netbeans/modules/subversion/ui/status/OpenVersioningAction.java b/subversion/src/org/netbeans/modules/subversion/ui/status/OpenVersioningAction.java --- a/subversion/src/org/netbeans/modules/subversion/ui/status/OpenVersioningAction.java +++ b/subversion/src/org/netbeans/modules/subversion/ui/status/OpenVersioningAction.java @@ -63,7 +63,7 @@ public OpenVersioningAction() { putValue("noIconInMenu", Boolean.FALSE); // NOI18N - setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/subversion/resources/icons/versioning-view.png"))); // NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/subversion/resources/icons/versioning-view.png", false)); // NOI18N } public String getName() { diff --git a/swingapp/src/org/netbeans/modules/swingapp/util/TableSorter.java b/swingapp/src/org/netbeans/modules/swingapp/util/TableSorter.java --- a/swingapp/src/org/netbeans/modules/swingapp/util/TableSorter.java +++ b/swingapp/src/org/netbeans/modules/swingapp/util/TableSorter.java @@ -124,8 +124,8 @@ } }; - private final Icon ICON_ASCENDING = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/openide/explorer/columnsSortedAsc.gif", true)); // NOI18N - private final Icon ICON_DESCENDING = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/openide/explorer/columnsSortedDesc.gif", true)); // NOI18N + private final Icon ICON_ASCENDING = ImageUtilities.loadImageIcon("org/netbeans/modules/openide/explorer/columnsSortedAsc.gif", true); // NOI18N + private final Icon ICON_DESCENDING = ImageUtilities.loadImageIcon("org/netbeans/modules/openide/explorer/columnsSortedDesc.gif", true); // NOI18N private Row[] viewToModel; private int[] modelToView; diff --git a/tasklist.ui/src/org/netbeans/modules/tasklist/ui/FiltersMenuButton.java b/tasklist.ui/src/org/netbeans/modules/tasklist/ui/FiltersMenuButton.java --- a/tasklist.ui/src/org/netbeans/modules/tasklist/ui/FiltersMenuButton.java +++ b/tasklist.ui/src/org/netbeans/modules/tasklist/ui/FiltersMenuButton.java @@ -72,8 +72,7 @@ /** Creates a new instance of FiltersMenuButton */ public FiltersMenuButton( TaskFilter currentFilter ) { - super( new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/tasklist/ui/resources/filter.png" ) ), //NOI18N - new ImageIcon( ImageUtilities.loadImage( "org/netbeans/modules/tasklist/ui/resources/filter_rollover.png" ) ), 4 ); //NOI18N + super( ImageUtilities.loadImageIcon("org/netbeans/modules/tasklist/ui/resources/filter.png", false), ImageUtilities.loadImageIcon("org/netbeans/modules/tasklist/ui/resources/filter_rollover.png", false), 4 ); //NOI18N taskManager = TaskManagerImpl.getInstance(); updateState( currentFilter ); diff --git a/tasklist.ui/src/org/netbeans/modules/tasklist/ui/TaskListTable.java b/tasklist.ui/src/org/netbeans/modules/tasklist/ui/TaskListTable.java --- a/tasklist.ui/src/org/netbeans/modules/tasklist/ui/TaskListTable.java +++ b/tasklist.ui/src/org/netbeans/modules/tasklist/ui/TaskListTable.java @@ -705,9 +705,9 @@ private ImageIcon getProperIcon( boolean descending ) { if( descending ) { - return new ImageIcon( ImageUtilities.loadImage( SORT_DESC_ICON ) ); + return ImageUtilities.loadImageIcon(SORT_DESC_ICON, false); } else { - return new ImageIcon( ImageUtilities.loadImage( SORT_ASC_ICON ) ); + return ImageUtilities.loadImageIcon(SORT_ASC_ICON, false); } } } diff --git a/tasklist.ui/src/org/netbeans/modules/tasklist/ui/TaskListTopComponent.java b/tasklist.ui/src/org/netbeans/modules/tasklist/ui/TaskListTopComponent.java --- a/tasklist.ui/src/org/netbeans/modules/tasklist/ui/TaskListTopComponent.java +++ b/tasklist.ui/src/org/netbeans/modules/tasklist/ui/TaskListTopComponent.java @@ -456,7 +456,7 @@ toolbar.add( toggleFilter ); //grouping & other butons toolbar.addSeparator(); - final JToggleButton toggleGroups = new JToggleButton( new ImageIcon(ImageUtilities.loadImage( "org/netbeans/modules/tasklist/ui/resources/groups.png" )) ); //NOI18N + final JToggleButton toggleGroups = new JToggleButton( ImageUtilities.loadImageIcon("org/netbeans/modules/tasklist/ui/resources/groups.png", false)); //NOI18N toggleGroups.addItemListener( new ItemListener() { public void itemStateChanged(ItemEvent e) { switchTableModel( e.getStateChange() == ItemEvent.SELECTED ); diff --git a/timers/src/org/netbeans/modules/timers/OpenTimeComponentAction.java b/timers/src/org/netbeans/modules/timers/OpenTimeComponentAction.java --- a/timers/src/org/netbeans/modules/timers/OpenTimeComponentAction.java +++ b/timers/src/org/netbeans/modules/timers/OpenTimeComponentAction.java @@ -54,7 +54,7 @@ public OpenTimeComponentAction() { super(NbBundle.getMessage(OpenTimeComponentAction.class, "CTL_OpenTimeComponentAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(TimeComponent.ICON_PATH))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(TimeComponent.ICON_PATH, false)); } public void actionPerformed(ActionEvent evt) { diff --git a/uihandler.interactive/src/org/netbeans/modules/uihandler/interactive/SubmitStatus.java b/uihandler.interactive/src/org/netbeans/modules/uihandler/interactive/SubmitStatus.java --- a/uihandler.interactive/src/org/netbeans/modules/uihandler/interactive/SubmitStatus.java +++ b/uihandler.interactive/src/org/netbeans/modules/uihandler/interactive/SubmitStatus.java @@ -88,9 +88,9 @@ timer = new Timer(100, this); this.action = action; - tacho = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/uihandler/tachometer24.png")); - tachoOk = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/uihandler/tachometer-ok.png")); - hints = new ImageIcon(ImageUtilities.loadImage("org/netbeans/lib/uihandler/def.png")); + tacho = ImageUtilities.loadImageIcon("org/netbeans/modules/uihandler/tachometer24.png", false); + tachoOk = ImageUtilities.loadImageIcon("org/netbeans/modules/uihandler/tachometer-ok.png", false); + hints = ImageUtilities.loadImageIcon("org/netbeans/lib/uihandler/def.png", false); setIcon(tacho); setToolTipText(NbBundle.getMessage(SubmitAction.class, "CTL_SubmitAction")); diff --git a/uml.codegen/src/org/netbeans/modules/uml/codegen/ui/DomainTemplatesManagerPanel.java b/uml.codegen/src/org/netbeans/modules/uml/codegen/ui/DomainTemplatesManagerPanel.java --- a/uml.codegen/src/org/netbeans/modules/uml/codegen/ui/DomainTemplatesManagerPanel.java +++ b/uml.codegen/src/org/netbeans/modules/uml/codegen/ui/DomainTemplatesManagerPanel.java @@ -91,12 +91,10 @@ private Map treeExpandState = new HashMap(); private static final Icon DOMAIN_OBJECT_NODE_ICON = - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/uml/resources/images/templates.png")); // NOI18N + ImageUtilities.loadImageIcon("org/netbeans/modules/uml/resources/images/templates.png", false); // NOI18N private static final Icon TEMPLATE_FAMILY_NODE_ICON = - new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/uml/resources/images/default-category.gif")); // NOI18N + ImageUtilities.loadImageIcon("org/netbeans/modules/uml/resources/images/default-category.gif", false); // NOI18N public DomainTemplatesManagerPanel() { diff --git a/uml.documentation/src/org/netbeans/modules/uml/documentation/ui/DocumentViewAction.java b/uml.documentation/src/org/netbeans/modules/uml/documentation/ui/DocumentViewAction.java --- a/uml.documentation/src/org/netbeans/modules/uml/documentation/ui/DocumentViewAction.java +++ b/uml.documentation/src/org/netbeans/modules/uml/documentation/ui/DocumentViewAction.java @@ -63,7 +63,7 @@ public DocumentViewAction() { putValue(Action.NAME, NbBundle.getMessage(DocumentViewAction.class, "Action.Doc.Title")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/uml/documentation/ui/resources/DocPane.gif"))); // NOI18N + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/uml/documentation/ui/resources/DocPane.gif", false)); // NOI18N } public static synchronized DocumentViewAction getInstance() { diff --git a/uml.project/src/org/netbeans/modules/uml/project/ui/nodes/actions/UMLNewAction.java b/uml.project/src/org/netbeans/modules/uml/project/ui/nodes/actions/UMLNewAction.java --- a/uml.project/src/org/netbeans/modules/uml/project/ui/nodes/actions/UMLNewAction.java +++ b/uml.project/src/org/netbeans/modules/uml/project/ui/nodes/actions/UMLNewAction.java @@ -407,7 +407,7 @@ Mnemonics.setLocalizedText(item, label); if (iconRes != null) { - ImageIcon icon = new ImageIcon(ImageUtilities.loadImage(iconRes)); + ImageIcon icon = ImageUtilities.loadImageIcon(iconRes, false); item.setIcon(icon); } item.addActionListener(new SubActionListener(i, model)); diff --git a/uml.propertysupport/src/org/netbeans/modules/uml/propertysupport/customizers/ParameterCustomizerPanel.java b/uml.propertysupport/src/org/netbeans/modules/uml/propertysupport/customizers/ParameterCustomizerPanel.java --- a/uml.propertysupport/src/org/netbeans/modules/uml/propertysupport/customizers/ParameterCustomizerPanel.java +++ b/uml.propertysupport/src/org/netbeans/modules/uml/propertysupport/customizers/ParameterCustomizerPanel.java @@ -822,8 +822,7 @@ if (text != null) { messageArea.setText(text); if (text.trim().length() > 0) { - errorIcon = new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/uml/resources/images/error.png")); + errorIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/uml/resources/images/error.png", false); } iconLabel.setIcon(errorIcon); // NOI18N } diff --git a/uml.propertysupport/src/org/netbeans/modules/uml/propertysupport/customizers/ReturnTypeCustomizer.java b/uml.propertysupport/src/org/netbeans/modules/uml/propertysupport/customizers/ReturnTypeCustomizer.java --- a/uml.propertysupport/src/org/netbeans/modules/uml/propertysupport/customizers/ReturnTypeCustomizer.java +++ b/uml.propertysupport/src/org/netbeans/modules/uml/propertysupport/customizers/ReturnTypeCustomizer.java @@ -402,9 +402,7 @@ if (text != null) { this.messageArea.setText(text); if (text.trim().length() > 0) { - icon = new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/uml/resources/images/error.png")); // NOI18N + icon = ImageUtilities.loadImageIcon("org/netbeans/modules/uml/resources/images/error.png", false); // NOI18N } this.messageIcon.setIcon(icon); } diff --git a/utilities/src/org/netbeans/modules/search/ResultViewPanel.java b/utilities/src/org/netbeans/modules/search/ResultViewPanel.java --- a/utilities/src/org/netbeans/modules/search/ResultViewPanel.java +++ b/utilities/src/org/netbeans/modules/search/ResultViewPanel.java @@ -180,21 +180,18 @@ //Toolbar toolBar = new JToolBar(SwingConstants.VERTICAL); - btnDisplayContext.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/search/res/context.gif", true))); //NOI18N + btnDisplayContext.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/search/res/context.gif", true)); //NOI18N btnDisplayContext.setToolTipText( NbBundle.getMessage(getClass(), "TOOLTIP_ShowContext"));//NOI18N btnDisplayContext.getAccessibleContext().setAccessibleDescription( NbBundle.getMessage(getClass(), "ACSD_ShowContext")); //NOI18N btnDisplayContext.setSelected(SHOW_CONTEXT_BY_DEFAULT); btnPrev = new JButton(); - btnPrev.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/search/res/prev.png", true))); //NOI18N + btnPrev.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/search/res/prev.png", true)); //NOI18N btnPrev.setToolTipText( NbBundle.getMessage(getClass(), "TEXT_BUTTON_PREV_MATCH"));//NOI18N); btnNext = new JButton(); - btnNext.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/search/res/next.png", true))); //NOI18N + btnNext.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/search/res/next.png", true)); //NOI18N btnNext.setToolTipText( NbBundle.getMessage(getClass(), "TEXT_BUTTON_NEXT_MATCH"));//NOI18N); diff --git a/versioning.system.cvss/src/org/netbeans/modules/versioning/system/cvss/ui/actions/status/OpenVersioningAction.java b/versioning.system.cvss/src/org/netbeans/modules/versioning/system/cvss/ui/actions/status/OpenVersioningAction.java --- a/versioning.system.cvss/src/org/netbeans/modules/versioning/system/cvss/ui/actions/status/OpenVersioningAction.java +++ b/versioning.system.cvss/src/org/netbeans/modules/versioning/system/cvss/ui/actions/status/OpenVersioningAction.java @@ -62,7 +62,7 @@ public OpenVersioningAction() { putValue("noIconInMenu", Boolean.FALSE); // NOI18N - setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/versioning/system/cvss/resources/icons/window-versioning.png"))); // NOI18N + setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/versioning/system/cvss/resources/icons/window-versioning.png", false)); // NOI18N } public String getName() { diff --git a/versioning.util/src/org/netbeans/modules/versioning/util/TableSorter.java b/versioning.util/src/org/netbeans/modules/versioning/util/TableSorter.java --- a/versioning.util/src/org/netbeans/modules/versioning/util/TableSorter.java +++ b/versioning.util/src/org/netbeans/modules/versioning/util/TableSorter.java @@ -124,8 +124,8 @@ } }; - private final Icon ICON_ASCENDING = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/openide/explorer/columnsSortedAsc.gif", true)); // NOI18N - private final Icon ICON_DESCENDING = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/openide/explorer/columnsSortedDesc.gif", true)); // NOI18N + private final Icon ICON_ASCENDING = ImageUtilities.loadImageIcon("org/netbeans/modules/openide/explorer/columnsSortedAsc.gif", true); // NOI18N + private final Icon ICON_DESCENDING = ImageUtilities.loadImageIcon("org/netbeans/modules/openide/explorer/columnsSortedDesc.gif", true); // NOI18N private Row[] viewToModel; private int[] modelToView; diff --git a/versioning/src/org/netbeans/modules/versioning/diff/DiffTooltipActionsPanel.java b/versioning/src/org/netbeans/modules/versioning/diff/DiffTooltipActionsPanel.java --- a/versioning/src/org/netbeans/modules/versioning/diff/DiffTooltipActionsPanel.java +++ b/versioning/src/org/netbeans/modules/versioning/diff/DiffTooltipActionsPanel.java @@ -56,10 +56,10 @@ */ class DiffTooltipActionsPanel extends JToolBar implements ActionListener { - private final Icon iconPrevious = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/versioning/diff/diff-prev.png")); // NOI18N - private final Icon iconNext = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/versioning/diff/diff-next.png")); // NOI18N - private final Icon iconDiff = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/versioning/diff/diff.png")); // NOI18N - private final Icon iconRollback = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/versioning/diff/rollback.png")); // NOI18N + private final Icon iconPrevious = ImageUtilities.loadImageIcon("org/netbeans/modules/versioning/diff/diff-prev.png", false); // NOI18N + private final Icon iconNext = ImageUtilities.loadImageIcon("org/netbeans/modules/versioning/diff/diff-next.png", false); // NOI18N + private final Icon iconDiff = ImageUtilities.loadImageIcon("org/netbeans/modules/versioning/diff/diff.png", false); // NOI18N + private final Icon iconRollback = ImageUtilities.loadImageIcon("org/netbeans/modules/versioning/diff/rollback.png", false); // NOI18N private final DiffActionTooltipWindow master; private final Difference diff; diff --git a/visualweb.complib/src/org/netbeans/modules/visualweb/complib/ui/ComplibChooser.java b/visualweb.complib/src/org/netbeans/modules/visualweb/complib/ui/ComplibChooser.java --- a/visualweb.complib/src/org/netbeans/modules/visualweb/complib/ui/ComplibChooser.java +++ b/visualweb.complib/src/org/netbeans/modules/visualweb/complib/ui/ComplibChooser.java @@ -246,7 +246,7 @@ String iconPath = ComplibChooser.class.getPackage().getName() .replace('.', '/') + "/images/library.png"; - icon = new ImageIcon(ImageUtilities.loadImage(iconPath)); + icon = ImageUtilities.loadImageIcon(iconPath, false); } public Component getListCellRendererComponent(JList list, Object value, diff --git a/visualweb.dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/customizers/RowSetSelectionQuery.java b/visualweb.dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/customizers/RowSetSelectionQuery.java --- a/visualweb.dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/customizers/RowSetSelectionQuery.java +++ b/visualweb.dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/customizers/RowSetSelectionQuery.java @@ -66,9 +66,9 @@ */ public class RowSetSelectionQuery extends javax.swing.JPanel { - private static final ImageIcon closedIcon = new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/visualweb/dataconnectivity/resources/sqlClosed.gif") ) ; - private static final ImageIcon openIcon = new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/visualweb/dataconnectivity/resources/sqlOpened.gif") ) ; - private static final ImageIcon emptyIcon = new ImageIcon( ImageUtilities.loadImage("org/openide/resources/actions/empty.gif") ) ; + private static final ImageIcon closedIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/visualweb/dataconnectivity/resources/sqlClosed.gif", false) ; + private static final ImageIcon openIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/visualweb/dataconnectivity/resources/sqlOpened.gif", false) ; + private static final ImageIcon emptyIcon = ImageUtilities.loadImageIcon("org/openide/resources/actions/empty.gif", false) ; boolean expanded = false ; private static final Color bgColor = (new javax.swing.JLabel() ).getBackground() ; diff --git a/visualweb.designer.jsf/src/org/netbeans/modules/visualweb/designer/jsf/action/DecorationsAction.java b/visualweb.designer.jsf/src/org/netbeans/modules/visualweb/designer/jsf/action/DecorationsAction.java --- a/visualweb.designer.jsf/src/org/netbeans/modules/visualweb/designer/jsf/action/DecorationsAction.java +++ b/visualweb.designer.jsf/src/org/netbeans/modules/visualweb/designer/jsf/action/DecorationsAction.java @@ -77,7 +77,7 @@ public DecorationsAction() { putValue(NAME, NbBundle.getMessage(DecorationsAction.class, "LBL_DecorationsActionName")); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(DecorationsAction.class, "LBL_DecorationsAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/visualweb/designer/resources/decorations.png"))); // NOI18N + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/visualweb/designer/resources/decorations.png", false)); // NOI18N DecorationManager decorationManager = DecorationManager.getDefault(); decorationManager.addPropertyChangeListener(WeakListeners.propertyChange(decorationManagerListener, decorationManager)); diff --git a/visualweb.ejb/src/org/netbeans/modules/visualweb/ejb/ui/ConfigureMethodsPanel.java b/visualweb.ejb/src/org/netbeans/modules/visualweb/ejb/ui/ConfigureMethodsPanel.java --- a/visualweb.ejb/src/org/netbeans/modules/visualweb/ejb/ui/ConfigureMethodsPanel.java +++ b/visualweb.ejb/src/org/netbeans/modules/visualweb/ejb/ui/ConfigureMethodsPanel.java @@ -97,12 +97,12 @@ MethodInfo method = ((EjbGroupTreeNodes.MethodNode)value).getMethod(); if( method.getReturnType().isCollection() && method.getReturnType().getElemClassName() == null ) // Show the warning icon to indicate to the user that extra info needed - setIcon( new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/visualweb/ejb/resources/warning.png") ) ); + setIcon( ImageUtilities.loadImageIcon("org/netbeans/modules/visualweb/ejb/resources/warning.png", false)); else - setIcon( new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/visualweb/ejb/resources/methodPublic.gif") ) ); + setIcon( ImageUtilities.loadImageIcon("org/netbeans/modules/visualweb/ejb/resources/methodPublic.gif", false)); } else { // Must be session ejb node - setIcon( new ImageIcon( ImageUtilities.loadImage("org/netbeans/modules/visualweb/ejb/resources/session_bean.png" ) ) ); + setIcon( ImageUtilities.loadImageIcon("org/netbeans/modules/visualweb/ejb/resources/session_bean.png", false)); } return this; diff --git a/vmd.analyzer/src/org/netbeans/modules/vmd/analyzer/AnalyzerEditorView.java b/vmd.analyzer/src/org/netbeans/modules/vmd/analyzer/AnalyzerEditorView.java --- a/vmd.analyzer/src/org/netbeans/modules/vmd/analyzer/AnalyzerEditorView.java +++ b/vmd.analyzer/src/org/netbeans/modules/vmd/analyzer/AnalyzerEditorView.java @@ -133,7 +133,7 @@ refreshButton.setBorderPainted (false); refreshButton.setRolloverEnabled (true); refreshButton.setSize (14, 14); - refreshButton.setIcon (new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/vmd/analyzer/resources/refresh.png"))); // NOI18N + refreshButton.setIcon (ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/analyzer/resources/refresh.png", false)); // NOI18N refreshButton.addActionListener (new ActionListener() { public void actionPerformed (ActionEvent e) { updateAnalyzers (); diff --git a/vmd.flow/src/org/netbeans/modules/vmd/flow/FlowViewController.java b/vmd.flow/src/org/netbeans/modules/vmd/flow/FlowViewController.java --- a/vmd.flow/src/org/netbeans/modules/vmd/flow/FlowViewController.java +++ b/vmd.flow/src/org/netbeans/modules/vmd/flow/FlowViewController.java @@ -131,7 +131,7 @@ } private JButton addToolbarButton (String imageResourceName, String toolTipText, ActionListener listener) { - final JButton button = new JButton (new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/vmd/flow/resources/" + imageResourceName + ".png"))); // NOI18N + final JButton button = new JButton (ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/flow/resources/" + imageResourceName + ".png", false)); // NOI18N button.setOpaque (false); button.setToolTipText (toolTipText); button.setBorderPainted (false); diff --git a/vmd.game/src/org/netbeans/modules/vmd/game/dialog/AbstractNameValidationDialog.java b/vmd.game/src/org/netbeans/modules/vmd/game/dialog/AbstractNameValidationDialog.java --- a/vmd.game/src/org/netbeans/modules/vmd/game/dialog/AbstractNameValidationDialog.java +++ b/vmd.game/src/org/netbeans/modules/vmd/game/dialog/AbstractNameValidationDialog.java @@ -26,7 +26,7 @@ */ public abstract class AbstractNameValidationDialog extends javax.swing.JPanel implements ActionListener { - private static final Icon ICON_ERROR = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/midp/resources/error.gif")); + private static final Icon ICON_ERROR = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/midp/resources/error.gif", false); private DialogDescriptor dd; private String initialTextContent; diff --git a/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/SelectImageForLayerDialog.java b/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/SelectImageForLayerDialog.java --- a/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/SelectImageForLayerDialog.java +++ b/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/SelectImageForLayerDialog.java @@ -75,7 +75,7 @@ public static final boolean DEBUG = false; - private static final Icon ICON_ERROR = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/midp/resources/error.gif")); // NOI18N + private static final Icon ICON_ERROR = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/midp/resources/error.gif", false); // NOI18N private String path; private Collection images; diff --git a/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/SpriteDialog.java b/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/SpriteDialog.java --- a/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/SpriteDialog.java +++ b/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/SpriteDialog.java @@ -98,8 +98,7 @@ private GlobalRepository gameDesign; - private static final Icon ICON_ERROR = new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/vmd/midp/resources/error.gif")); // NOI18N + private static final Icon ICON_ERROR = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/midp/resources/error.gif", false); // NOI18N private static final int DEFAULT_FRAMES = 5; private static final int DEFAULT_TILE_WIDTH = 18; diff --git a/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/TiledLayerDialog.java b/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/TiledLayerDialog.java --- a/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/TiledLayerDialog.java +++ b/vmd.game/src/org/netbeans/modules/vmd/game/nbdialog/TiledLayerDialog.java @@ -99,7 +99,7 @@ public class TiledLayerDialog extends javax.swing.JPanel implements ActionListener { private GlobalRepository gameDesign; - private static final Icon ICON_ERROR = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/midp/resources/error.gif")); // NOI18N + private static final Icon ICON_ERROR = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/midp/resources/error.gif", false); // NOI18N private static final int DEFAULT_COLS = 20; private static final int DEFAULT_ROWS = 20; private static final int DEFAULT_TILE_WIDTH = 18; diff --git a/vmd.game/src/org/netbeans/modules/vmd/game/view/GameDesignTreeNodeRenderer.java b/vmd.game/src/org/netbeans/modules/vmd/game/view/GameDesignTreeNodeRenderer.java --- a/vmd.game/src/org/netbeans/modules/vmd/game/view/GameDesignTreeNodeRenderer.java +++ b/vmd.game/src/org/netbeans/modules/vmd/game/view/GameDesignTreeNodeRenderer.java @@ -62,10 +62,10 @@ private static ImageIcon imgScene; static { - imgGame = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/game/integration/res/gamer_16.png")); - imgSprite = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/game/model/adapter/res/sprite.png")); - imgTiled = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/game/model/adapter/res/tiled.png")); - imgScene = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/game/model/adapter/res/scene.png")); + imgGame = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/game/integration/res/gamer_16.png", false); + imgSprite = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/game/model/adapter/res/sprite.png", false); + imgTiled = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/game/model/adapter/res/tiled.png", false); + imgScene = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/game/model/adapter/res/scene.png", false); } public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { diff --git a/vmd.midp.converter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConvertPanel.java b/vmd.midp.converter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConvertPanel.java --- a/vmd.midp.converter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConvertPanel.java +++ b/vmd.midp.converter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConvertPanel.java @@ -69,7 +69,7 @@ /** Creates new form ConvertPanel */ public ConvertPanel() { initComponents(); - ImageIcon warningMessage = new ImageIcon (ImageUtilities.loadImage ("org/netbeans/modules/vmd/midp/resources/warning.gif")); + ImageIcon warningMessage = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/midp/resources/warning.gif", false); finishIcon.setIcon (warningMessage); // NOI18N message.setIcon (warningMessage); // NOI18N startButton.setDefaultCapable(true); diff --git a/vmd.midp/src/org/netbeans/modules/vmd/midp/propertyeditors/api/resource/ResourceEditorPanel.java b/vmd.midp/src/org/netbeans/modules/vmd/midp/propertyeditors/api/resource/ResourceEditorPanel.java --- a/vmd.midp/src/org/netbeans/modules/vmd/midp/propertyeditors/api/resource/ResourceEditorPanel.java +++ b/vmd.midp/src/org/netbeans/modules/vmd/midp/propertyeditors/api/resource/ResourceEditorPanel.java @@ -217,7 +217,7 @@ constraints.fill = GridBagConstraints.BOTH; add(createUCAwarePanel(component), constraints); - icon = new ImageIcon(ImageUtilities.loadImage(element.getIconPath())); + icon = ImageUtilities.loadImageIcon(element.getIconPath(), false); componentsList.addFocusListener(new FocusListener() { public void focusGained(FocusEvent e) { diff --git a/vmd.midp/src/org/netbeans/modules/vmd/midp/propertyeditors/api/usercode/PropertyEditorUserCode.java b/vmd.midp/src/org/netbeans/modules/vmd/midp/propertyeditors/api/usercode/PropertyEditorUserCode.java --- a/vmd.midp/src/org/netbeans/modules/vmd/midp/propertyeditors/api/usercode/PropertyEditorUserCode.java +++ b/vmd.midp/src/org/netbeans/modules/vmd/midp/propertyeditors/api/usercode/PropertyEditorUserCode.java @@ -83,8 +83,8 @@ public static final PropertyValue NULL_VALUE = PropertyValue.createNull(); public static final String NULL_TEXT = NbBundle.getMessage(PropertyEditorUserCode.class, "LBL_STRING_NULL"); // NOI18N public static final String USER_CODE_TEXT = NbBundle.getMessage(PropertyEditorUserCode.class, "LBL_STRING_USER_CODE"); // NOI18N - private static final Icon ICON_WARNING = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/midp/resources/warning.gif")); // NOI18N - private static final Icon ICON_ERROR = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/vmd/midp/resources/error.gif")); // NOI18N + private static final Icon ICON_WARNING = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/midp/resources/warning.gif", false); // NOI18N + private static final Icon ICON_ERROR = ImageUtilities.loadImageIcon("org/netbeans/modules/vmd/midp/resources/error.gif", false); // NOI18N private CustomEditor customEditor; private JRadioButton userCodeRadioButton; private JLabel messageLabel; diff --git a/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/AlertDisplayPresenter.java b/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/AlertDisplayPresenter.java --- a/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/AlertDisplayPresenter.java +++ b/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/AlertDisplayPresenter.java @@ -66,7 +66,7 @@ public class AlertDisplayPresenter extends DisplayableDisplayPresenter { private static final String ICON_BROKEN_PATH = "org/netbeans/modules/vmd/midp/resources/screen/broken-image.png"; // NOI18N - private static final Icon ICON_BROKEN = new ImageIcon(ImageUtilities.loadImage(ICON_BROKEN_PATH)); + private static final Icon ICON_BROKEN = ImageUtilities.loadImageIcon(ICON_BROKEN_PATH, false); private JLabel imageLabel; private JLabel stringLabel; private ScreenFileObjectListener imageFileListener; diff --git a/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ChoiceElementDisplayPresenter.java b/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ChoiceElementDisplayPresenter.java --- a/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ChoiceElementDisplayPresenter.java +++ b/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ChoiceElementDisplayPresenter.java @@ -82,12 +82,12 @@ public static final String ICON_POPUP_PATH = "org/netbeans/modules/vmd/midp/resources/screen/drop-down.png"; // NOI18N public static final String ICON_BROKEN_PATH = "org/netbeans/modules/vmd/midp/resources/screen/broken-image.png"; // NOI18N - public static final Icon ICON_EMPTY_CHECKBOX = new ImageIcon(ImageUtilities.loadImage(ICON_EMPTY_CHECKBOX_PATH)); - public static final Icon ICON_CHECKBOX = new ImageIcon(ImageUtilities.loadImage(ICON_CHECKBOX_PATH)); - public static final Icon ICON_EMPTY_RADIOBUTTON = new ImageIcon(ImageUtilities.loadImage(ICON_EMPTY_RADIOBUTTON_PATH)); - public static final Icon ICON_RADIOBUTTON = new ImageIcon(ImageUtilities.loadImage(ICON_RADIOBUTTON_PATH)); - public static final Icon ICON_POPUP = new ImageIcon(ImageUtilities.loadImage(ICON_POPUP_PATH)); - public static final Icon ICON_BROKEN = new ImageIcon(ImageUtilities.loadImage(ICON_BROKEN_PATH)); + public static final Icon ICON_EMPTY_CHECKBOX = ImageUtilities.loadImageIcon(ICON_EMPTY_CHECKBOX_PATH, false); + public static final Icon ICON_CHECKBOX = ImageUtilities.loadImageIcon(ICON_CHECKBOX_PATH, false); + public static final Icon ICON_EMPTY_RADIOBUTTON = ImageUtilities.loadImageIcon(ICON_EMPTY_RADIOBUTTON_PATH, false); + public static final Icon ICON_RADIOBUTTON = ImageUtilities.loadImageIcon(ICON_RADIOBUTTON_PATH, false); + public static final Icon ICON_POPUP = ImageUtilities.loadImageIcon(ICON_POPUP_PATH, false); + public static final Icon ICON_BROKEN = ImageUtilities.loadImageIcon(ICON_BROKEN_PATH, false); private JPanel view; private JLabel state; diff --git a/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ImageItemDisplayPresenter.java b/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ImageItemDisplayPresenter.java --- a/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ImageItemDisplayPresenter.java +++ b/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ImageItemDisplayPresenter.java @@ -65,7 +65,7 @@ public class ImageItemDisplayPresenter extends ItemDisplayPresenter { private static final String ICON_BROKEN_PATH = "org/netbeans/modules/vmd/midp/resources/screen/broken-image.png"; // NOI18N - private static final Icon ICON_BROKEN = new ImageIcon(ImageUtilities.loadImage(ICON_BROKEN_PATH)); + private static final Icon ICON_BROKEN = ImageUtilities.loadImageIcon(ICON_BROKEN_PATH, false); private JLabel label; private ScreenFileObjectListener imageFileListener; private FileObject imageFileObject; diff --git a/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ListElementEventSourceDisplayPresenter.java b/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ListElementEventSourceDisplayPresenter.java --- a/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ListElementEventSourceDisplayPresenter.java +++ b/vmd.midp/src/org/netbeans/modules/vmd/midp/screen/display/ListElementEventSourceDisplayPresenter.java @@ -76,7 +76,7 @@ public class ListElementEventSourceDisplayPresenter extends ScreenDisplayPresenter { private static final String ICON_BROKEN_PATH = "org/netbeans/modules/vmd/midp/resources/screen/broken-image.png"; // NOI18N - private static final Icon ICON_BROKEN = new ImageIcon(ImageUtilities.loadImage(ICON_BROKEN_PATH)); + private static final Icon ICON_BROKEN = ImageUtilities.loadImageIcon(ICON_BROKEN_PATH, false); private JPanel view; private JLabel state; private JLabel image; diff --git a/vmd.midpnb/src/org/netbeans/modules/vmd/midpnb/screen/display/AbstractInfoDisplayPresenter.java b/vmd.midpnb/src/org/netbeans/modules/vmd/midpnb/screen/display/AbstractInfoDisplayPresenter.java --- a/vmd.midpnb/src/org/netbeans/modules/vmd/midpnb/screen/display/AbstractInfoDisplayPresenter.java +++ b/vmd.midpnb/src/org/netbeans/modules/vmd/midpnb/screen/display/AbstractInfoDisplayPresenter.java @@ -68,7 +68,7 @@ public class AbstractInfoDisplayPresenter extends DisplayableDisplayPresenter { private static final String ICON_BROKEN_PATH = "org/netbeans/modules/vmd/midpnb/resources/broken-image.png"; // NOI18N - private static final Icon ICON_BROKEN = new ImageIcon(ImageUtilities.loadImage(ICON_BROKEN_PATH)); + private static final Icon ICON_BROKEN = ImageUtilities.loadImageIcon(ICON_BROKEN_PATH, false); private JLabel imageLabel; private JLabel stringLabel; private ScreenFileObjectListener imageFileListener; diff --git a/web.client.tools.impl/src/org/netbeans/modules/web/client/javascript/debugger/http/ui/HttpMonitorAction.java b/web.client.tools.impl/src/org/netbeans/modules/web/client/javascript/debugger/http/ui/HttpMonitorAction.java --- a/web.client.tools.impl/src/org/netbeans/modules/web/client/javascript/debugger/http/ui/HttpMonitorAction.java +++ b/web.client.tools.impl/src/org/netbeans/modules/web/client/javascript/debugger/http/ui/HttpMonitorAction.java @@ -20,7 +20,7 @@ public HttpMonitorAction() { // When changed, update also mf-layer.xml, where are the properties duplicated because of Actions.alwaysEnabled() super(NbBundle.getMessage(HttpMonitorAction.class, "CTL_HttpMonitorAction")); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage(HttpMonitorTopComponent.ICON_PATH, true))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(HttpMonitorTopComponent.ICON_PATH, true)); } public void actionPerformed(ActionEvent evt) { diff --git a/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/AttrSupports.java b/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/AttrSupports.java --- a/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/AttrSupports.java +++ b/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/AttrSupports.java @@ -390,7 +390,7 @@ /** Support for code completing of package and class. */ public static class FilenameSupport extends AttributeValueSupport.Default { static final ImageIcon PACKAGE_ICON = - new ImageIcon(ImageUtilities.loadImage("org/openide/loaders/defaultFolder.gif")); // NOI18N + ImageUtilities.loadImageIcon("org/openide/loaders/defaultFolder.gif", false); // NOI18N public FilenameSupport(boolean tag, String longName, String attrName) { super(tag, longName, attrName); diff --git a/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionItem.java b/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionItem.java --- a/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionItem.java +++ b/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionItem.java @@ -921,10 +921,10 @@ ImageIcon icon = null; switch (type) { case ELImplicitObjects.OBJECT_TYPE: - icon = new ImageIcon(ImageUtilities.loadImage(OBJECT_PATH)); + icon = ImageUtilities.loadImageIcon(OBJECT_PATH, false); break; case ELImplicitObjects.MAP_TYPE: - icon = new ImageIcon(ImageUtilities.loadImage(MAP_PATH)); + icon = ImageUtilities.loadImageIcon(MAP_PATH, false); break; } return icon; @@ -982,7 +982,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(BEAN_PATH)); + return ImageUtilities.loadImageIcon(BEAN_PATH, false); } } @@ -1002,7 +1002,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(PROPERTY_PATH)); + return ImageUtilities.loadImageIcon(PROPERTY_PATH, false); } } @@ -1037,7 +1037,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(ICON_PATH)); + return ImageUtilities.loadImageIcon(ICON_PATH, false); } @Override diff --git a/web.jsf/src/org/netbeans/modules/web/jsf/editor/jspel/JSFResultItem.java b/web.jsf/src/org/netbeans/modules/web/jsf/editor/jspel/JSFResultItem.java --- a/web.jsf/src/org/netbeans/modules/web/jsf/editor/jspel/JSFResultItem.java +++ b/web.jsf/src/org/netbeans/modules/web/jsf/editor/jspel/JSFResultItem.java @@ -67,7 +67,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(BEAN_PATH)); + return ImageUtilities.loadImageIcon(BEAN_PATH, false); } } @@ -81,7 +81,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(METHOD_PATH)); + return ImageUtilities.loadImageIcon(METHOD_PATH, false); } } @@ -99,7 +99,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(BUNDLE_ICON_PATH)); + return ImageUtilities.loadImageIcon(BUNDLE_ICON_PATH, false); } } @@ -113,7 +113,7 @@ @Override protected ImageIcon getIcon() { - return new ImageIcon(ImageUtilities.loadImage(BUNDLE_ICON_PATH)); + return ImageUtilities.loadImageIcon(BUNDLE_ICON_PATH, false); } } } diff --git a/web.project/src/org/netbeans/modules/web/project/WebProject.java b/web.project/src/org/netbeans/modules/web/project/WebProject.java --- a/web.project/src/org/netbeans/modules/web/project/WebProject.java +++ b/web.project/src/org/netbeans/modules/web/project/WebProject.java @@ -177,7 +177,7 @@ private static final Logger LOGGER = Logger.getLogger(WebProject.class.getName()); - private static final Icon WEB_PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/web/project/ui/resources/webProjectIcon.gif")); // NOI18 + private static final Icon WEB_PROJECT_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/web/project/ui/resources/webProjectIcon.gif", false); // NOI18 private static final Pattern TLD_PATTERN = Pattern.compile("(META-INF/.*\\.tld)|(META-INF/tlds/.*\\.tld)"); diff --git a/web.project/src/org/netbeans/modules/web/project/WebProjectType.java b/web.project/src/org/netbeans/modules/web/project/WebProjectType.java --- a/web.project/src/org/netbeans/modules/web/project/WebProjectType.java +++ b/web.project/src/org/netbeans/modules/web/project/WebProjectType.java @@ -95,6 +95,6 @@ } public Icon getIcon() { - return ImageUtilities.image2Icon(ImageUtilities.loadImage("org/netbeans/modules/web/project/ui/resources/webProjectIcon.gif", true)); + return ImageUtilities.loadImageIcon("org/netbeans/modules/web/project/ui/resources/webProjectIcon.gif", true); } } diff --git a/websvc.axis2/src/org/netbeans/modules/websvc/axis2/options/Axis2OptionsCategory.java b/websvc.axis2/src/org/netbeans/modules/websvc/axis2/options/Axis2OptionsCategory.java --- a/websvc.axis2/src/org/netbeans/modules/websvc/axis2/options/Axis2OptionsCategory.java +++ b/websvc.axis2/src/org/netbeans/modules/websvc/axis2/options/Axis2OptionsCategory.java @@ -53,7 +53,7 @@ @Override public Icon getIcon() { - return new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/websvc/axis2/resources/axis_options_32.png")); // NOI18N + return ImageUtilities.loadImageIcon("org/netbeans/modules/websvc/axis2/resources/axis_options_32.png", false); // NOI18N } public String getCategoryName() { diff --git a/websvc.core/src/org/netbeans/modules/websvc/editor/completion/WSCompletionItem.java b/websvc.core/src/org/netbeans/modules/websvc/editor/completion/WSCompletionItem.java --- a/websvc.core/src/org/netbeans/modules/websvc/editor/completion/WSCompletionItem.java +++ b/websvc.core/src/org/netbeans/modules/websvc/editor/completion/WSCompletionItem.java @@ -170,7 +170,7 @@ this.displayPath = displayPath; } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(FILE_ICON)); + if (icon == null) icon = ImageUtilities.loadImageIcon(FILE_ICON, false); return icon; } protected String getLeftHtmlText() { @@ -206,7 +206,7 @@ this.itemType=itemType; } protected ImageIcon getIcon(){ - if (icon == null) icon = new ImageIcon(ImageUtilities.loadImage(ENUM_ICON)); + if (icon == null) icon = ImageUtilities.loadImageIcon(ENUM_ICON, false); return icon; } protected String getLeftHtmlText() { diff --git a/websvc.design/src/org/netbeans/modules/websvc/design/view/actions/AddOperationAction.java b/websvc.design/src/org/netbeans/modules/websvc/design/view/actions/AddOperationAction.java --- a/websvc.design/src/org/netbeans/modules/websvc/design/view/actions/AddOperationAction.java +++ b/websvc.design/src/org/netbeans/modules/websvc/design/view/actions/AddOperationAction.java @@ -71,8 +71,7 @@ */ public AddOperationAction(Service service, FileObject implementationClass) { super(getName()); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage - ("org/netbeans/modules/websvc/design/view/resources/operation.png"))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/websvc/design/view/resources/operation.png", false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(AddOperationAction.class, "Hint_AddOperation")); putValue(MNEMONIC_KEY, Integer.valueOf(NbBundle.getMessage(AddOperationAction.class, "LBL_AddOperation_mnem_pos"))); this.service=service; diff --git a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddBodyElementAction.java b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddBodyElementAction.java --- a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddBodyElementAction.java +++ b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddBodyElementAction.java @@ -78,8 +78,7 @@ public AddBodyElementAction(ParamStyle type, T parent, WadlModel model) { super(NbBundle.getMessage(AddBodyElementAction.class, "LBL_AddBodyElement", getType(parent instanceof Response))); - putValue(SMALL_ICON, new ImageIcon( - ImageUtilities.loadImage("org/netbeans/modules/websvc/rest/wadl/design/view/resources/method.png"))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/websvc/rest/wadl/design/view/resources/method.png", false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(AddBodyElementAction.class, "Hint_AddBodyElement", getType(parent instanceof Response))); putValue(MNEMONIC_KEY, Integer.valueOf(NbBundle.getMessage(AddBodyElementAction.class, diff --git a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddMethodAction.java b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddMethodAction.java --- a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddMethodAction.java +++ b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddMethodAction.java @@ -74,8 +74,7 @@ */ public AddMethodAction(ResourceType resource, String resourcePath, WadlModel model) { super(getName()); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage - ("org/netbeans/modules/websvc/rest/wadl/design/view/resources/method.png"))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/websvc/rest/wadl/design/view/resources/method.png", false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(AddMethodAction.class, "Hint_AddMethod")); putValue(MNEMONIC_KEY, Integer.valueOf(NbBundle.getMessage(AddMethodAction.class, "LBL_AddMethod_mnem_pos"))); this.resource=resource; diff --git a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddParamAction.java b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddParamAction.java --- a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddParamAction.java +++ b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddParamAction.java @@ -76,8 +76,7 @@ */ public AddParamAction(ParamStyle type, T parent, T ancestor, WadlModel model) { super(getName()); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage - ("org/netbeans/modules/websvc/rest/wadl/design/view/resources/method.png"))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/websvc/rest/wadl/design/view/resources/method.png", false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(AddParamAction.class, "Hint_AddParam")); putValue(MNEMONIC_KEY, Integer.valueOf(NbBundle.getMessage(AddParamAction.class, "LBL_AddParam_mnem_pos"))); this.type = type; diff --git a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddResourceAction.java b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddResourceAction.java --- a/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddResourceAction.java +++ b/websvc.rest.wadl.design/src/org/netbeans/modules/websvc/rest/wadl/design/view/actions/AddResourceAction.java @@ -77,8 +77,7 @@ */ public AddResourceAction(Object parent, WadlModel model) { super(getName()); - putValue(SMALL_ICON, new ImageIcon(ImageUtilities.loadImage - ("org/netbeans/modules/websvc/rest/wadl/design/view/resources/resource.png"))); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon("org/netbeans/modules/websvc/rest/wadl/design/view/resources/resource.png", false)); putValue(SHORT_DESCRIPTION, NbBundle.getMessage(AddResourceAction.class, "Hint_AddResource")); putValue(MNEMONIC_KEY, Integer.valueOf(NbBundle.getMessage(AddResourceAction.class, "LBL_AddResource_mnem_pos"))); this.parent=parent; diff --git a/welcome/src/org/netbeans/modules/welcome/content/LinkButton.java b/welcome/src/org/netbeans/modules/welcome/content/LinkButton.java --- a/welcome/src/org/netbeans/modules/welcome/content/LinkButton.java +++ b/welcome/src/org/netbeans/modules/welcome/content/LinkButton.java @@ -70,7 +70,7 @@ private boolean underline = false; - final ImageIcon BULLET_ICON = new ImageIcon( ImageUtilities.loadImage( BULLET_IMAGE ) ); + final ImageIcon BULLET_ICON = ImageUtilities.loadImageIcon(BULLET_IMAGE, false); public LinkButton( String label, boolean showBullet ) { super( label ); diff --git a/welcome/src/org/netbeans/modules/welcome/content/Logo.java b/welcome/src/org/netbeans/modules/welcome/content/Logo.java --- a/welcome/src/org/netbeans/modules/welcome/content/Logo.java +++ b/welcome/src/org/netbeans/modules/welcome/content/Logo.java @@ -73,7 +73,7 @@ /** Creates a new instance of RecentProjects */ public Logo( String img, String url ) { super( new BorderLayout() ); - Icon image = new ImageIcon(ImageUtilities.loadImage(img, true)); + Icon image = ImageUtilities.loadImageIcon(img, true); JLabel label = new JLabel( image ); label.setBorder( BorderFactory.createEmptyBorder() ); label.setOpaque( false ); diff --git a/welcome/src/org/netbeans/modules/welcome/ui/DemoPanel.java b/welcome/src/org/netbeans/modules/welcome/ui/DemoPanel.java --- a/welcome/src/org/netbeans/modules/welcome/ui/DemoPanel.java +++ b/welcome/src/org/netbeans/modules/welcome/ui/DemoPanel.java @@ -216,7 +216,7 @@ } catch( Exception e ) { Logger.getLogger( DemoPanel.class.getName() ).log( Level.FINE, "Error while caching Welcome Page demo image", e ); //NOI18N - image = new ImageIcon( ImageUtilities.loadImage( Constants.BROKEN_IMAGE ) ); + image = ImageUtilities.loadImageIcon(Constants.BROKEN_IMAGE, false); } finally { if( null != output ) { try { output.close(); } catch( IOException e ) {} diff --git a/xml.catalogsupport/src/org/netbeans/modules/xml/catalogsupport/ui/customizer/CustomizerProjectReferences.java b/xml.catalogsupport/src/org/netbeans/modules/xml/catalogsupport/ui/customizer/CustomizerProjectReferences.java --- a/xml.catalogsupport/src/org/netbeans/modules/xml/catalogsupport/ui/customizer/CustomizerProjectReferences.java +++ b/xml.catalogsupport/src/org/netbeans/modules/xml/catalogsupport/ui/customizer/CustomizerProjectReferences.java @@ -346,8 +346,7 @@ ReferenceHelper.RawReference missingRef; - static Icon icon = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/java/j2seproject/ui/resources/brokenProjectBadge.gif")); // NOI18N + static Icon icon = ImageUtilities.loadImageIcon("org/netbeans/modules/java/j2seproject/ui/resources/brokenProjectBadge.gif", false); // NOI18N public MissingProjectInformation(ReferenceHelper.RawReference missingRef) { this.missingRef = missingRef; diff --git a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/DeleteRefactoringUI.java b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/DeleteRefactoringUI.java --- a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/DeleteRefactoringUI.java +++ b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/DeleteRefactoringUI.java @@ -231,10 +231,7 @@ } public Icon getCustomIcon() { - return new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/xml/refactoring/resources/"+ - "graphical_view_refactoring.png")); + return ImageUtilities.loadImageIcon("org/netbeans/modules/xml/refactoring/resources/" + "graphical_view_refactoring.png", false); } public String getCustomToolTip() { diff --git a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/FileRenameRefactoringUI.java b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/FileRenameRefactoringUI.java --- a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/FileRenameRefactoringUI.java +++ b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/FileRenameRefactoringUI.java @@ -271,10 +271,7 @@ } public Icon getCustomIcon() { - return new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/xml/refactoring/resources/"+ - "graphical_view_refactoring.png")); + return ImageUtilities.loadImageIcon("org/netbeans/modules/xml/refactoring/resources/" + "graphical_view_refactoring.png", false); } public String getCustomToolTip() { diff --git a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/GraphHelper.java b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/GraphHelper.java --- a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/GraphHelper.java +++ b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/GraphHelper.java @@ -93,10 +93,7 @@ */ public class GraphHelper { - private static final ImageIcon FIND_USAGES_ICON = new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/refactoring/api/resources/"+ - "findusages.png")); + private static final ImageIcon FIND_USAGES_ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/refactoring/api/resources/" + "findusages.png", false); public static final prefuse.data.Schema FIND_USAGES_NODES_SCHEMA = new prefuse.data.Schema(); // prefuse graph schema diff --git a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/MoveRefactoringUI.java b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/MoveRefactoringUI.java --- a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/MoveRefactoringUI.java +++ b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/MoveRefactoringUI.java @@ -209,10 +209,7 @@ } public Icon getCustomIcon() { - return new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/xml/refactoring/resources/"+ - "graphical_view_refactoring.png")); + return ImageUtilities.loadImageIcon("org/netbeans/modules/xml/refactoring/resources/" + "graphical_view_refactoring.png", false); } public String getCustomToolTip() { diff --git a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/RenameRefactoringUI.java b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/RenameRefactoringUI.java --- a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/RenameRefactoringUI.java +++ b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/RenameRefactoringUI.java @@ -322,10 +322,7 @@ } public Icon getCustomIcon() { - return new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/xml/refactoring/resources/"+ - "graphical_view_refactoring.png")); + return ImageUtilities.loadImageIcon("org/netbeans/modules/xml/refactoring/resources/" + "graphical_view_refactoring.png", false); } public String getCustomToolTip() { diff --git a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/WhereUsedQueryUI.java b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/WhereUsedQueryUI.java --- a/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/WhereUsedQueryUI.java +++ b/xml.refactoring/src/org/netbeans/modules/xml/refactoring/ui/WhereUsedQueryUI.java @@ -234,10 +234,7 @@ } public Icon getCustomIcon() { - return new ImageIcon( - ImageUtilities.loadImage( - "org/netbeans/modules/xml/refactoring/resources/"+ - "graphical_view_refactoring.png")); + return ImageUtilities.loadImageIcon("org/netbeans/modules/xml/refactoring/resources/" + "graphical_view_refactoring.png", false); } public String getCustomToolTip() { diff --git a/xml.text/src/org/netbeans/modules/xml/text/navigator/NavigatorContent.java b/xml.text/src/org/netbeans/modules/xml/text/navigator/NavigatorContent.java --- a/xml.text/src/org/netbeans/modules/xml/text/navigator/NavigatorContent.java +++ b/xml.text/src/org/netbeans/modules/xml/text/navigator/NavigatorContent.java @@ -468,15 +468,13 @@ desc.addFilter(ATTRIBUTES_FILTER, NbBundle.getMessage(NavigatorContent.class, "LBL_ShowAttributes"), //NOI18N NbBundle.getMessage(NavigatorContent.class, "LBL_ShowAttributesTip"), //NOI18N - showAttributes, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/xml/text/navigator/resources/a.png")), //NOI18N + showAttributes, ImageUtilities.loadImageIcon("org/netbeans/modules/xml/text/navigator/resources/a.png", false), //NOI18N null ); desc.addFilter(CONTENT_FILTER, NbBundle.getMessage(NavigatorContent.class, "LBL_ShowContent"), //NOI18N NbBundle.getMessage(NavigatorContent.class, "LBL_ShowContentTip"), //NOI18N - showContent, - new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/xml/text/navigator/resources/content.png")), //NOI18N + showContent, ImageUtilities.loadImageIcon("org/netbeans/modules/xml/text/navigator/resources/content.png", false), //NOI18N null ); diff --git a/xml.text/src/org/netbeans/modules/xml/text/navigator/NavigatorTreeCellRenderer.java b/xml.text/src/org/netbeans/modules/xml/text/navigator/NavigatorTreeCellRenderer.java --- a/xml.text/src/org/netbeans/modules/xml/text/navigator/NavigatorTreeCellRenderer.java +++ b/xml.text/src/org/netbeans/modules/xml/text/navigator/NavigatorTreeCellRenderer.java @@ -116,7 +116,7 @@ } private ImageIcon getImageIcon(String name, boolean error){ - ImageIcon icon = new ImageIcon(ImageUtilities.loadImage(name)); + ImageIcon icon = ImageUtilities.loadImageIcon(name, false); if(error) return new ImageIcon(ImageUtilities.mergeImages( icon.getImage(), ERROR_IMAGE, 15, 7 )); else diff --git a/xml.text/src/org/netbeans/modules/xml/text/navigator/base/AbstractXMLNavigatorContent.java b/xml.text/src/org/netbeans/modules/xml/text/navigator/base/AbstractXMLNavigatorContent.java --- a/xml.text/src/org/netbeans/modules/xml/text/navigator/base/AbstractXMLNavigatorContent.java +++ b/xml.text/src/org/netbeans/modules/xml/text/navigator/base/AbstractXMLNavigatorContent.java @@ -145,8 +145,7 @@ public void showWaitPanel() { removeAll(); if (waitIcon == null) { - waitIcon = new ImageIcon( ImageUtilities.loadImage( - "org/netbeans/modules/xml/text/navigator/resources/wait.gif" ) ); //NOI18N + waitIcon = ImageUtilities.loadImageIcon("org/netbeans/modules/xml/text/navigator/resources/wait.gif", false); //NOI18N } msgLabel.setIcon(waitIcon); msgLabel.setHorizontalAlignment(SwingConstants.LEFT); diff --git a/xml.validation/src/org/netbeans/modules/xml/validation/ValidateAction.java b/xml.validation/src/org/netbeans/modules/xml/validation/ValidateAction.java --- a/xml.validation/src/org/netbeans/modules/xml/validation/ValidateAction.java +++ b/xml.validation/src/org/netbeans/modules/xml/validation/ValidateAction.java @@ -70,8 +70,7 @@ private static final long serialVersionUID = 1L; public static final String ACCELERATOR = "alt shift F9"; // NOI18N - private static final Icon icon = new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/xml/validation/resources/validation.png")); + private static final Icon icon = ImageUtilities.loadImageIcon("org/netbeans/modules/xml/validation/resources/validation.png", false); private static final String label = NbBundle.getMessage( ValidateAction.class,"NAME_Validate_XML"); private Model model; diff --git a/xml.wsdlui/src/org/netbeans/modules/xml/wsdl/ui/actions/CommonAddExtensibilityAttributeAction.java b/xml.wsdlui/src/org/netbeans/modules/xml/wsdl/ui/actions/CommonAddExtensibilityAttributeAction.java --- a/xml.wsdlui/src/org/netbeans/modules/xml/wsdl/ui/actions/CommonAddExtensibilityAttributeAction.java +++ b/xml.wsdlui/src/org/netbeans/modules/xml/wsdl/ui/actions/CommonAddExtensibilityAttributeAction.java @@ -69,9 +69,7 @@ * */ private static final long serialVersionUID = 2110730939475660217L; - private static final ImageIcon ICON = new ImageIcon - (ImageUtilities.loadImage - ("org/netbeans/modules/xml/wsdl/ui/view/resources/message.png")); + private static final ImageIcon ICON = ImageUtilities.loadImageIcon("org/netbeans/modules/xml/wsdl/ui/view/resources/message.png", false); public CommonAddExtensibilityAttributeAction() { this.setIcon(ICON); diff --git a/xml.wsdlui/src/org/netbeans/modules/xml/wsdl/ui/view/common/CommonMessagePanel.java b/xml.wsdlui/src/org/netbeans/modules/xml/wsdl/ui/view/common/CommonMessagePanel.java --- a/xml.wsdlui/src/org/netbeans/modules/xml/wsdl/ui/view/common/CommonMessagePanel.java +++ b/xml.wsdlui/src/org/netbeans/modules/xml/wsdl/ui/view/common/CommonMessagePanel.java @@ -125,7 +125,7 @@ jTextArea2.setToolTipText(errorMsg); jTextArea2.setForeground (nbErrorForeground); jTextArea2.repaint(); - jLabel1.setIcon(new ImageIcon(ImageUtilities.loadImage("org/netbeans/modules/xml/wsdl/ui/view/common/resources/error.gif"))); + jLabel1.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/xml/wsdl/ui/view/common/resources/error.gif", false)); jLabel1.setToolTipText(errorMsg); mValidState = false; } diff --git a/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/ExternalReferenceCreator.java b/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/ExternalReferenceCreator.java --- a/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/ExternalReferenceCreator.java +++ b/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/ExternalReferenceCreator.java @@ -370,8 +370,7 @@ messageLabel.setIcon(null); } else { messageLabel.setText(msg); - messageLabel.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/xml/xam/ui/resources/error.gif"))); // NOI18N + messageLabel.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/xml/xam/ui/resources/error.gif", false)); // NOI18N } } diff --git a/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/ExternalReferenceCustomizer.java b/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/ExternalReferenceCustomizer.java --- a/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/ExternalReferenceCustomizer.java +++ b/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/ExternalReferenceCustomizer.java @@ -350,8 +350,7 @@ messageLabel.setIcon(null); } else { messageLabel.setText(msg); - messageLabel.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/xml/xam/ui/resources/error.gif"))); // NOI18N + messageLabel.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/xml/xam/ui/resources/error.gif", false)); // NOI18N } } diff --git a/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/MessagePanel.java b/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/MessagePanel.java --- a/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/MessagePanel.java +++ b/xml.xam.ui/src/org/netbeans/modules/xml/xam/ui/customizer/MessagePanel.java @@ -100,12 +100,10 @@ { case ERROR: messageLabel.setForeground(Color.RED); - messageLabel.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/xml/xam/ui/resources/error.gif"))); // NOI18N + messageLabel.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/xml/xam/ui/resources/error.gif", false)); // NOI18N break; case WARNING: - messageLabel.setIcon(new ImageIcon(ImageUtilities.loadImage( - "org/netbeans/modules/xml/xam/ui/resources/warning.gif"))); // NOI18N + messageLabel.setIcon(ImageUtilities.loadImageIcon("org/netbeans/modules/xml/xam/ui/resources/warning.gif", false)); // NOI18N break; case INFO: default: diff --git a/xslt.project/src/org/netbeans/modules/xslt/project/XsltproProject.java b/xslt.project/src/org/netbeans/modules/xslt/project/XsltproProject.java --- a/xslt.project/src/org/netbeans/modules/xslt/project/XsltproProject.java +++ b/xslt.project/src/org/netbeans/modules/xslt/project/XsltproProject.java @@ -88,7 +88,7 @@ */ public class XsltproProject implements Project, AntProjectListener { - private static final Icon PROJECT_ICON = new ImageIcon(ImageUtilities.loadImage(XSLT_PROJECT_ICON)); // NOI18N + private static final Icon PROJECT_ICON = ImageUtilities.loadImageIcon(XSLT_PROJECT_ICON, false); // NOI18N public static final String SOURCES_TYPE_XSLTPRO = "BIZPRO"; public static final String ARTIFACT_TYPE_JBI_ASA = "CAPS.asa";