4632N/A static UIResource getIconFor(final JRSUIControlSpec spec, final int width, final int height) {
4632N/A final int w = i.getIconWidth();
4632N/A final int h = i.getIconHeight();
4632N/A // This could be any kind of icon, so we need to make a buffer for it, draw it and then pass the new image off to appkit.
4632N/A protected final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance());
4632N/A final Size size = c instanceof JComponent ? AquaUtilControlSize.getUserSizeFrom((JComponent)c) : Size.REGULAR;
4632N/A final BufferedImage halfImage = new BufferedImage(halfImgW, halfImgH, BufferedImage.TYPE_INT_ARGB);
4632N/A ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
4632N/A if (g instanceof Graphics2D) {
4632N/A ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
4632N/A final BufferedImage img = new BufferedImage(getIconWidth(), getIconHeight(), BufferedImage.TYPE_INT_ARGB_PRE);
4632N/A return AquaUtils.getCImageCreator().createImageOfFile(file.getAbsolutePath(), getIconWidth(), getIconHeight());
4632N/A private static final SystemIconUIResourceSingleton folderIcon = new SystemIconUIResourceSingleton("fldr");
4632N/A private static final SystemIconUIResourceSingleton openFolderIcon = new SystemIconUIResourceSingleton("ofld");
4632N/A private static final SystemIconUIResourceSingleton desktopIcon = new SystemIconUIResourceSingleton("desk");
4632N/A private static final SystemIconUIResourceSingleton computerIcon = new SystemIconUIResourceSingleton("FNDR");
4632N/A private static final SystemIconUIResourceSingleton documentIcon = new SystemIconUIResourceSingleton("docu");
4632N/A private static final SystemIconUIResourceSingleton hardDriveIcon = new SystemIconUIResourceSingleton("hdsk");
4632N/A private static final SystemIconUIResourceSingleton floppyIcon = new SystemIconUIResourceSingleton("flpy");
4632N/A //private static final SystemIconUIResourceSingleton noteIcon = new SystemIconUIResourceSingleton("note");