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
⏎ apple/laf/JRSUIState.java
/* * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package apple.laf; import apple.laf.JRSUIConstants.*; @SuppressWarnings("unchecked") public class JRSUIState { // static HashSet<JRSUIState> states = new HashSet<JRSUIState>(); final long encodedState; long derivedEncodedState; static JRSUIState prototype = new JRSUIState(0); public static JRSUIState getInstance() { return prototype.derive(); } JRSUIState(final Widget widget) { this(widget.apply(0)); } JRSUIState(final long encodedState) { this.encodedState = derivedEncodedState = encodedState; } boolean isDerivationSame() { return encodedState == derivedEncodedState; } public <T extends JRSUIState> T derive() { if (isDerivationSame()) return (T)this; final T derivation = (T)createDerivation(); // if (!states.add(derivation)) { // System.out.println("dupe: " + states.size()); // } return derivation; } public <T extends JRSUIState> T createDerivation() { return (T)new JRSUIState(derivedEncodedState); } public void reset() { derivedEncodedState = encodedState; } public void set(final Property property) { derivedEncodedState = property.apply(derivedEncodedState); } public void apply(final JRSUIControl control) { control.setEncodedState(encodedState); } @Override public boolean equals(final Object obj) { if (!(obj instanceof JRSUIState)) return false; return encodedState == ((JRSUIState)obj).encodedState && getClass().equals(obj.getClass()); } public boolean is(Property property) { return (byte)((derivedEncodedState & property.encoding.mask) >> property.encoding.shift) == property.ordinal; } @Override public int hashCode() { return (int)(encodedState ^ (encodedState >>> 32)) ^ getClass().hashCode(); } public static class AnimationFrameState extends JRSUIState { final int animationFrame; int derivedAnimationFrame; AnimationFrameState(final long encodedState, final int animationFrame) { super(encodedState); this.animationFrame = derivedAnimationFrame = animationFrame; } @Override boolean isDerivationSame() { return super.isDerivationSame() && (animationFrame == derivedAnimationFrame); } @Override public <T extends JRSUIState> T createDerivation() { return (T)new AnimationFrameState(derivedEncodedState, derivedAnimationFrame); } @Override public void reset() { super.reset(); derivedAnimationFrame = animationFrame; } public void setAnimationFrame(final int frame) { this.derivedAnimationFrame = frame; } @Override public void apply(final JRSUIControl control) { super.apply(control); control.set(Key.ANIMATION_FRAME, animationFrame); } @Override public boolean equals(final Object obj) { if (!(obj instanceof AnimationFrameState)) return false; return animationFrame == ((AnimationFrameState)obj).animationFrame && super.equals(obj); } @Override public int hashCode() { return super.hashCode() ^ animationFrame; } } public static class ValueState extends JRSUIState { final double value; double derivedValue; ValueState(final long encodedState, final double value) { super(encodedState); this.value = derivedValue = value; } @Override boolean isDerivationSame() { return super.isDerivationSame() && (value == derivedValue); } @Override public <T extends JRSUIState> T createDerivation() { return (T)new ValueState(derivedEncodedState, derivedValue); } @Override public void reset() { super.reset(); derivedValue = value; } public void setValue(final double value) { derivedValue = value; } @Override public void apply(final JRSUIControl control) { super.apply(control); control.set(Key.VALUE, value); } @Override public boolean equals(final Object obj) { if (!(obj instanceof ValueState)) return false; return value == ((ValueState)obj).value && super.equals(obj); } @Override public int hashCode() { final long bits = Double.doubleToRawLongBits(value); return super.hashCode() ^ (int)bits ^ (int)(bits >>> 32); } } public static class TitleBarHeightState extends ValueState { TitleBarHeightState(final long encodedState, final double value) { super(encodedState, value); } @Override public <T extends JRSUIState> T createDerivation() { return (T)new TitleBarHeightState(derivedEncodedState, derivedValue); } @Override public void apply(final JRSUIControl control) { super.apply(control); control.set(Key.WINDOW_TITLE_BAR_HEIGHT, value); } } public static class ScrollBarState extends ValueState { final double thumbProportion; double derivedThumbProportion; final double thumbStart; double derivedThumbStart; ScrollBarState(final long encodedState, final double value, final double thumbProportion, final double thumbStart) { super(encodedState, value); this.thumbProportion = derivedThumbProportion = thumbProportion; this.thumbStart = derivedThumbStart = thumbStart; } @Override boolean isDerivationSame() { return super.isDerivationSame() && (thumbProportion == derivedThumbProportion) && (thumbStart == derivedThumbStart); } @Override public <T extends JRSUIState> T createDerivation() { return (T)new ScrollBarState(derivedEncodedState, derivedValue, derivedThumbProportion, derivedThumbStart); } @Override public void reset() { super.reset(); derivedThumbProportion = thumbProportion; derivedThumbStart = thumbStart; } public void setThumbPercent(final double thumbPercent) { derivedThumbProportion = thumbPercent; } public void setThumbStart(final double thumbStart) { derivedThumbStart = thumbStart; } @Override public void apply(final JRSUIControl control) { super.apply(control); control.set(Key.THUMB_PROPORTION, thumbProportion); control.set(Key.THUMB_START, thumbStart); } @Override public boolean equals(final Object obj) { if (!(obj instanceof ScrollBarState)) return false; return (thumbProportion == ((ScrollBarState)obj).thumbProportion) && (thumbStart == ((ScrollBarState)obj).thumbStart) && super.equals(obj); } @Override public int hashCode() { final long bits = Double.doubleToRawLongBits(thumbProportion) ^ Double.doubleToRawLongBits(thumbStart); return super.hashCode() ^ (int)bits ^ (int)(bits >>> 32); } } }
⏎ apple/laf/JRSUIState.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, 33143👍, 0💬
Popular Posts:
JDK 11 jdk.jdi.jmod is the JMOD file for JDK 11 JDI (Java Debug Interface) tool. JDK 11 JDI tool com...
How to download and install xml-commons External Source Package? The source package contains Java so...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...
JDK 11 java.security.jgss.jmod is the JMOD file for JDK 11 Security JGSS (Java Generic Security Serv...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....