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 java.desktop.jmod - Desktop Module
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module.
JDK 11 Desktop module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.desktop.jmod.
JDK 11 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Desktop module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ javax/swing/colorchooser/ValueFormatter.java
/* * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.colorchooser; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.text.ParseException; import static java.util.Locale.ENGLISH; import javax.swing.JFormattedTextField; import javax.swing.JFormattedTextField.AbstractFormatter; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.DefaultFormatterFactory; import javax.swing.text.DocumentFilter; @SuppressWarnings("serial") // Same-version serialization only final class ValueFormatter extends AbstractFormatter implements FocusListener, Runnable { static void init(int length, boolean hex, JFormattedTextField text) { ValueFormatter formatter = new ValueFormatter(length, hex); text.setColumns(length); text.setFormatterFactory(new DefaultFormatterFactory(formatter)); text.setHorizontalAlignment(SwingConstants.RIGHT); text.setMinimumSize(text.getPreferredSize()); text.addFocusListener(formatter); } private final DocumentFilter filter = new DocumentFilter() { @Override public void remove(FilterBypass fb, int offset, int length) throws BadLocationException { if (isValid(fb.getDocument().getLength() - length)) { fb.remove(offset, length); } } @Override public void replace(FilterBypass fb, int offset, int length, String text, AttributeSet set) throws BadLocationException { if (isValid(fb.getDocument().getLength() + text.length() - length) && isValid(text)) { fb.replace(offset, length, text.toUpperCase(ENGLISH), set); } } @Override public void insertString(FilterBypass fb, int offset, String text, AttributeSet set) throws BadLocationException { if (isValid(fb.getDocument().getLength() + text.length()) && isValid(text)) { fb.insertString(offset, text.toUpperCase(ENGLISH), set); } } }; private final int length; private final int radix; private JFormattedTextField text; ValueFormatter(int length, boolean hex) { this.length = length; this.radix = hex ? 16 : 10; } @Override public Object stringToValue(String text) throws ParseException { try { return Integer.valueOf(text, this.radix); } catch (NumberFormatException nfe) { ParseException pe = new ParseException("illegal format", 0); pe.initCause(nfe); throw pe; } } @Override public String valueToString(Object object) throws ParseException { if (object instanceof Integer) { if (this.radix == 10) { return object.toString(); } int value = (Integer) object; int index = this.length; char[] array = new char[index]; while (0 < index--) { array[index] = Character.forDigit(value & 0x0F, this.radix); value >>= 4; } return new String(array).toUpperCase(ENGLISH); } throw new ParseException("illegal object", 0); } @Override protected DocumentFilter getDocumentFilter() { return this.filter; } public void focusGained(FocusEvent event) { Object source = event.getSource(); if (source instanceof JFormattedTextField) { this.text = (JFormattedTextField) source; SwingUtilities.invokeLater(this); } } public void focusLost(FocusEvent event) { } public void run() { if (this.text != null) { this.text.selectAll(); } } private boolean isValid(int length) { return (0 <= length) && (length <= this.length); } private boolean isValid(String text) { int length = text.length(); for (int i = 0; i < length; i++) { char ch = text.charAt(i); if (Character.digit(ch, this.radix) < 0) { return false; } } return true; } }
⏎ javax/swing/colorchooser/ValueFormatter.java
Or download all of them as a single archive file:
File name: java.desktop-11.0.1-src.zip File size: 7974380 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.instrument.jmod - Instrument Module
2022-08-06, 194784👍, 5💬
Popular Posts:
Snappy-Java is a Java port of the "snappy", a fast C++ compresser/decompresser developed by Google. ...
JDK 11 jdk.rmic.jmod is the JMOD file for JDK 11 RMI (Remote Method Invocation) Compiler Tool tool, ...
How to download and install ojdbc6.jar for Oracle 11g R2? ojdbc6.jar for Oracle 11g R2 is a Java 6, ...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
How to download and install JDK (Java Development Kit) 8? If you want to write Java applications, yo...