Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 java.desktop.jmod - Desktop Module
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module.
JDK 17 Desktop module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.desktop.jmod.
JDK 17 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Desktop module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/apple/laf/AquaIcon.java
/* * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.apple.laf; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import javax.swing.*; import javax.swing.plaf.*; import apple.laf.JRSUIConstants.Size; import apple.laf.*; import com.apple.laf.AquaUtilControlSize.*; import com.apple.laf.AquaUtils.RecyclableSingleton; import sun.lwawt.macosx.CImage; public class AquaIcon { interface InvertableIcon extends Icon { public Icon getInvertedIcon(); } static UIResource getIconFor(final JRSUIControlSpec spec, final int width, final int height) { return new ScalingJRSUIIcon(width, height) { @Override public void initIconPainter(final AquaPainter<JRSUIState> painter) { spec.initIconPainter(painter); } }; } // converts an object that is an icon into an image so we can hand it off to AppKit public static Image getImageForIcon(final Icon i) { if (i instanceof ImageIcon) return ((ImageIcon)i).getImage(); final int w = i.getIconWidth(); final int h = i.getIconHeight(); if (w <= 0 || h <= 0) return null; // 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. final BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE); final Graphics g = image.getGraphics(); i.paintIcon(null, g, 0, 0); g.dispose(); return image; } public interface JRSUIControlSpec { public void initIconPainter(final AquaPainter<? extends JRSUIState> painter); } abstract static class JRSUIIcon implements Icon, UIResource { protected final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance()); public void paintIcon(final Component c, final Graphics g, final int x, final int y) { painter.paint(g, c, x, y, getIconWidth(), getIconHeight()); } } abstract static class DynamicallySizingJRSUIIcon extends JRSUIIcon { protected final SizeDescriptor sizeDescriptor; protected SizeVariant sizeVariant; public DynamicallySizingJRSUIIcon(final SizeDescriptor sizeDescriptor) { this.sizeDescriptor = sizeDescriptor; this.sizeVariant = sizeDescriptor.regular; initJRSUIState(); } public abstract void initJRSUIState(); public int getIconHeight() { return sizeVariant == null ? 0 : sizeVariant.h; } public int getIconWidth() { return sizeVariant == null ? 0 : sizeVariant.w; } public void paintIcon(final Component c, final Graphics g, final int x, final int y) { final Size size = c instanceof JComponent ? AquaUtilControlSize.getUserSizeFrom((JComponent)c) : Size.REGULAR; sizeVariant = sizeDescriptor.get(size); painter.state.set(size); super.paintIcon(c, g, x, y); } } abstract static class CachingScalingIcon implements Icon, UIResource { int width; int height; Image image; public CachingScalingIcon(final int width, final int height) { this.width = width; this.height = height; } void setSize(final int width, final int height) { this.width = width; this.height = height; this.image = null; } Image getImage() { if (image != null) return image; if (!GraphicsEnvironment.isHeadless()) { image = createImage(); } return image; } abstract Image createImage(); public boolean hasIconRef() { return getImage() != null; } public void paintIcon(final Component c, Graphics g, final int x, final int y) { g = g.create(); if (g instanceof Graphics2D) { // improves icon rendering quality in Quartz ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); } final Image myImage = getImage(); if (myImage != null) { g.drawImage(myImage, x, y, getIconWidth(), getIconHeight(), null); } g.dispose(); } public int getIconWidth() { return width; } public int getIconHeight() { return height; } } abstract static class ScalingJRSUIIcon implements Icon, UIResource { final int width; final int height; public ScalingJRSUIIcon(final int width, final int height) { this.width = width; this.height = height; } @Override public void paintIcon(final Component c, Graphics g, final int x, final int y) { if (GraphicsEnvironment.isHeadless()) { return; } g = g.create(); if (g instanceof Graphics2D) { // improves icon rendering quality in Quartz ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); } final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance()); initIconPainter(painter); g.clipRect(x, y, width, height); painter.paint(g, c, x, y, width, height); g.dispose(); } public abstract void initIconPainter(final AquaPainter<JRSUIState> painter); @Override public int getIconWidth() { return width; } @Override public int getIconHeight() { return height; } } static class FileIcon extends CachingScalingIcon { final File file; public FileIcon(final File file, final int width, final int height) { super(width, height); this.file = file; } public FileIcon(final File file) { this(file, 16, 16); } Image createImage() { return CImage.createImageOfFile(file.getAbsolutePath(), getIconWidth(), getIconHeight()); } } static class SystemIconSingleton extends RecyclableSingleton<SystemIcon> { final String selector; public SystemIconSingleton(String selector) { this.selector = selector; } @Override protected SystemIcon getInstance() { return new SystemIcon(selector); } } static class SystemIconUIResourceSingleton extends RecyclableSingleton<IconUIResource> { final String selector; public SystemIconUIResourceSingleton(String selector) { this.selector = selector; } @Override protected IconUIResource getInstance() { return new IconUIResource(new SystemIcon(selector)); } } static class SystemIcon extends CachingScalingIcon { private static final SystemIconUIResourceSingleton folderIcon = new SystemIconUIResourceSingleton("fldr"); static IconUIResource getFolderIconUIResource() { return folderIcon.get(); } private static final SystemIconUIResourceSingleton openFolderIcon = new SystemIconUIResourceSingleton("ofld"); static IconUIResource getOpenFolderIconUIResource() { return openFolderIcon.get(); } private static final SystemIconUIResourceSingleton desktopIcon = new SystemIconUIResourceSingleton("desk"); static IconUIResource getDesktopIconUIResource() { return desktopIcon.get(); } private static final SystemIconUIResourceSingleton computerIcon = new SystemIconUIResourceSingleton("FNDR"); static IconUIResource getComputerIconUIResource() { return computerIcon.get(); } private static final SystemIconUIResourceSingleton documentIcon = new SystemIconUIResourceSingleton("docu"); static IconUIResource getDocumentIconUIResource() { return documentIcon.get(); } private static final SystemIconUIResourceSingleton hardDriveIcon = new SystemIconUIResourceSingleton("hdsk"); static IconUIResource getHardDriveIconUIResource() { return hardDriveIcon.get(); } private static final SystemIconUIResourceSingleton floppyIcon = new SystemIconUIResourceSingleton("flpy"); static IconUIResource getFloppyIconUIResource() { return floppyIcon.get(); } //private static final SystemIconUIResourceSingleton noteIcon = new SystemIconUIResourceSingleton("note"); //static IconUIResource getNoteIconUIResource() { return noteIcon.get(); } private static final SystemIconSingleton caut = new SystemIconSingleton("caut"); static SystemIcon getCautionIcon() { return caut.get(); } private static final SystemIconSingleton stop = new SystemIconSingleton("stop"); static SystemIcon getStopIcon() { return stop.get(); } final String selector; public SystemIcon(final String iconSelector, final int width, final int height) { super(width, height); selector = iconSelector; } public SystemIcon(final String iconSelector) { this(iconSelector, 16, 16); } Image createImage() { return CImage.createSystemImageFromSelector( selector, getIconWidth(), getIconHeight()); } } }
⏎ com/apple/laf/AquaIcon.java
Or download all of them as a single archive file:
File name: java.desktop-17.0.5-src.zip File size: 9152233 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.instrument.jmod - Instrument Module
2023-09-16, 47953👍, 0💬
Popular Posts:
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...
commons-collections4-4.4 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...
Jetty provides an HTTP server, HTTP client, and javax.servlet container. These components are open s...
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Jav...