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/AncestorNotifier.java
/* * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing; import javax.swing.event.*; import java.awt.event.*; import java.awt.Component; import java.awt.Container; import java.awt.Window; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; import java.io.Serializable; /** * @author Dave Moore */ @SuppressWarnings("serial") class AncestorNotifier implements ComponentListener, PropertyChangeListener, Serializable { transient Component firstInvisibleAncestor; EventListenerList listenerList = new EventListenerList(); JComponent root; AncestorNotifier(JComponent root) { this.root = root; addListeners(root, true); } void addAncestorListener(AncestorListener l) { listenerList.add(AncestorListener.class, l); } void removeAncestorListener(AncestorListener l) { listenerList.remove(AncestorListener.class, l); } AncestorListener[] getAncestorListeners() { return listenerList.getListeners(AncestorListener.class); } /** * Notify all listeners that have registered interest for * notification on this event type. The event instance * is lazily created using the parameters passed into * the fire method. * @see EventListenerList */ protected void fireAncestorAdded(JComponent source, int id, Container ancestor, Container ancestorParent) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==AncestorListener.class) { // Lazily create the event: AncestorEvent ancestorEvent = new AncestorEvent(source, id, ancestor, ancestorParent); ((AncestorListener)listeners[i+1]).ancestorAdded(ancestorEvent); } } } /** * Notify all listeners that have registered interest for * notification on this event type. The event instance * is lazily created using the parameters passed into * the fire method. * @see EventListenerList */ protected void fireAncestorRemoved(JComponent source, int id, Container ancestor, Container ancestorParent) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==AncestorListener.class) { // Lazily create the event: AncestorEvent ancestorEvent = new AncestorEvent(source, id, ancestor, ancestorParent); ((AncestorListener)listeners[i+1]).ancestorRemoved(ancestorEvent); } } } /** * Notify all listeners that have registered interest for * notification on this event type. The event instance * is lazily created using the parameters passed into * the fire method. * @see EventListenerList */ protected void fireAncestorMoved(JComponent source, int id, Container ancestor, Container ancestorParent) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==AncestorListener.class) { // Lazily create the event: AncestorEvent ancestorEvent = new AncestorEvent(source, id, ancestor, ancestorParent); ((AncestorListener)listeners[i+1]).ancestorMoved(ancestorEvent); } } } void removeAllListeners() { removeListeners(root); } void addListeners(Component ancestor, boolean addToFirst) { Component a; firstInvisibleAncestor = null; for (a = ancestor; firstInvisibleAncestor == null; a = a.getParent()) { if (addToFirst || a != ancestor) { a.addComponentListener(this); if (a instanceof JComponent) { JComponent jAncestor = (JComponent)a; jAncestor.addPropertyChangeListener(this); } } if (!a.isVisible() || a.getParent() == null || a instanceof Window) { firstInvisibleAncestor = a; } } if (firstInvisibleAncestor instanceof Window && firstInvisibleAncestor.isVisible()) { firstInvisibleAncestor = null; } } void removeListeners(Component ancestor) { Component a; for (a = ancestor; a != null; a = a.getParent()) { a.removeComponentListener(this); if (a instanceof JComponent) { JComponent jAncestor = (JComponent)a; jAncestor.removePropertyChangeListener(this); } if (a == firstInvisibleAncestor || a instanceof Window) { break; } } } public void componentResized(ComponentEvent e) {} public void componentMoved(ComponentEvent e) { Component source = e.getComponent(); fireAncestorMoved(root, AncestorEvent.ANCESTOR_MOVED, (Container)source, source.getParent()); } public void componentShown(ComponentEvent e) { Component ancestor = e.getComponent(); if (ancestor == firstInvisibleAncestor) { addListeners(ancestor, false); if (firstInvisibleAncestor == null) { fireAncestorAdded(root, AncestorEvent.ANCESTOR_ADDED, (Container)ancestor, ancestor.getParent()); } } } public void componentHidden(ComponentEvent e) { Component ancestor = e.getComponent(); boolean needsNotify = firstInvisibleAncestor == null; if ( !(ancestor instanceof Window) ) { removeListeners(ancestor.getParent()); } firstInvisibleAncestor = ancestor; if (needsNotify) { fireAncestorRemoved(root, AncestorEvent.ANCESTOR_REMOVED, (Container)ancestor, ancestor.getParent()); } } public void propertyChange(PropertyChangeEvent evt) { String s = evt.getPropertyName(); if (s!=null && (s.equals("parent") || s.equals("ancestor"))) { JComponent component = (JComponent)evt.getSource(); if (evt.getNewValue() != null) { if (component == firstInvisibleAncestor) { addListeners(component, false); if (firstInvisibleAncestor == null) { fireAncestorAdded(root, AncestorEvent.ANCESTOR_ADDED, component, component.getParent()); } } } else { boolean needsNotify = firstInvisibleAncestor == null; Container oldParent = (Container)evt.getOldValue(); removeListeners(oldParent); firstInvisibleAncestor = component; if (needsNotify) { fireAncestorRemoved(root, AncestorEvent.ANCESTOR_REMOVED, component, oldParent); } } } } }
⏎ javax/swing/AncestorNotifier.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, 194728👍, 5💬
Popular Posts:
JDK 11 jdk.charsets.jmod is the JMOD file for JDK 11 Charsets module. JDK 11 Charsets module compile...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...
Where to find answers to frequently asked questions on Downloading and Installing Connector/J - JDBC...
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...