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/plaf/metal/MetalRadioButtonUI.java
/* * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.plaf.metal; import sun.swing.SwingUtilities2; import sun.awt.AppContext; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.plaf.basic.*; import javax.swing.border.*; import javax.swing.plaf.*; import java.io.Serializable; import javax.swing.text.View; /** * RadioButtonUI implementation for MetalRadioButtonUI * <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. As of 1.4, support for long term storage * of all JavaBeans™ * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @author Michael C. Albers (Metal modifications) * @author Jeff Dinkins (original BasicRadioButtonCode) */ @SuppressWarnings("serial") // Same-version serialization only public class MetalRadioButtonUI extends BasicRadioButtonUI { private static final Object METAL_RADIO_BUTTON_UI_KEY = new Object(); /** * The color of the focused radio button. */ protected Color focusColor; /** * The color of the selected radio button. */ protected Color selectColor; /** * The color of a disabled text. */ protected Color disabledTextColor; private boolean defaults_initialized = false; // ******************************** // Create PlAF // ******************************** /** * Returns an instance of {@code MetalRadioButtonUI}. * * @param c a component * @return an instance of {@code MetalRadioButtonUI} */ public static ComponentUI createUI(JComponent c) { AppContext appContext = AppContext.getAppContext(); MetalRadioButtonUI metalRadioButtonUI = (MetalRadioButtonUI) appContext.get(METAL_RADIO_BUTTON_UI_KEY); if (metalRadioButtonUI == null) { metalRadioButtonUI = new MetalRadioButtonUI(); appContext.put(METAL_RADIO_BUTTON_UI_KEY, metalRadioButtonUI); } return metalRadioButtonUI; } // ******************************** // Install Defaults // ******************************** public void installDefaults(AbstractButton b) { super.installDefaults(b); if(!defaults_initialized) { focusColor = UIManager.getColor(getPropertyPrefix() + "focus"); selectColor = UIManager.getColor(getPropertyPrefix() + "select"); disabledTextColor = UIManager.getColor(getPropertyPrefix() + "disabledText"); defaults_initialized = true; } LookAndFeel.installProperty(b, "opaque", Boolean.TRUE); } protected void uninstallDefaults(AbstractButton b) { super.uninstallDefaults(b); defaults_initialized = false; } // ******************************** // Default Accessors // ******************************** /** * Returns the color of the selected {@code JRadioButton}. * * @return the color of the selected {@code JRadioButton} */ protected Color getSelectColor() { return selectColor; } /** * Returns the color of the disabled text. * * @return the color of the disabled text */ protected Color getDisabledTextColor() { return disabledTextColor; } /** * Returns the color of the focused {@code JRadioButton}. * * @return the color of the focused {@code JRadioButton} */ protected Color getFocusColor() { return focusColor; } // ******************************** // Paint Methods // ******************************** public synchronized void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; ButtonModel model = b.getModel(); Dimension size = c.getSize(); int w = size.width; int h = size.height; Font f = c.getFont(); g.setFont(f); FontMetrics fm = SwingUtilities2.getFontMetrics(c, g, f); Rectangle viewRect = new Rectangle(size); Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets i = c.getInsets(); viewRect.x += i.left; viewRect.y += i.top; viewRect.width -= (i.right + viewRect.x); viewRect.height -= (i.bottom + viewRect.y); Icon altIcon = b.getIcon(); Icon selectedIcon = null; Icon disabledIcon = null; String text = SwingUtilities.layoutCompoundLabel( c, fm, b.getText(), altIcon != null ? altIcon : getDefaultIcon(), b.getVerticalAlignment(), b.getHorizontalAlignment(), b.getVerticalTextPosition(), b.getHorizontalTextPosition(), viewRect, iconRect, textRect, b.getIconTextGap()); // fill background if(c.isOpaque()) { g.setColor(b.getBackground()); g.fillRect(0,0, size.width, size.height); } // Paint the radio button if(altIcon != null) { if(!model.isEnabled()) { if(model.isSelected()) { altIcon = b.getDisabledSelectedIcon(); } else { altIcon = b.getDisabledIcon(); } } else if(model.isPressed() && model.isArmed()) { altIcon = b.getPressedIcon(); if(altIcon == null) { // Use selected icon altIcon = b.getSelectedIcon(); } } else if(model.isSelected()) { if(b.isRolloverEnabled() && model.isRollover()) { altIcon = b.getRolloverSelectedIcon(); if (altIcon == null) { altIcon = b.getSelectedIcon(); } } else { altIcon = b.getSelectedIcon(); } } else if(b.isRolloverEnabled() && model.isRollover()) { altIcon = b.getRolloverIcon(); } if(altIcon == null) { altIcon = b.getIcon(); } altIcon.paintIcon(c, g, iconRect.x, iconRect.y); } else { getDefaultIcon().paintIcon(c, g, iconRect.x, iconRect.y); } // Draw the Text if(text != null) { View v = (View) c.getClientProperty(BasicHTML.propertyKey); if (v != null) { v.paint(g, textRect); } else { int mnemIndex = b.getDisplayedMnemonicIndex(); if(model.isEnabled()) { // *** paint the text normally g.setColor(b.getForeground()); } else { // *** paint the text disabled g.setColor(getDisabledTextColor()); } SwingUtilities2.drawStringUnderlineCharAt(c,g,text, mnemIndex, textRect.x, textRect.y + fm.getAscent()); } if(b.hasFocus() && b.isFocusPainted() && textRect.width > 0 && textRect.height > 0 ) { paintFocus(g,textRect,size); } } } protected void paintFocus(Graphics g, Rectangle t, Dimension d){ g.setColor(getFocusColor()); g.drawRect(t.x-1, t.y-1, t.width+1, t.height+1); } }
⏎ javax/swing/plaf/metal/MetalRadioButtonUI.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, 196842👍, 5💬
Popular Posts:
JDK 17 jdk.localedata.jmod is the JMOD file for JDK 17 Localedata module. JDK 17 Locale Data module ...
JasperReports, the world's most popular open source business intelligence and reporting engine and J...
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...
What Is activation.jar? I heard it's related to JAF (JavaBeans Activation Framework) 1.1? The if you...
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...