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
⏎ com/sun/java/swing/plaf/gtk/GTKStyleFactory.java
/* * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.java.swing.plaf.gtk; import java.awt.Font; import java.util.*; import javax.swing.*; import javax.swing.plaf.synth.*; import com.sun.java.swing.plaf.gtk.GTKEngine.WidgetType; /** * * @author Scott Violet */ class GTKStyleFactory extends SynthStyleFactory { /** * Saves all styles that have been accessed. In most common cases, * the hash key is simply the WidgetType, but in more complex cases * it will be a ComplexKey object that contains arguments to help * differentiate similar styles. */ private final Map<Object, GTKStyle> stylesCache; private Font defaultFont; GTKStyleFactory() { stylesCache = new HashMap<Object, GTKStyle>(); } /** * Returns the <code>GTKStyle</code> to use based on the * <code>Region</code> id * * @param c this parameter isn't used, may be null. * @param id of the region to get the style. */ public synchronized SynthStyle getStyle(JComponent c, Region id) { WidgetType wt = GTKEngine.getWidgetType(c, id); Object key = null; if (id == Region.SCROLL_BAR) { // The style/insets of a scrollbar can depend on a number of // factors (see GTKStyle.getScrollBarInsets()) so use a // complex key here. if (c != null) { JScrollBar sb = (JScrollBar)c; boolean sp = (sb.getParent() instanceof JScrollPane); boolean horiz = (sb.getOrientation() == JScrollBar.HORIZONTAL); boolean ltr = sb.getComponentOrientation().isLeftToRight(); boolean focusable = sb.isFocusable(); key = new ComplexKey(wt, sp, horiz, ltr, focusable); } } else if (id == Region.CHECK_BOX || id == Region.RADIO_BUTTON) { // The style/insets of a checkbox or radiobutton can depend // on the component orientation, so use a complex key here. if (c != null) { boolean ltr = c.getComponentOrientation().isLeftToRight(); key = new ComplexKey(wt, ltr); } } else if (id == Region.BUTTON) { // The style/insets of a button can depend on whether it is // default capable or in a toolbar, so use a complex key here. if (c != null) { JButton btn = (JButton)c; boolean toolButton = (btn.getParent() instanceof JToolBar); boolean defaultCapable = btn.isDefaultCapable(); key = new ComplexKey(wt, toolButton, defaultCapable); } } else if (id == Region.MENU) { if (c instanceof JMenu && ((JMenu) c).isTopLevelMenu() && UIManager.getBoolean("Menu.useMenuBarForTopLevelMenus")) { wt = WidgetType.MENU_BAR; } } if (key == null) { // Otherwise, just use the WidgetType as the key. key = wt; } GTKStyle result = stylesCache.get(key); if (result == null) { result = new GTKStyle(defaultFont, wt); stylesCache.put(key, result); } return result; } void initStyles(Font defaultFont) { this.defaultFont = defaultFont; stylesCache.clear(); } /** * Represents a hash key used for fetching GTKStyle objects from the * cache. In most cases only the WidgetType is used for lookup, but * in some complex cases, other Object arguments can be specified * via a ComplexKey to differentiate the various styles. */ private static class ComplexKey { private final WidgetType wt; private final Object[] args; ComplexKey(WidgetType wt, Object... args) { this.wt = wt; this.args = args; } @Override public int hashCode() { int hash = wt.hashCode(); if (args != null) { for (Object arg : args) { hash = hash*29 + (arg == null ? 0 : arg.hashCode()); } } return hash; } @Override public boolean equals(Object o) { if (!(o instanceof ComplexKey)) { return false; } ComplexKey that = (ComplexKey)o; if (this.wt == that.wt) { if (this.args == null && that.args == null) { return true; } if (this.args != null && that.args != null && this.args.length == that.args.length) { for (int i = 0; i < this.args.length; i++) { Object a1 = this.args[i]; Object a2 = that.args[i]; if (!(a1==null ? a2==null : a1.equals(a2))) { return false; } } return true; } } return false; } @Override public String toString() { String str = "ComplexKey[wt=" + wt; if (args != null) { str += ",args=["; for (int i = 0; i < args.length; i++) { str += args[i]; if (i < args.length-1) str += ","; } str += "]"; } str += "]"; return str; } } }
⏎ com/sun/java/swing/plaf/gtk/GTKStyleFactory.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, 163115👍, 5💬
Popular Posts:
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
Apache Avalon began in 1999 as the Java Apache Server Framework and in late 2002 separated from the ...
JDK 11 jdk.javadoc.jmod is the JMOD file for JDK 11 Java Document tool, which can be invoked by the ...
JDK 11 jdk.internal.JVM Stat.jmod is the JMOD file for JDK 11 Internal Jvmstat module. JDK 11 Intern...
Where to find answers to frequently asked questions on Downloading and Installing Connector/J - JDBC...