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 jdk.hotspot.agent.jmod - Hotspot Agent Module
JDK 11 jdk.hotspot.agent.jmod is the JMOD file for JDK 11 Hotspot Agent module.
JDK 11 Hotspot Agent module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.hotspot.agent.jmod.
JDK 11 Hotspot Agent module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Hotspot Agent module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.hotspot.agent.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/jvm/hotspot/ui/ProcessListPanel.java
/* * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * */ package sun.jvm.hotspot.ui; import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.table.*; import sun.jvm.hotspot.debugger.*; public class ProcessListPanel extends JPanel { private Debugger dbg; private AbstractTableModel dataModel; private java.util.List els; private boolean sortByName = true; private boolean sortReversed = false; private javax.swing.Timer timer; private JTable table; /** Takes a Debugger in constructor. Updates the list once during construction; list can be updated automatically by "starting" the panel. */ public ProcessListPanel(Debugger dbg) { super(); this.dbg = dbg; update(); dataModel = new AbstractTableModel() { public int getColumnCount() { return 2; } public int getRowCount() { return els.size(); } public String getColumnName(int col) { switch (col) { case 0: return "Process Name"; case 1: return "Process ID"; default: throw new RuntimeException("Index " + col + " out of bounds"); } } public Object getValueAt(int row, int col) { ProcessInfo info = (ProcessInfo) els.get(row); switch (col) { case 0: return info.getName(); case 1: return new Integer(info.getPid()); default: throw new RuntimeException("Index (" + col + ", " + row + ") out of bounds"); } } }; // Create user interface setLayout(new BorderLayout()); table = new JTable(dataModel); table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); JTableHeader header = table.getTableHeader(); header.setReorderingAllowed(false); table.setRowSelectionAllowed(true); table.setColumnSelectionAllowed(false); // Provide sorting in similar fashion to Task Manager header.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { int viewColumn = table.getColumnModel().getColumnIndexAtX(e.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (column != -1) { boolean newSortByName = (column == 0); if (newSortByName == sortByName) { // Switch sense of "reversed" instead sortReversed = !sortReversed; } else { sortByName = newSortByName; sortReversed = false; } // Keep the current selection if possible int i = table.getSelectedRow(); int pid = getPid(els, i); sort(els); i = findPid(els, pid); dataModel.fireTableDataChanged(); if ((i >= 0) || (els.size() > 0)) { if (i >= 0) { table.setRowSelectionInterval(i, i); } else { table.setRowSelectionInterval(0, 0); } } } } }); JScrollPane scrollPane = new JScrollPane(table); add(scrollPane, BorderLayout.CENTER); if (els.size() > 0) { table.setRowSelectionInterval(0, 0); } } /** Set update interval for automatic updating of the process list */ public void setAutoUpdateInterval(int millis) { getTimer().setDelay(millis); } /** Start auto updating of the panel */ public void start() { getTimer().start(); } /** Stop auto updating of the panel */ public void stop() { getTimer().stop(); } /** Call this to update the panel's notion of the process list */ public synchronized void update() { if (!dbg.hasProcessList()) { throw new RuntimeException("ProcessListPanel requires that debugger supports getProcessList()"); } java.util.List newEls = dbg.getProcessList(); sort(newEls); if (table != null) { // Keep the current selection if possible int i = table.getSelectedRow(); int pid = getPid(els, i); i = findPid(newEls, pid); els = newEls; dataModel.fireTableDataChanged(); if ((i >= 0) || (els.size() > 0)) { if (i >= 0) { table.setRowSelectionInterval(i, i); } else { table.setRowSelectionInterval(0, 0); } } } else { els = newEls; } } /** Call this to get the selected ProcessInfo, or null if none selected */ public synchronized ProcessInfo getSelectedProcess() { int i = table.getSelectedRow(); if (i < 0) { return null; } return (ProcessInfo) els.get(i); } private synchronized void sort(java.util.List els) { Comparator c; if (sortByName) { c = new Comparator() { public int compare(Object o1, Object o2) { int scale = (sortReversed ? -1 : 1); return scale * ((ProcessInfo) o1).getName().compareToIgnoreCase(((ProcessInfo) o2).getName()); } }; } else { c = new Comparator() { public int compare(Object o1, Object o2) { int scale = (sortReversed ? -1 : 1); int pid1 = ((ProcessInfo) o1).getPid(); int pid2 = ((ProcessInfo) o2).getPid(); int ret; if (pid1 < pid2) ret = -1; else if (pid1 == pid2) ret = 0; else ret = 1; return ret * scale; } }; } Collections.sort(els, c); } private javax.swing.Timer getTimer() { if (timer == null) { timer = new javax.swing.Timer(1000, new ActionListener() { public void actionPerformed(ActionEvent e) { update(); } }); } return timer; } private synchronized int getPid(java.util.List els, int index) { return ((ProcessInfo) els.get(index)).getPid(); } private synchronized int findPid(java.util.List els, int pid) { for (int i = 0; i < els.size(); i++) { ProcessInfo info = (ProcessInfo) els.get(i); if (info.getPid() == pid) { return i; } } return -1; } }
⏎ sun/jvm/hotspot/ui/ProcessListPanel.java
Or download all of them as a single archive file:
File name: jdk.hotspot.agent-11.0.1-src.zip File size: 1243786 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.httpserver.jmod - HTTP Server Module
2020-02-29, 130207👍, 0💬
Popular Posts:
commons-net.jar is the bytecode of Apache Commons Net library, which implements the client side of m...
Apache Log4j SLF4J Binding allows applications coded to the SLF4J API to use Log4j 2 as the implemen...
What Is commons-logging-1.2.jar? commons-logging-1.2.jar is the JAR file for Apache Commons Logging ...
How to download and install JDK (Java Development Kit) 1.3? If you want to write Java applications, ...
Apache Log4j API provides the interface that applications should code to and provides the adapter co...