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/WindowsTabbedPaneUI.java
/*
* Copyright (c) 1997, 2008, 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 javax.swing.plaf.basic.*;
import javax.swing.plaf.*;
import javax.swing.*;
import java.util.Set;
import java.util.HashSet;
import java.awt.event.*;
import static com.sun.java.swing.plaf.windows.TMSchema.*;
import static com.sun.java.swing.plaf.windows.XPStyle.Skin;
/**
* Windows rendition of the component.
* <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.
*/
public class WindowsTabbedPaneUI extends BasicTabbedPaneUI {
/**
* Keys to use for forward focus traversal when the JComponent is
* managing focus.
*/
private static Set<KeyStroke> managingFocusForwardTraversalKeys;
/**
* Keys to use for backward focus traversal when the JComponent is
* managing focus.
*/
private static Set<KeyStroke> managingFocusBackwardTraversalKeys;
private boolean contentOpaque = true;
@SuppressWarnings("deprecation")
protected void installDefaults() {
super.installDefaults();
contentOpaque = UIManager.getBoolean("TabbedPane.contentOpaque");
// focus forward traversal key
if (managingFocusForwardTraversalKeys==null) {
managingFocusForwardTraversalKeys = new HashSet<KeyStroke>();
managingFocusForwardTraversalKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0));
}
tabPane.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, managingFocusForwardTraversalKeys);
// focus backward traversal key
if (managingFocusBackwardTraversalKeys==null) {
managingFocusBackwardTraversalKeys = new HashSet<KeyStroke>();
managingFocusBackwardTraversalKeys.add( KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
}
tabPane.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, managingFocusBackwardTraversalKeys);
}
protected void uninstallDefaults() {
// sets the focus forward and backward traversal keys to null
// to restore the defaults
tabPane.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null);
tabPane.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, null);
super.uninstallDefaults();
}
public static ComponentUI createUI(JComponent c) {
return new WindowsTabbedPaneUI();
}
protected void setRolloverTab(int index) {
// Rollover is only supported on XP
if (XPStyle.getXP() != null) {
int oldRolloverTab = getRolloverTab();
super.setRolloverTab(index);
Rectangle r1 = null;
Rectangle r2 = null;
if ( (oldRolloverTab >= 0) && (oldRolloverTab < tabPane.getTabCount()) ) {
r1 = getTabBounds(tabPane, oldRolloverTab);
}
if (index >= 0) {
r2 = getTabBounds(tabPane, index);
}
if (r1 != null) {
if (r2 != null) {
tabPane.repaint(r1.union(r2));
} else {
tabPane.repaint(r1);
}
} else if (r2 != null) {
tabPane.repaint(r2);
}
}
}
protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) {
XPStyle xp = XPStyle.getXP();
if (xp != null && (contentOpaque || tabPane.isOpaque())) {
Skin skin = xp.getSkin(tabPane, Part.TABP_PANE);
if (skin != null) {
Insets insets = tabPane.getInsets();
// Note: don't call getTabAreaInsets(), because it causes rotation.
// Make sure "TabbedPane.tabsOverlapBorder" is set to true in WindowsLookAndFeel
Insets tabAreaInsets = UIManager.getInsets("TabbedPane.tabAreaInsets");
int x = insets.left;
int y = insets.top;
int w = tabPane.getWidth() - insets.right - insets.left;
int h = tabPane.getHeight() - insets.top - insets.bottom;
// Expand area by tabAreaInsets.bottom to allow tabs to overlap onto the border.
if (tabPlacement == LEFT || tabPlacement == RIGHT) {
int tabWidth = calculateTabAreaWidth(tabPlacement, runCount, maxTabWidth);
if (tabPlacement == LEFT) {
x += (tabWidth - tabAreaInsets.bottom);
}
w -= (tabWidth - tabAreaInsets.bottom);
} else {
int tabHeight = calculateTabAreaHeight(tabPlacement, runCount, maxTabHeight);
if (tabPlacement == TOP) {
y += (tabHeight - tabAreaInsets.bottom);
}
h -= (tabHeight - tabAreaInsets.bottom);
}
paintRotatedSkin(g, skin, tabPlacement, x, y, w, h, null);
return;
}
}
super.paintContentBorder(g, tabPlacement, selectedIndex);
}
protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex,
int x, int y, int w, int h, boolean isSelected ) {
if (XPStyle.getXP() == null) {
super.paintTabBackground(g, tabPlacement, tabIndex, x, y, w, h, isSelected);
}
}
protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex,
int x, int y, int w, int h, boolean isSelected ) {
XPStyle xp = XPStyle.getXP();
if (xp != null) {
Part part;
int tabCount = tabPane.getTabCount();
int tabRun = getRunForTab(tabCount, tabIndex);
if (tabRuns[tabRun] == tabIndex) {
part = Part.TABP_TABITEMLEFTEDGE;
} else if (tabCount > 1 && lastTabInRun(tabCount, tabRun) == tabIndex) {
part = Part.TABP_TABITEMRIGHTEDGE;
if (isSelected) {
// Align with right edge
if (tabPlacement == TOP || tabPlacement == BOTTOM) {
w++;
} else {
h++;
}
}
} else {
part = Part.TABP_TABITEM;
}
State state = State.NORMAL;
if (isSelected) {
state = State.SELECTED;
} else if (tabIndex == getRolloverTab()) {
state = State.HOT;
}
paintRotatedSkin(g, xp.getSkin(tabPane, part), tabPlacement, x, y, w, h, state);
} else {
super.paintTabBorder(g, tabPlacement, tabIndex, x, y, w, h, isSelected);
}
}
private void paintRotatedSkin(Graphics g, Skin skin, int tabPlacement,
int x, int y, int w, int h, State state) {
Graphics2D g2d = (Graphics2D)g.create();
g2d.translate(x, y);
switch (tabPlacement) {
case RIGHT: g2d.translate(w, 0);
g2d.rotate(Math.toRadians(90.0));
skin.paintSkin(g2d, 0, 0, h, w, state);
break;
case LEFT: g2d.scale(-1.0, 1.0);
g2d.rotate(Math.toRadians(90.0));
skin.paintSkin(g2d, 0, 0, h, w, state);
break;
case BOTTOM: g2d.translate(0, h);
g2d.scale(-1.0, 1.0);
g2d.rotate(Math.toRadians(180.0));
skin.paintSkin(g2d, 0, 0, w, h, state);
break;
case TOP:
default: skin.paintSkin(g2d, 0, 0, w, h, state);
}
g2d.dispose();
}
}
⏎ com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.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, ≈748🔥, 5💬
Popular Posts:
How to download and install JDK (Java Development Kit) 6? If you want to write Java applications, yo...
JDK 11 jdk.jcmd.jmod is the JMOD file for JDK 11 JCmd tool, which can be invoked by the "jcmd" comma...
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
What Is fop.jar? I got it from the fop-2.7-bin.zip. fop.jar in fop-2.7-bin.zip is the JAR file for F...
How to display types defined in an XML Schema file with the xs\QueryXS.java provided in the Apache X...