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:
JRE 8 rt.jar - com.* Package Source Code
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime environment included in JDK 8. JRE 8 rt.jar libraries are divided into 6 packages:
com.* - Internal Oracle and Sun Microsystems libraries java.* - Standard Java API libraries. javax.* - Extended Java API libraries. jdk.* - JDK supporting libraries. org.* - Third party libraries. sun.* - Old libraries developed by Sun Microsystems.
JAR File Information:
Directory of C:\fyicenter\jdk-1.8.0_191\jre\lib 63,596,151 rt.jar
Here is the list of Java classes of the com.* package in JRE 1.8.0_191 rt.jar. Java source codes are also provided.
✍: FYIcenter
⏎ com/sun/java/swing/plaf/gtk/GTKColorType.java
/* * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.java.swing.plaf.gtk; import javax.swing.plaf.synth.ColorType; import java.awt.Color; import javax.swing.plaf.ColorUIResource; /** * @author Scott Violet */ public class GTKColorType extends ColorType { // GTK allows you to specify the foreground and background in a // gtkrc, the rest (dark, mid, light) are calculated from these // values. public static final ColorType LIGHT = new GTKColorType("Light"); public static final ColorType DARK = new GTKColorType("Dark"); public static final ColorType MID = new GTKColorType("Mid"); public static final ColorType BLACK = new GTKColorType("Black"); public static final ColorType WHITE = new GTKColorType("White"); public static final int MAX_COUNT; private static final float[] HLS_COLORS = new float[3]; private static final Object HLS_COLOR_LOCK = new Object(); static { MAX_COUNT = WHITE.getID() + 1; } private static int hlsToRGB(float h, float l, float s) { float m2 = (l <= .5f) ? (l * (1 + s)) : (l + s - l * s); float m1 = 2.0f * l - m2; float r, g, b; if (s == 0.0) { if (h == 0.0) { r = g = b = l; } else { r = g = b = 0; } } else { r = hlsValue(m1, m2, h + 120); g = hlsValue(m1, m2, h); b = hlsValue(m1, m2, h - 120); } return (((int)(r * 255)) << 16) | (((int)(g * 255.0)) << 8) | ((int)(b * 255)); } private static float hlsValue(float n1, float n2, float h) { if (h > 360) { h -= 360; } else if (h < 0) { h += 360; } if (h < 60) { return n1 + (n2 - n1) * h / 60.0f; } else if (h < 180) { return n2; } else if (h < 240) { return n1 + (n2 - n1) * (240.0f - h) / 60.0f; } return n1; } /** * Converts from RGB color space to HLS colorspace. */ private static float[] rgbToHLS(int rgb, float[] hls) { float r = ((rgb & 0xFF0000) >> 16) / 255.0f; float g = ((rgb & 0xFF00) >> 8) / 255.0f; float b = (rgb & 0xFF) / 255.0f; /* calculate lightness */ float max = Math.max(Math.max(r, g), b); float min = Math.min(Math.min(r, g), b); float l = (max + min) / 2.0f; float s = 0; float h = 0; if (max != min) { float delta = max - min; s = (l <= .5f) ? (delta / (max + min)) : (delta / (2.0f - max -min)); if (r == max) { h = (g - b) / delta; } else if (g == max) { h = 2.0f + (b - r) / delta; } else { h = 4.0f + (r - g) / delta; } h *= 60.0f; if (h < 0) { h += 360.0f; } } if (hls == null) { hls = new float[3]; } hls[0] = h; hls[1] = l; hls[2] = s; return hls; } /** * Creates and returns a new color derived from the passed in color. * The transformation is done in the HLS color space using the specified * arguments to scale. * * @param color Color to alter * @param hFactory Amount to scale the hue * @param lFactor Amount to scale the lightness * @param sFactory Amount to sacle saturation * @return newly created color */ static Color adjustColor(Color color, float hFactor, float lFactor, float sFactor) { float h; float l; float s; synchronized(HLS_COLOR_LOCK) { float[] hls = rgbToHLS(color.getRGB(), HLS_COLORS); h = hls[0]; l = hls[1]; s = hls[2]; } h = Math.min(360, hFactor * h); l = Math.min(1, lFactor * l); s = Math.min(1, sFactor * s); return new ColorUIResource(hlsToRGB(h, l, s)); } protected GTKColorType(String name) { super(name); } }
⏎ com/sun/java/swing/plaf/gtk/GTKColorType.java
Or download all of them as a single archive file:
File name: jre-rt-com-1.8.0_191-src.zip File size: 8099783 bytes Release date: 2018-10-28 Download
⇒ Backup JDK 8 Installation Directory
2023-02-07, 251560👍, 3💬
Popular Posts:
Saxon is an open source product available under the Mozilla Public License. It provides implementati...
commons-fileupload-1.3.3 -sources.jaris the source JAR file for Apache Commons FileUpload 1.3., whic...
HttpComponents Core Source Code Files are provided in the source package file, httpcomponents-core-5...
JDK 17 jdk.hotspot.agent.jmod is the JMOD file for JDK 17 Hotspot Agent module. JDK 17 Hotspot Agent...
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...