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 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
⏎ com/sun/java/swing/plaf/windows/WindowsTextFieldUI.java
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.java.swing.plaf.windows;
import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyChangeEvent;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.BasicTextFieldUI;
import javax.swing.text.*;
import javax.swing.*;
import javax.swing.plaf.UIResource;
import sun.swing.DefaultLookup;
/**
* Provides the Windows look and feel for a text field. This
* is basically the following customizations to the default
* look-and-feel.
* <ul>
* <li>The border is beveled (using the standard control color).
* <li>The background is white by default.
* <li>The highlight color is a dark color, blue by default.
* <li>The foreground color is high contrast in the selected
* area, white by default. The unselected foreground is black.
* <li>The cursor blinks at about 1/2 second intervals.
* <li>The entire value is selected when focus is gained.
* <li>Shift-left-arrow and shift-right-arrow extend selection
* <li>Ctrl-left-arrow and ctrl-right-arrow act like home and
* end respectively.
* </ul>
* <p>
* <strong>Warning:</strong>
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is appropriate
* for short term storage or RMI between applications running the same
* version of Swing. A future release of Swing will provide support for
* long term persistence.
*
* @author Timothy Prinzing
*/
public class WindowsTextFieldUI extends BasicTextFieldUI
{
/**
* Creates a UI for a JTextField.
*
* @param c the text field
* @return the UI
*/
public static ComponentUI createUI(JComponent c) {
return new WindowsTextFieldUI();
}
/**
* Paints a background for the view. This will only be
* called if isOpaque() on the associated component is
* true. The default is to paint the background color
* of the component.
*
* @param g the graphics context
*/
protected void paintBackground(Graphics g) {
super.paintBackground(g);
}
/**
* Creates the caret for a field.
*
* @return the caret
*/
protected Caret createCaret() {
return new WindowsFieldCaret();
}
/**
* WindowsFieldCaret has different scrolling behavior than
* DefaultCaret.
*/
@SuppressWarnings("serial") // Superclass is not serializable across versions
static class WindowsFieldCaret extends DefaultCaret implements UIResource {
public WindowsFieldCaret() {
super();
}
/**
* Adjusts the visibility of the caret according to
* the windows feel which seems to be to move the
* caret out into the field by about a quarter of
* a field length if not visible.
*/
protected void adjustVisibility(Rectangle r) {
SwingUtilities.invokeLater(new SafeScroller(r));
}
/**
* Gets the painter for the Highlighter.
*
* @return the painter
*/
protected Highlighter.HighlightPainter getSelectionPainter() {
return WindowsTextUI.WindowsPainter;
}
private class SafeScroller implements Runnable {
SafeScroller(Rectangle r) {
this.r = r;
}
@SuppressWarnings("deprecation")
public void run() {
JTextField field = (JTextField) getComponent();
if (field != null) {
TextUI ui = field.getUI();
int dot = getDot();
// PENDING: We need to expose the bias in DefaultCaret.
Position.Bias bias = Position.Bias.Forward;
Rectangle startRect = null;
try {
startRect = ui.modelToView(field, dot, bias);
} catch (BadLocationException ble) {}
Insets i = field.getInsets();
BoundedRangeModel vis = field.getHorizontalVisibility();
int x = r.x + vis.getValue() - i.left;
int quarterSpan = vis.getExtent() / 4;
if (r.x < i.left) {
vis.setValue(x - quarterSpan);
} else if (r.x + r.width > i.left + vis.getExtent()) {
vis.setValue(x - (3 * quarterSpan));
}
// If we scroll, our visual location will have changed,
// but we won't have updated our internal location as
// the model hasn't changed. This checks for the change,
// and if necessary, resets the internal location.
if (startRect != null) {
try {
Rectangle endRect;
endRect = ui.modelToView(field, dot, bias);
if (endRect != null && !endRect.equals(startRect)){
damage(endRect);
}
} catch (BadLocationException ble) {}
}
}
}
private Rectangle r;
}
}
}
⏎ com/sun/java/swing/plaf/windows/WindowsTextFieldUI.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, ≈438🔥, 5💬
Popular Posts:
maven-settings-builder-3 .8.6.jaris the JAR file for Apache Maven 3.8.6 Settings Builder module. Apa...
How to download and install ojdbc6.jar for Oracle 11g R2? ojdbc6.jar for Oracle 11g R2 is a Java 6, ...
What Is HttpComponents commons-httpclient-3.1.j ar?HttpComponents commons-httpclient-3.1.j aris the ...
JDK 11 jdk.internal.vm.ci.jmod is the JMOD file for JDK 11 Internal VM CI module. JDK 11 Internal VM...
How to run "jarsigner" command from JDK tools.jar file? "jarsigner" command allows you to digitally ...