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/sun/java/swing/plaf/motif/MotifInternalFrameUI.java
/* * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.java.swing.plaf.motif; import java.awt.Color; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import javax.swing.AbstractAction; import javax.swing.ActionMap; import javax.swing.InputMap; import javax.swing.JComponent; import javax.swing.JInternalFrame; import javax.swing.KeyStroke; import javax.swing.LookAndFeel; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.border.Border; import javax.swing.plaf.ActionMapUIResource; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.UIResource; import javax.swing.plaf.basic.BasicInternalFrameUI; /** * A Motif {@literal L&F} implementation of InternalFrame. * * @author Tom Ball */ public class MotifInternalFrameUI extends BasicInternalFrameUI { Color color; Color highlight; Color shadow; MotifInternalFrameTitlePane titlePane; /** * As of Java 2 platform v1.3 this previously undocumented field is no * longer used. * Key bindings are now defined by the LookAndFeel, please refer to * the key bindings specification for further details. * * @deprecated As of Java 2 platform v1.3. */ @Deprecated protected KeyStroke closeMenuKey; ///////////////////////////////////////////////////////////////////////////// // ComponentUI Interface Implementation methods ///////////////////////////////////////////////////////////////////////////// public static ComponentUI createUI(JComponent w) { return new MotifInternalFrameUI((JInternalFrame)w); } public MotifInternalFrameUI(JInternalFrame w) { super(w); } public void installUI(JComponent c) { super.installUI(c); setColors((JInternalFrame)c); } protected void installDefaults() { Border frameBorder = frame.getBorder(); frame.setLayout(internalFrameLayout = createLayoutManager()); if (frameBorder == null || frameBorder instanceof UIResource) { frame.setBorder(new MotifBorders.InternalFrameBorder(frame)); } } protected void installKeyboardActions(){ super.installKeyboardActions(); // We replace the // we use JPopup in our TitlePane so need escape support closeMenuKey = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); } protected void uninstallDefaults() { LookAndFeel.uninstallBorder(frame); frame.setLayout(null); internalFrameLayout = null; } private JInternalFrame getFrame(){ return frame; } public JComponent createNorthPane(JInternalFrame w) { titlePane = new MotifInternalFrameTitlePane(w); return titlePane; } public Dimension getMaximumSize(JComponent x) { return Toolkit.getDefaultToolkit().getScreenSize(); } protected void uninstallKeyboardActions(){ super.uninstallKeyboardActions(); if (isKeyBindingRegistered()){ JInternalFrame.JDesktopIcon di = frame.getDesktopIcon(); SwingUtilities.replaceUIActionMap(di, null); SwingUtilities.replaceUIInputMap(di, JComponent.WHEN_IN_FOCUSED_WINDOW, null); } } @SuppressWarnings("serial") // anonymous class protected void setupMenuOpenKey(){ super.setupMenuOpenKey(); ActionMap map = SwingUtilities.getUIActionMap(frame); if (map != null) { // BasicInternalFrameUI creates an action with the same name, we override // it as MotifInternalFrameTitlePane has a titlePane ivar that shadows the // titlePane ivar in BasicInternalFrameUI, making supers action throw // an NPE for us. map.put("showSystemMenu", new AbstractAction(){ public void actionPerformed(ActionEvent e){ titlePane.showSystemMenu(); } public boolean isEnabled(){ return isKeyBindingActive(); } }); } } @SuppressWarnings("serial") // anonymous class protected void setupMenuCloseKey(){ ActionMap map = SwingUtilities.getUIActionMap(frame); if (map != null) { map.put("hideSystemMenu", new AbstractAction(){ public void actionPerformed(ActionEvent e){ titlePane.hideSystemMenu(); } public boolean isEnabled(){ return isKeyBindingActive(); } }); } // Set up the bindings for the DesktopIcon, it is odd that // we install them, and not the desktop icon. JInternalFrame.JDesktopIcon di = frame.getDesktopIcon(); InputMap diInputMap = SwingUtilities.getUIInputMap (di, JComponent.WHEN_IN_FOCUSED_WINDOW); if (diInputMap == null) { Object[] bindings = (Object[])UIManager.get ("DesktopIcon.windowBindings"); if (bindings != null) { diInputMap = LookAndFeel.makeComponentInputMap(di, bindings); SwingUtilities.replaceUIInputMap(di, JComponent. WHEN_IN_FOCUSED_WINDOW, diInputMap); } } ActionMap diActionMap = SwingUtilities.getUIActionMap(di); if (diActionMap == null) { diActionMap = new ActionMapUIResource(); diActionMap.put("hideSystemMenu", new AbstractAction(){ public void actionPerformed(ActionEvent e){ JInternalFrame.JDesktopIcon icon = getFrame(). getDesktopIcon(); MotifDesktopIconUI micon = (MotifDesktopIconUI)icon. getUI(); micon.hideSystemMenu(); } public boolean isEnabled(){ return isKeyBindingActive(); } }); SwingUtilities.replaceUIActionMap(di, diActionMap); } } /** This method is called when the frame becomes selected. */ protected void activateFrame(JInternalFrame f) { super.activateFrame(f); setColors(f); } /** This method is called when the frame is no longer selected. */ protected void deactivateFrame(JInternalFrame f) { setColors(f); super.deactivateFrame(f); } void setColors(JInternalFrame frame) { if (frame.isSelected()) { color = UIManager.getColor("InternalFrame.activeTitleBackground"); } else { color = UIManager.getColor("InternalFrame.inactiveTitleBackground"); } highlight = color.brighter(); shadow = color.darker().darker(); titlePane.setColors(color, highlight, shadow); } }
⏎ com/sun/java/swing/plaf/motif/MotifInternalFrameUI.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, 83977👍, 0💬
Popular Posts:
How to show the XML parsing flow with sax\DocumentTracer.java provided in the Apache Xerces package?...
How to read XML document with XML Schema validation from socket connections with the socket\DelayedI...
What Is ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is the JAR files of ojdbc.jar, JD...
Xalan-Java, Version 2.7.1, is an XSLT processor for transforming XML documents into HTML, text, or o...
JDOM provides a solution for using XML from Java that is as simple as Java itself. There is no compe...