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 17 jdk.jconsole.jmod - JConsole Tool
JDK 17 jdk.jconsole.jmod is the JMOD file for JDK 17 JConsole tool, which can be invoked by the "jconsole" command.
JDK 17 JConsole tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jconsole.jmod.
JDK 17 JConsole tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JConsole tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jconsole.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/tools/jconsole/inspector/XArrayDataViewer.java
/* * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package sun.tools.jconsole.inspector; import java.awt.Color; import java.awt.Component; import java.lang.reflect.Array; import java.util.Collection; import java.util.Map; import javax.swing.JEditorPane; import javax.swing.JScrollPane; class XArrayDataViewer { private XArrayDataViewer() {} public static boolean isViewableValue(Object value) { return Utils.canBeRenderedAsArray(value); } public static Component loadArray(Object value) { Component comp = null; if (isViewableValue(value)) { Object[] arr; if (value instanceof Collection) { arr = ((Collection<?>) value).toArray(); } else if (value instanceof Map) { arr = ((Map<?,?>) value).entrySet().toArray(); } else if (value instanceof Object[]) { arr = (Object[]) value; } else { int length = Array.getLength(value); arr = new Object[length]; for (int i = 0; i < length; i++) { arr[i] = Array.get(value, i); } } JEditorPane arrayEditor = new JEditorPane(); arrayEditor.setContentType("text/html"); arrayEditor.setEditable(false); Color evenRowColor = arrayEditor.getBackground(); int red = evenRowColor.getRed(); int green = evenRowColor.getGreen(); int blue = evenRowColor.getBlue(); String evenRowColorStr = "rgb(" + red + "," + green + "," + blue + ")"; Color oddRowColor = new Color( red < 20 ? red + 20 : red - 20, green < 20 ? green + 20 : green - 20, blue < 20 ? blue + 20 : blue - 20); String oddRowColorStr = "rgb(" + oddRowColor.getRed() + "," + oddRowColor.getGreen() + "," + oddRowColor.getBlue() + ")"; Color foreground = arrayEditor.getForeground(); String textColor = String.format("%06x", foreground.getRGB() & 0xFFFFFF); StringBuilder sb = new StringBuilder(); sb.append("<html><body text=#").append(textColor).append("><table width=\"100%\">"); for (int i = 0; i < arr.length; i++) { if (i % 2 == 0) { sb.append("<tr style=\"background-color: ") .append(evenRowColorStr).append("\"><td><pre>") .append(arr[i] == null ? arr[i] : htmlize(arr[i].toString())) .append("</pre></td></tr>"); } else { sb.append("<tr style=\"background-color: ") .append(oddRowColorStr).append("\"><td><pre>") .append(arr[i] == null ? arr[i] : htmlize(arr[i].toString())) .append("</pre></td></tr>"); } } if (arr.length == 0) { sb.append("<tr style=\"background-color: ") .append(evenRowColorStr).append("\"><td></td></tr>"); } sb.append("</table></body></html>"); arrayEditor.setText(sb.toString()); JScrollPane scrollp = new JScrollPane(arrayEditor); comp = scrollp; } return comp; } private static String htmlize(String value) { return value.replace("&", "&").replace("<", "<"); } }
⏎ sun/tools/jconsole/inspector/XArrayDataViewer.java
Or download all of them as a single archive file:
File name: jdk.jconsole-17.0.5-src.zip File size: 169450 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jdeps.jmod - JDeps Tool
2023-04-17, 3546👍, 0💬
Popular Posts:
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
What Is commons-collections4-4.4 .jar?commons-collections4-4.4 .jaris the JAR file for Apache Common...
What is jxl.jar 2.6.12? jxl.jar 2.6.12 is the JAR file for Java Excel API 2.6.12, which is a Java li...
Apache Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead. Bytec...
What Is poi-5.2.3.jar? poi-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an...