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 17 java.desktop.jmod - Desktop Module
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module.
JDK 17 Desktop module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.desktop.jmod.
JDK 17 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Desktop module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/apple/laf/AquaOptionPaneUI.java
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.apple.laf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicOptionPaneUI;
public class AquaOptionPaneUI extends BasicOptionPaneUI {
private static final int kOKCancelButtonWidth = 79;
private static final int kButtonHeight = 23;
private static final int kDialogSmallPadding = 4;
private static final int kDialogLargePadding = 23;
/**
* Creates a new BasicOptionPaneUI instance.
*/
public static ComponentUI createUI(final JComponent x) {
return new AquaOptionPaneUI();
}
/**
* Creates and returns a Container containin the buttons. The buttons
* are created by calling {@code getButtons}.
*/
protected Container createButtonArea() {
final Container bottom = super.createButtonArea();
// Now replace the Layout
bottom.setLayout(new AquaButtonAreaLayout(true, kDialogSmallPadding));
return bottom;
}
/**
* Messaged from installComponents to create a Container containing the
* body of the message.
* The icon and body should be aligned on their top edges
*/
protected Container createMessageArea() {
final JPanel top = new JPanel();
top.setBorder(UIManager.getBorder("OptionPane.messageAreaBorder"));
top.setLayout(new BoxLayout(top, BoxLayout.X_AXIS));
/* Fill the body. */
final Container body = new JPanel();
final Icon sideIcon = getIcon();
if (sideIcon != null) {
final JLabel iconLabel = new JLabel(sideIcon);
iconLabel.setVerticalAlignment(SwingConstants.TOP);
final JPanel iconPanel = new JPanel();
iconPanel.add(iconLabel);
top.add(iconPanel);
top.add(Box.createHorizontalStrut(kDialogLargePadding));
}
body.setLayout(new GridBagLayout());
final GridBagConstraints cons = new GridBagConstraints();
cons.gridx = cons.gridy = 0;
cons.gridwidth = GridBagConstraints.REMAINDER;
cons.gridheight = 1;
cons.anchor = GridBagConstraints.WEST;
cons.insets = new Insets(0, 0, 3, 0);
addMessageComponents(body, cons, getMessage(), getMaxCharactersPerLineCount(), false);
top.add(body);
return top;
}
/**
* AquaButtonAreaLayout lays out all
* components according to the HI Guidelines:
* The most important button is always on the far right
* The group of buttons is on the right for left-to-right,
* left for right-to-left
* The widths of each component will be set to the largest preferred size width.
*
*
* This inner class is marked "public" due to a compiler bug.
* This class should be treated as a "protected" inner class.
* Instantiate it only within subclasses of BasicOptionPaneUI.
*
* BasicOptionPaneUI expects that its buttons are layed out with
* a subclass of ButtonAreaLayout
*/
public static class AquaButtonAreaLayout extends ButtonAreaLayout {
public AquaButtonAreaLayout(final boolean syncAllWidths, final int padding) {
super(true, padding);
}
public void layoutContainer(final Container container) {
final Component[] children = container.getComponents();
if (children == null || 0 >= children.length) return;
final int numChildren = children.length;
final int yLocation = container.getInsets().top;
// Always syncAllWidths - and heights!
final Dimension maxSize = new Dimension(kOKCancelButtonWidth, kButtonHeight);
for (int i = 0; i < numChildren; i++) {
final Dimension sizes = children[i].getPreferredSize();
maxSize.width = Math.max(maxSize.width, sizes.width);
maxSize.height = Math.max(maxSize.height, sizes.height);
}
// ignore getCentersChildren, because we don't
int xLocation = container.getSize().width - (maxSize.width * numChildren + (numChildren - 1) * padding);
final int xOffset = maxSize.width + padding;
// most important button (button zero) on far right
for (int i = numChildren - 1; i >= 0; i--) {
children[i].setBounds(xLocation, yLocation, maxSize.width, maxSize.height);
xLocation += xOffset;
}
}
@Override
public Dimension minimumLayoutSize(Container c) {
if (c != null) {
Component[] children = c.getComponents();
if (children != null && children.length > 0) {
int numChildren = children.length;
Insets cInsets = c.getInsets();
int extraHeight = cInsets.top + cInsets.bottom;
int extraWidth = cInsets.left + cInsets.right;
int okCancelButtonWidth = extraWidth
+ (kOKCancelButtonWidth * numChildren)
+ (numChildren - 1) * padding;
int okbuttonHeight = extraHeight + kButtonHeight;
Dimension minSize = super.minimumLayoutSize(c);
return new Dimension(Math.max(minSize.width,
okCancelButtonWidth),
Math.max(minSize.height, okbuttonHeight));
}
}
return new Dimension(0, 0);
}
}
}
⏎ com/apple/laf/AquaOptionPaneUI.java
Or download all of them as a single archive file:
File name: java.desktop-17.0.5-src.zip File size: 9152233 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.instrument.jmod - Instrument Module
2023-09-16, ≈413🔥, 0💬
Popular Posts:
Xalan-Java, Version 2.7.1, is an XSLT processor for transforming XML documents into HTML, text, or o...
What Is ojdbc7.jar for Oracle 12c R1? ojdbc7.jar for Oracle 12c R1 is the JAR files of ojdbc.jar, JD...
JDK 17 jdk.internal.le.jmod is the JMOD file for JDK 17 Internal Line Editing module. JDK 17 Interna...
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module. JDK 11 Desktop module compiled ...
JDK 17 java.xml.crypto.jmod is the JMOD file for JDK 17 XML (eXtensible Markup Language) Crypto modu...