Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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, ≈911🔥, 0💬
Popular Posts:
JDK 11 java.smartcardio.jmod is the JMOD file for JDK 11 Smartcardio module. JDK 11 Smart Card IO mo...
Snappy-Java is a Java port of the "snappy", a fast C++ compresser/decompresser developed by Google. ...
itextpdf.jar is a component in iText 5 Java library to provide core functionalities. iText Java libr...
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
Guava is a suite of core and expanded libraries that include utility classes, google's collections, ...