Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
Collections:
Other Resources:
JDK 1.1 Source Code Directory
JDK 1.1 source code directory contains Java source code for JDK 1.1 core classes:
"C:\fyicenter\jdk-1.1.8\src".
Here is the list of Java classes of the JDK 1.1 source code:
✍: FYIcenter
⏎ java/awt/PopupMenu.java
/*
* @(#)PopupMenu.java 1.16 01/12/10
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.awt;
import java.awt.peer.PopupMenuPeer;
/**
* A class that implements a menu which can be dynamically popped up
* at a specified position within a component.
*
* @version 1.16 12/10/01
* @author Amy Fowler
*/
public class PopupMenu extends Menu {
private static final String base = "popup";
static int nameCounter = 0;
/*
* JDK 1.1 serialVersionUID
*/
private static final long serialVersionUID = -4620452533522760060L;
/**
* Creates a new popup menu.
*/
public PopupMenu() {
this("");
}
/**
* Creates a new popup menu with the specified name.
* @param label the title string for the popup menu
*/
public PopupMenu(String label) {
super(label);
}
/**
* Construct a name for this MenuComponent. Called by getName() when
* the name is null.
*/
String constructComponentName() {
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 (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.
* @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
*/
public void show(Component origin, int x, int y) {
Component p = (Component)parent;
if (p == null) {
throw new NullPointerException("parent is null");
}
if (p != origin &&
p instanceof Container && !((Container)p).isAncestorOf(origin)) {
throw new IllegalArgumentException("origin not in parent's hierarchy");
}
if (p.getPeer() == null || !p.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));
}
}
}
}
⏎ java/awt/PopupMenu.java
Or download all of them as a single archive file:
File name: jdk-1.1.8-src.zip File size: 1574187 bytes Release date: 2018-11-16 Download
⇒ Backup JDK 1.1 Installation Directory
2018-11-17, ≈243🔥, 0💬
Popular Posts:
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
Commons Pool provides an Object-pooling API, with three major aspects: 1. A generic object pool inte...
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module. JDK 11 Desktop module compiled ...