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
⏎ com/sun/java/swing/ui/CommonUI.java
/* * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * */ package com.sun.java.swing.ui; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.KeyListener; import java.util.StringTokenizer; import java.util.Vector; import javax.swing.*; import javax.swing.border.Border; import javax.swing.text.*; public class CommonUI { private static class NumberDocument extends PlainDocument { public void insertString(int offs, String str, AttributeSet atts) throws BadLocationException { if(!Character.isDigit(str.charAt(0))) { return; } else { super.insertString(offs, str, atts); return; } } private NumberDocument() { } } public CommonUI() { } public static JLabel createLabel(String text, int mnemonic, Component comp) { JLabel label = new JLabel(" " + text); label.setMinimumSize(labelPrefSize); if(mnemonic != -1) label.setDisplayedMnemonic(mnemonic); if(comp != null) label.setLabelFor(comp); if(text.length() == 0) label.setPreferredSize(labelPrefSize); return label; } public static JLabel createLabel(String text) { return createLabel(text, -1, null); } public static JTextField createTextField(String text, KeyListener listener, boolean numbers) { JTextField field = new JTextField(text); field.setMinimumSize(textPrefSize); if(text.length() == 0) field.setPreferredSize(textPrefSize); if(listener != null) field.addKeyListener(listener); if(numbers) field.setDocument(new NumberDocument()); return field; } public static JTextField createTextField(String text, boolean numbers) { return createTextField(text, null, numbers); } public static JTextField createTextField(String text, KeyListener listener) { return createTextField(text, listener, false); } public static JTextField createTextField(String text) { return createTextField(text, null, false); } public static JRadioButton createRadioButton(String text, int mnemonic, ActionListener listener, boolean selected) { JRadioButton button = new JRadioButton(text); button.setMnemonic(mnemonic); button.setSelected(selected); button.setMinimumSize(labelPrefSize); if(listener != null) button.addActionListener(listener); if(text.length() == 0) button.setPreferredSize(labelPrefSize); return button; } public static JRadioButton createRadioButton(String text, int mnemonic, boolean selected) { return createRadioButton(text, mnemonic, null, selected); } public static JRadioButton createRadioButton(String text, int mnemonic, ActionListener listener) { return createRadioButton(text, mnemonic, listener, false); } public static JRadioButton createRadioButton(String text, int mnemonic) { return createRadioButton(text, mnemonic, null, false); } public static JRadioButton createRadioButton(String text) { return createRadioButton(text, -1, null, false); } public static JCheckBox createCheckBox(String text, int mnemonic, ActionListener listener, boolean selected) { JCheckBox checkbox = new JCheckBox(text); checkbox.setMinimumSize(labelPrefSize); if(mnemonic != -1) checkbox.setMnemonic(mnemonic); checkbox.setSelected(selected); if(text.length() == 0) checkbox.setPreferredSize(labelPrefSize); if(listener != null) checkbox.addActionListener(listener); return checkbox; } public static JCheckBox createCheckBox(String text, int mnemonic, ActionListener listener) { return createCheckBox(text, mnemonic, listener, false); } public static JCheckBox createCheckBox(String text, int mnemonic, boolean selected) { return createCheckBox(text, mnemonic, null, selected); } public static JCheckBox createCheckBox(String text, int mnemonic) { return createCheckBox(text, mnemonic, null, false); } public static JCheckBox createCheckBox(String text) { return createCheckBox(text, -1, null, false); } public static JComboBox createComboBox(Object items[], ActionListener listener, boolean editable) { JComboBox comboBox = new JComboBox(items); if(listener != null) comboBox.addActionListener(listener); comboBox.setEditable(editable); return comboBox; } public static JComboBox createComboBox(Object items[], boolean editable) { return createComboBox(items, null, editable); } public static JComboBox createComboBox(Vector items, ActionListener listener, boolean editable) { JComboBox comboBox = new JComboBox(items); if(listener != null) comboBox.addActionListener(listener); comboBox.setEditable(editable); return comboBox; } public static JComboBox createComboBox(Vector items, boolean editable) { return createComboBox(items, null, editable); } public static JButton createButton(Action action) { JButton button = new JButton(action); setButtonSize(button, buttonPrefSize); return button; } public static JButton createButton(String text, ActionListener listener, int mnemonic) { JButton button = new JButton(text); if(listener != null) button.addActionListener(listener); if(mnemonic != -1) button.setMnemonic(mnemonic); setButtonSize(button, buttonPrefSize); return button; } private static void setButtonSize(JButton button, Dimension size) { String text = button.getText(); button.setMinimumSize(size); if(text.length() == 0) { button.setPreferredSize(size); } else { Dimension psize = button.getPreferredSize(); if(psize.width < size.width) button.setPreferredSize(size); } } public static JButton createButton(String text, ActionListener listener) { return createButton(text, listener, -1); } public static JButton createSmallButton(String text, ActionListener listener, int mnemonic) { JButton button = createButton(text, listener, mnemonic); setButtonSize(button, smbuttonPrefSize); return button; } public static JButton createSmallButton(String text, ActionListener listener) { return createSmallButton(text, listener, -1); } public static Border createBorder(String text) { Border border = BorderFactory.createEtchedBorder(); return BorderFactory.createTitledBorder(border, text, 0, 2); } public static Border createBorder() { return BorderFactory.createEmptyBorder(4, 4, 4, 4); } public static JScrollPane createListPane(JList list, String text) { JScrollPane pane = new JScrollPane(list); pane.setBorder(BorderFactory.createCompoundBorder(createBorder(text), BorderFactory.createLoweredBevelBorder())); return pane; } public static void centerComponent(Component source, Component parent) { Dimension dim = source.getSize(); Rectangle rect; if(parent != null) { rect = parent.getBounds(); } else { Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); rect = new Rectangle(0, 0, d.width, d.height); } int x = rect.x + (rect.width - dim.width) / 2; int y = rect.y + (rect.height - dim.height) / 2; source.setLocation(x, y); } public static void centerComponent(Component source) { centerComponent(source, null); } public static JFrame getParentFrame(Component source) { Container parent; for(parent = source.getParent(); parent != null; parent = parent.getParent()) if(parent instanceof JFrame) break; if(parent == null) return null; else return (JFrame)parent; } public static Integer msToSec(Integer ms) { int value = ms.intValue(); value /= 1000; return new Integer(value); } public static Integer secToMs(Integer sec) { int value = sec.intValue(); value *= 1000; return new Integer(value); } public static String stringFromStringArray(String strings[], String delim) { String string = ""; String separator; if(delim == null || delim.equals("")) separator = " "; else separator = delim; for(int i = 0; i < strings.length; i++) { string = string + strings[i]; string = string + separator; } return string; } public static String stringFromStringArray(String strings[]) { return stringFromStringArray(strings, ""); } public static String[] stringArrayFromString(String string, String delim) { StringTokenizer st; if(delim == null || delim.equals("")) st = new StringTokenizer(string); else st = new StringTokenizer(string, delim); int numTokens = st.countTokens(); String strings[] = new String[numTokens]; int index = 0; while(st.hasMoreTokens()) strings[index++] = st.nextToken(); return strings; } public static String[] stringArrayFromString(String string) { return stringArrayFromString(string, ""); } public static void setWaitCursor(Component comp) { comp.setCursor(Cursor.getPredefinedCursor(3)); } public static void setDefaultCursor(Component comp) { comp.setCursor(Cursor.getPredefinedCursor(0)); } public static Dimension getButtconPrefSize() { return buttconPrefSize; } private static final int BUTTON_WIDTH = 100; private static final int BUTTON_HEIGHT = 26; private static final int BUTTCON_WIDTH = 28; private static final int BUTTCON_HEIGHT = 28; private static final int SM_BUTTON_WIDTH = 72; private static final int SM_BUTTON_HEIGHT = 26; private static final int LABEL_WIDTH = 100; private static final int LABEL_HEIGHT = 20; private static final int TEXT_WIDTH = 150; private static final int TEXT_HEIGHT = 20; private static final Dimension buttonPrefSize = new Dimension(100, 26); private static final Dimension buttconPrefSize = new Dimension(28, 28); private static final Dimension smbuttonPrefSize = new Dimension(72, 26); private static final Dimension labelPrefSize = new Dimension(100, 20); private static final Dimension textPrefSize = new Dimension(150, 20); }
⏎ com/sun/java/swing/ui/CommonUI.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, 145170👍, 0💬
Popular Posts:
How to download and install JDK (Java Development Kit) 6? If you want to write Java applications, yo...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
How to read XML document with XML Schema validation from socket connections with the socket\DelayedI...
JDK 11 jdk.charsets.jmod is the JMOD file for JDK 11 Charsets module. JDK 11 Charsets module compile...