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 11 java.desktop.jmod - Desktop Module
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module.
JDK 11 Desktop module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.desktop.jmod.
JDK 11 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Desktop module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ javax/swing/LegacyGlueFocusTraversalPolicy.java
/* * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing; import java.awt.FocusTraversalPolicy; import java.awt.Component; import java.awt.Container; import java.awt.Window; import java.util.HashMap; import java.util.HashSet; import java.io.*; /** * A FocusTraversalPolicy which provides support for legacy applications which * handle focus traversal via JComponent.setNextFocusableComponent or by * installing a custom DefaultFocusManager. If a specific traversal has not * been hard coded, then that traversal is provided either by the custom * DefaultFocusManager, or by a wrapped FocusTraversalPolicy instance. * * @author David Mendenhall */ @SuppressWarnings("serial") // JDK-implementation class final class LegacyGlueFocusTraversalPolicy extends FocusTraversalPolicy implements Serializable { private transient FocusTraversalPolicy delegatePolicy; private transient DefaultFocusManager delegateManager; private HashMap<Component, Component> forwardMap = new HashMap<Component, Component>(), backwardMap = new HashMap<Component, Component>(); LegacyGlueFocusTraversalPolicy(FocusTraversalPolicy delegatePolicy) { this.delegatePolicy = delegatePolicy; } LegacyGlueFocusTraversalPolicy(DefaultFocusManager delegateManager) { this.delegateManager = delegateManager; } void setNextFocusableComponent(Component left, Component right) { forwardMap.put(left, right); backwardMap.put(right, left); } void unsetNextFocusableComponent(Component left, Component right) { forwardMap.remove(left); backwardMap.remove(right); } public Component getComponentAfter(Container focusCycleRoot, Component aComponent) { Component hardCoded = aComponent, prevHardCoded; HashSet<Component> sanity = new HashSet<Component>(); do { prevHardCoded = hardCoded; hardCoded = forwardMap.get(hardCoded); if (hardCoded == null) { if (delegatePolicy != null && prevHardCoded.isFocusCycleRoot(focusCycleRoot)) { return delegatePolicy.getComponentAfter(focusCycleRoot, prevHardCoded); } else if (delegateManager != null) { return delegateManager. getComponentAfter(focusCycleRoot, aComponent); } else { return null; } } if (sanity.contains(hardCoded)) { // cycle detected; bail return null; } sanity.add(hardCoded); } while (!accept(hardCoded)); return hardCoded; } public Component getComponentBefore(Container focusCycleRoot, Component aComponent) { Component hardCoded = aComponent, prevHardCoded; HashSet<Component> sanity = new HashSet<Component>(); do { prevHardCoded = hardCoded; hardCoded = backwardMap.get(hardCoded); if (hardCoded == null) { if (delegatePolicy != null && prevHardCoded.isFocusCycleRoot(focusCycleRoot)) { return delegatePolicy.getComponentBefore(focusCycleRoot, prevHardCoded); } else if (delegateManager != null) { return delegateManager. getComponentBefore(focusCycleRoot, aComponent); } else { return null; } } if (sanity.contains(hardCoded)) { // cycle detected; bail return null; } sanity.add(hardCoded); } while (!accept(hardCoded)); return hardCoded; } public Component getFirstComponent(Container focusCycleRoot) { if (delegatePolicy != null) { return delegatePolicy.getFirstComponent(focusCycleRoot); } else if (delegateManager != null) { return delegateManager.getFirstComponent(focusCycleRoot); } else { return null; } } public Component getLastComponent(Container focusCycleRoot) { if (delegatePolicy != null) { return delegatePolicy.getLastComponent(focusCycleRoot); } else if (delegateManager != null) { return delegateManager.getLastComponent(focusCycleRoot); } else { return null; } } public Component getDefaultComponent(Container focusCycleRoot) { if (delegatePolicy != null) { return delegatePolicy.getDefaultComponent(focusCycleRoot); } else { return getFirstComponent(focusCycleRoot); } } private boolean accept(Component aComponent) { if (!(aComponent.isVisible() && aComponent.isDisplayable() && aComponent.isFocusable() && aComponent.isEnabled())) { return false; } // Verify that the Component is recursively enabled. Disabling a // heavyweight Container disables its children, whereas disabling // a lightweight Container does not. if (!(aComponent instanceof Window)) { for (Container enableTest = aComponent.getParent(); enableTest != null; enableTest = enableTest.getParent()) { if (!(enableTest.isEnabled() || enableTest.isLightweight())) { return false; } if (enableTest instanceof Window) { break; } } } return true; } private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); if (delegatePolicy instanceof Serializable) { out.writeObject(delegatePolicy); } else { out.writeObject(null); } if (delegateManager instanceof Serializable) { out.writeObject(delegateManager); } else { out.writeObject(null); } } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField f = in.readFields(); @SuppressWarnings("unchecked") HashMap<Component, Component> newForwardMap = (HashMap<Component, Component> ) f.get("forwardMap", null); if (newForwardMap == null) { throw new InvalidObjectException("Null forwardMap"); } forwardMap = newForwardMap; @SuppressWarnings("unchecked") HashMap<Component, Component> newBackwardMap = (HashMap<Component, Component>) f.get("backwardMap", null); if (newBackwardMap == null) { throw new InvalidObjectException("Null backwardMap"); } backwardMap = newBackwardMap; delegatePolicy = (FocusTraversalPolicy)in.readObject(); delegateManager = (DefaultFocusManager)in.readObject(); } }
⏎ javax/swing/LegacyGlueFocusTraversalPolicy.java
Or download all of them as a single archive file:
File name: java.desktop-11.0.1-src.zip File size: 7974380 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.instrument.jmod - Instrument Module
2022-08-06, 196867👍, 5💬
Popular Posts:
JDK 8 jconsole.jar is the JAR file for JDK 8 JConsole, which is a graphical monitoring tool to monit...
JDK 11 jdk.scripting.nashorn.jm odis the JMOD file for JDK 11 Scripting Nashorn module. JDK 11 Scrip...
JDK 11 jdk.jdi.jmod is the JMOD file for JDK 11 JDI (Java Debug Interface) tool. JDK 11 JDI tool com...
What Is javamail-1_2.zip? javamail-1_2.zip is the binary package of JavaMail API 1.2 in ZIP format. ...
commons-net-1.4.1.jar is the JAR file for Apache Commons Net 1.4.1, which implements the client side...