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 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/AquaMenuItemUI.java
/* * Copyright (c) 2011, 2018, 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 java.beans.*; import javax.swing.*; import javax.swing.plaf.*; import javax.swing.plaf.basic.BasicMenuItemUI; import apple.laf.JRSUIConstants.Size; // TODO: no screen menu bar for now public class AquaMenuItemUI extends BasicMenuItemUI implements AquaMenuPainter.Client/*, ScreenMenuItemUI*/ { static final int kPlain = 0, kCheckBox = 1, kRadioButton = 2; static final String[] sPropertyPrefixes = { "MenuItem", "CheckBoxMenuItem", "RadioButtonMenuItem" }; boolean fIsScreenMenuItem = false; boolean fIsIndeterminate = false; int fType; AquaMenuItemUI(final int type) { super(); fType = type; } public static ComponentUI createUI(final JComponent c) { int type = kPlain; if (c instanceof JCheckBoxMenuItem) type = kCheckBox; if (c instanceof JRadioButtonMenuItem) type = kRadioButton; return new AquaMenuItemUI(type); } // The only real difference between the three is which property prefix it returns // and therefore which icons! protected String getPropertyPrefix() { return sPropertyPrefixes[fType]; } @Override protected void installListeners() { super.installListeners(); IndeterminateListener.install(menuItem); } @Override protected void uninstallListeners() { IndeterminateListener.uninstall(menuItem); super.uninstallListeners(); } public void updateListenersForScreenMenuItem() { setIsScreenMenu(true); } // Users can dynamically change the kind of menu we're on by calling JPopupMenu.setInvoker // so we need to be prepared to put the listeners back on protected void setIsScreenMenu(final boolean isScreenMenuItem) { if (fIsScreenMenuItem != isScreenMenuItem) { fIsScreenMenuItem = isScreenMenuItem; if (fIsScreenMenuItem) removeListeners(); else addListeners(); } } protected void removeListeners() { menuItem.removeMouseListener(mouseInputListener); menuItem.removeMouseMotionListener(mouseInputListener); menuItem.removeMenuDragMouseListener(menuDragMouseListener); } protected void addListeners() { menuItem.addMouseListener(mouseInputListener); menuItem.addMouseMotionListener(mouseInputListener); menuItem.addMenuDragMouseListener(menuDragMouseListener); } protected void paintMenuItem(final Graphics g, final JComponent c, final Icon localCheckIcon, final Icon localArrowIcon, final Color background, final Color foreground, final int localDefaultTextIconGap) { AquaMenuPainter.instance().paintMenuItem(this, g, c, localCheckIcon, localArrowIcon, background, foreground, disabledForeground, selectionForeground, localDefaultTextIconGap, acceleratorFont); } protected Dimension getPreferredMenuItemSize(final JComponent c, final Icon localCheckIcon, final Icon localArrowIcon, final int localDefaultTextIconGap) { return AquaMenuPainter.instance().getPreferredMenuItemSize(c, localCheckIcon, localArrowIcon, localDefaultTextIconGap, acceleratorFont); } public void update(final Graphics g, final JComponent c) { if (c.isOpaque()) { // sja fix ((PenGraphics)g).alphaClearRect(0,0,c.getWidth(),c.getHeight()); final Color oldColor = g.getColor(); g.setColor(c.getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); g.setColor(oldColor); } paint(g, c); } public void paintBackground(final Graphics g, final JComponent c, final int menuWidth, final int menuHeight) { if ((c.getParent() instanceof JMenuBar)) return; final Color oldColor = g.getColor(); g.setColor(c.getBackground()); g.fillRect(0, 0, menuWidth, menuHeight); if (((JMenuItem)c).isBorderPainted()) { if (((JMenuItem)c).getModel().isArmed()) { AquaMenuPainter.instance().paintSelectedMenuItemBackground(g, menuWidth, menuHeight); } //getTheme().drawMenuItem(c, g, 0, 0, menuWidth, menuHeight); } else { // If selected, use black (see AquaLookAndFeel "Menu.selectionBackground") if (((JMenuItem)c).getModel().isArmed()) { final Color holdc = g.getColor(); g.setColor(Color.black); g.fillRect(0, 0, menuWidth, menuHeight); g.setColor(holdc); } else { g.setColor(Color.green); g.fillRect(0, 0, menuWidth, menuHeight); //super.paintBackground(g,c,menuWidth, menuHeight); //getTheme().drawMenuBackground((Component)c, g, (short)1, 0, 0, menuWidth, menuHeight); } } g.setColor(oldColor); } protected void doClick(final MenuSelectionManager msm) { final Dimension size = menuItem.getSize(); AquaUtils.blinkMenu(new AquaUtils.Selectable() { public void paintSelected(final boolean selected) { menuItem.setArmed(selected); menuItem.paintImmediately(0, 0, size.width, size.height); } }); super.doClick(msm); } static final IndeterminateListener INDETERMINATE_LISTENER = new IndeterminateListener(); static class IndeterminateListener implements PropertyChangeListener { static final String CLIENT_PROPERTY_KEY = "JMenuItem.selectedState"; static void install(final JMenuItem menuItem) { menuItem.addPropertyChangeListener(CLIENT_PROPERTY_KEY, INDETERMINATE_LISTENER); apply(menuItem, menuItem.getClientProperty(CLIENT_PROPERTY_KEY)); } static void uninstall(final JMenuItem menuItem) { menuItem.removePropertyChangeListener(CLIENT_PROPERTY_KEY, INDETERMINATE_LISTENER); } public void propertyChange(final PropertyChangeEvent evt) { final String key = evt.getPropertyName(); if (!CLIENT_PROPERTY_KEY.equalsIgnoreCase(key)) return; final Object source = evt.getSource(); if (!(source instanceof JMenuItem)) return; final JMenuItem c = (JMenuItem)source; apply(c, evt.getNewValue()); } static void apply(final JMenuItem menuItem, final Object value) { final ButtonUI ui = menuItem.getUI(); if (!(ui instanceof AquaMenuItemUI)) return; final AquaMenuItemUI aquaUI = (AquaMenuItemUI)ui; if (aquaUI.fIsIndeterminate = "indeterminate".equals(value)) { aquaUI.checkIcon = UIManager.getIcon(aquaUI.getPropertyPrefix() + ".dashIcon"); } else { aquaUI.checkIcon = UIManager.getIcon(aquaUI.getPropertyPrefix() + ".checkIcon"); } } public static boolean isIndeterminate(final JMenuItem menuItem) { return "indeterminate".equals(menuItem.getClientProperty(CLIENT_PROPERTY_KEY)); } } }
⏎ com/apple/laf/AquaMenuItemUI.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, 33219👍, 0💬
Popular Posts:
JDK 7 tools.jar is the JAR file for JDK 7 tools. It contains Java classes to support different JDK t...
What Is javax.websocket-api-1.1. jar?javax.websocket-api-1.1. jaris the JAR file for Java API for We...
What Is ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is the JAR files of ojdbc.jar, ...
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...