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 - java.* 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 java.* package in JRE 1.8.0_191 rt.jar. Java source codes are also provided.
✍: FYIcenter
⏎ java/awt/PopupMenu.java
/* * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.awt; import java.awt.peer.PopupMenuPeer; import javax.accessibility.*; import sun.awt.AWTAccessor; /** * A class that implements a menu which can be dynamically popped up * at a specified position within a component. * <p> * As the inheritance hierarchy implies, a <code>PopupMenu</code> * can be used anywhere a <code>Menu</code> can be used. * However, if you use a <code>PopupMenu</code> like a <code>Menu</code> * (e.g., you add it to a <code>MenuBar</code>), then you <b>cannot</b> * call <code>show</code> on that <code>PopupMenu</code>. * * @author Amy Fowler */ public class PopupMenu extends Menu { private static final String base = "popup"; static int nameCounter = 0; transient boolean isTrayIconPopup = false; static { AWTAccessor.setPopupMenuAccessor( new AWTAccessor.PopupMenuAccessor() { public boolean isTrayIconPopup(PopupMenu popupMenu) { return popupMenu.isTrayIconPopup; } }); } /* * JDK 1.1 serialVersionUID */ private static final long serialVersionUID = -4620452533522760060L; /** * Creates a new popup menu with an empty name. * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ public PopupMenu() throws HeadlessException { this(""); } /** * Creates a new popup menu with the specified name. * * @param label a non-<code>null</code> string specifying * the popup menu's label * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ public PopupMenu(String label) throws HeadlessException { super(label); } /** * {@inheritDoc} */ public MenuContainer getParent() { if (isTrayIconPopup) { return null; } return super.getParent(); } /** * Constructs a name for this <code>MenuComponent</code>. * Called by <code>getName</code> when the name is <code>null</code>. */ String constructComponentName() { synchronized (PopupMenu.class) { return base + nameCounter++; } } /** * Creates the popup menu's peer. * The peer allows us to change the appearance of the popup menu without * changing any of the popup menu's functionality. */ public void addNotify() { synchronized (getTreeLock()) { // If our parent is not a Component, then this PopupMenu is // really just a plain, old Menu. if (parent != null && !(parent instanceof Component)) { super.addNotify(); } else { if (peer == null) peer = Toolkit.getDefaultToolkit().createPopupMenu(this); int nitems = getItemCount(); for (int i = 0 ; i < nitems ; i++) { MenuItem mi = getItem(i); mi.parent = this; mi.addNotify(); } } } } /** * Shows the popup menu at the x, y position relative to an origin * component. * The origin component must be contained within the component * hierarchy of the popup menu's parent. Both the origin and the parent * must be showing on the screen for this method to be valid. * <p> * If this <code>PopupMenu</code> is being used as a <code>Menu</code> * (i.e., it has a non-<code>Component</code> parent), * then you cannot call this method on the <code>PopupMenu</code>. * * @param origin the component which defines the coordinate space * @param x the x coordinate position to popup the menu * @param y the y coordinate position to popup the menu * @exception NullPointerException if the parent is <code>null</code> * @exception IllegalArgumentException if this <code>PopupMenu</code> * has a non-<code>Component</code> parent * @exception IllegalArgumentException if the origin is not in the * parent's hierarchy * @exception RuntimeException if the parent is not showing on screen */ public void show(Component origin, int x, int y) { // Use localParent for thread safety. MenuContainer localParent = parent; if (localParent == null) { throw new NullPointerException("parent is null"); } if (!(localParent instanceof Component)) { throw new IllegalArgumentException( "PopupMenus with non-Component parents cannot be shown"); } Component compParent = (Component)localParent; //Fixed 6278745: Incorrect exception throwing in PopupMenu.show() method //Exception was not thrown if compParent was not equal to origin and //was not Container if (compParent != origin) { if (compParent instanceof Container) { if (!((Container)compParent).isAncestorOf(origin)) { throw new IllegalArgumentException("origin not in parent's hierarchy"); } } else { throw new IllegalArgumentException("origin not in parent's hierarchy"); } } if (compParent.getPeer() == null || !compParent.isShowing()) { throw new RuntimeException("parent not showing on screen"); } if (peer == null) { addNotify(); } synchronized (getTreeLock()) { if (peer != null) { ((PopupMenuPeer)peer).show( new Event(origin, 0, Event.MOUSE_DOWN, x, y, 0, 0)); } } } ///////////////// // Accessibility support //////////////// /** * Gets the <code>AccessibleContext</code> associated with this * <code>PopupMenu</code>. * * @return the <code>AccessibleContext</code> of this * <code>PopupMenu</code> * @since 1.3 */ public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleAWTPopupMenu(); } return accessibleContext; } /** * Inner class of PopupMenu used to provide default support for * accessibility. This class is not meant to be used directly by * application developers, but is instead meant only to be * subclassed by menu component developers. * <p> * The class used to obtain the accessible role for this object. * @since 1.3 */ protected class AccessibleAWTPopupMenu extends AccessibleAWTMenu { /* * JDK 1.3 serialVersionUID */ private static final long serialVersionUID = -4282044795947239955L; /** * Get the role of this object. * * @return an instance of AccessibleRole describing the role of the * object */ public AccessibleRole getAccessibleRole() { return AccessibleRole.POPUP_MENU; } } // class AccessibleAWTPopupMenu }
⏎ java/awt/PopupMenu.java
Or download all of them as a single archive file:
File name: jre-rt-java-1.8.0_191-src.zip File size: 6664831 bytes Release date: 2018-10-28 Download
⇒ JRE 8 rt.jar - javax.* Package Source Code
2023-08-23, 308338👍, 4💬
Popular Posts:
How to show the XML parsing flow with sax\DocumentTracer.java provided in the Apache Xerces package?...
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper ut...
Apache Log4j SLF4J Binding allows applications coded to the SLF4J API to use Log4j 2 as the implemen...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-src.zip...
How to download and install JDK (Java Development Kit) 1.4? If you want to write Java applications, ...