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
⏎ java/awt/image/BaseMultiResolutionImage.java
/* * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.awt.image; import java.awt.Image; import java.util.List; import java.util.Arrays; import java.util.Collections; import java.util.Objects; /** * This class is an array-based implementation of * the {@code AbstractMultiResolutionImage} class. * * This class will implement the * {@code getResolutionVariant(double destImageWidth, double destImageHeight)} * method using a simple algorithm which will return the first image variant * in the array that is large enough to satisfy the rendering request. The * last image in the array will be returned if no suitable image is found * that is as large as the rendering request. * <p> * For best effect the array of images should be sorted with each image being * both wider and taller than the previous image. The base image need not be * the first image in the array. No exception will be thrown if the images * are not sorted as suggested. * * @see java.awt.Image * @see java.awt.image.MultiResolutionImage * @see java.awt.image.AbstractMultiResolutionImage * * @since 9 */ public class BaseMultiResolutionImage extends AbstractMultiResolutionImage { private final int baseImageIndex; private final Image[] resolutionVariants; /** * Creates a multi-resolution image with the given resolution variants. * The first resolution variant is used as the base image. * * @param resolutionVariants array of resolution variants sorted by image size * @throws IllegalArgumentException if null or zero-length array is passed * @throws NullPointerException if the specified {@code resolutionVariants} * contains one or more null elements * * @since 9 */ public BaseMultiResolutionImage(Image... resolutionVariants) { this(0, resolutionVariants); } /** * Creates a multi-resolution image with the given base image index and * resolution variants. * * @param baseImageIndex the index of base image in the resolution variants * array * @param resolutionVariants array of resolution variants sorted by image size * @throws IllegalArgumentException if null or zero-length array is passed * @throws NullPointerException if the specified {@code resolutionVariants} * contains one or more null elements * @throws IndexOutOfBoundsException if {@code baseImageIndex} is * negative or greater than or equal to {@code resolutionVariants} * length. * * @since 9 */ public BaseMultiResolutionImage(int baseImageIndex, Image... resolutionVariants) { if (resolutionVariants == null || resolutionVariants.length == 0) { throw new IllegalArgumentException( "Null or zero-length array is passed"); } if (baseImageIndex < 0 || baseImageIndex >= resolutionVariants.length) { throw new IndexOutOfBoundsException("Invalid base image index: " + baseImageIndex); } this.baseImageIndex = baseImageIndex; this.resolutionVariants = Arrays.copyOf(resolutionVariants, resolutionVariants.length); for (Image resolutionVariant : this.resolutionVariants) { Objects.requireNonNull(resolutionVariant, "Resolution variant can't be null"); } } @Override public Image getResolutionVariant(double destImageWidth, double destImageHeight) { checkSize(destImageWidth, destImageHeight); for (Image rvImage : resolutionVariants) { if (destImageWidth <= rvImage.getWidth(null) && destImageHeight <= rvImage.getHeight(null)) { return rvImage; } } return resolutionVariants[resolutionVariants.length - 1]; } private static void checkSize(double width, double height) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException(String.format( "Width (%s) or height (%s) cannot be <= 0", width, height)); } if (!Double.isFinite(width) || !Double.isFinite(height)) { throw new IllegalArgumentException(String.format( "Width (%s) or height (%s) is not finite", width, height)); } } @Override public List<Image> getResolutionVariants() { return Collections.unmodifiableList(Arrays.asList(resolutionVariants)); } @Override protected Image getBaseImage() { return resolutionVariants[baseImageIndex]; } }
⏎ java/awt/image/BaseMultiResolutionImage.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, 33700👍, 0💬
Popular Posts:
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
commons-collections4-4.2 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...
Apache Log4j Core Implementation provides the functional components of the logging system. Users are...
JDK 17 java.base.jmod is the JMOD file for JDK 17 Base module. JDK 17 Base module compiled class fil...
How to read XML document from socket connections with the socket\DelayedInput.java provided in the A...