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/windows/WindowsTreeUI.java
/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.java.swing.plaf.windows; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; import javax.swing.plaf.basic.*; import javax.swing.*; import javax.swing.plaf.*; import javax.swing.tree.*; import static com.sun.java.swing.plaf.windows.TMSchema.*; import static com.sun.java.swing.plaf.windows.XPStyle.Skin; /** * A Windows tree. * <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. A future release of Swing will provide support for * long term persistence. * * @author Scott Violet */ public class WindowsTreeUI extends BasicTreeUI { public static ComponentUI createUI( JComponent c ) { return new WindowsTreeUI(); } /** * Ensures that the rows identified by beginRow through endRow are * visible. */ protected void ensureRowsAreVisible(int beginRow, int endRow) { if(tree != null && beginRow >= 0 && endRow < getRowCount(tree)) { Rectangle visRect = tree.getVisibleRect(); if(beginRow == endRow) { Rectangle scrollBounds = getPathBounds(tree, getPathForRow (tree, beginRow)); if(scrollBounds != null) { scrollBounds.x = visRect.x; scrollBounds.width = visRect.width; tree.scrollRectToVisible(scrollBounds); } } else { Rectangle beginRect = getPathBounds(tree, getPathForRow (tree, beginRow)); if (beginRect != null) { Rectangle testRect = beginRect; int beginY = beginRect.y; int maxY = beginY + visRect.height; for(int counter = beginRow + 1; counter <= endRow; counter++) { testRect = getPathBounds(tree, getPathForRow(tree, counter)); if(testRect != null && (testRect.y + testRect.height) > maxY) { counter = endRow; } } if (testRect == null) { return; } tree.scrollRectToVisible(new Rectangle(visRect.x, beginY, 1, testRect.y + testRect.height- beginY)); } } } } protected static final int HALF_SIZE = 4; protected static final int SIZE = 9; /** * Returns the default cell renderer that is used to do the * stamping of each node. */ protected TreeCellRenderer createDefaultCellRenderer() { return new WindowsTreeCellRenderer(); } /** * The minus sign button icon * <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. A future release of Swing will provide support for * long term persistence. */ @SuppressWarnings("serial") // Same-version serialization only public static class ExpandedIcon implements Icon, Serializable { public static Icon createExpandedIcon() { return new ExpandedIcon(); } Skin getSkin(Component c) { XPStyle xp = XPStyle.getXP(); return (xp != null) ? xp.getSkin(c, Part.TVP_GLYPH) : null; } public void paintIcon(Component c, Graphics g, int x, int y) { Skin skin = getSkin(c); if (skin != null) { skin.paintSkin(g, x, y, State.OPENED); return; } Color backgroundColor = c.getBackground(); if(backgroundColor != null) g.setColor(backgroundColor); else g.setColor(Color.white); g.fillRect(x, y, SIZE-1, SIZE-1); g.setColor(Color.gray); g.drawRect(x, y, SIZE-1, SIZE-1); g.setColor(Color.black); g.drawLine(x + 2, y + HALF_SIZE, x + (SIZE - 3), y + HALF_SIZE); } public int getIconWidth() { Skin skin = getSkin(null); return (skin != null) ? skin.getWidth() : SIZE; } public int getIconHeight() { Skin skin = getSkin(null); return (skin != null) ? skin.getHeight() : SIZE; } } /** * The plus sign button icon * <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. A future release of Swing will provide support for * long term persistence. */ @SuppressWarnings("serial") // Superclass is not serializable across versions public static class CollapsedIcon extends ExpandedIcon { public static Icon createCollapsedIcon() { return new CollapsedIcon(); } public void paintIcon(Component c, Graphics g, int x, int y) { Skin skin = getSkin(c); if (skin != null) { skin.paintSkin(g, x, y, State.CLOSED); } else { super.paintIcon(c, g, x, y); g.drawLine(x + HALF_SIZE, y + 2, x + HALF_SIZE, y + (SIZE - 3)); } } } @SuppressWarnings("serial") // Superclass is not serializable across versions public class WindowsTreeCellRenderer extends DefaultTreeCellRenderer { /** * Configures the renderer based on the passed in components. * The value is set from messaging the tree with * <code>convertValueToText</code>, which ultimately invokes * <code>toString</code> on <code>value</code>. * The foreground color is set based on the selection and the icon * is set based on on leaf and expanded. */ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); // Windows displays the open icon when the tree item selected. if (!tree.isEnabled()) { setEnabled(false); if (leaf) { setDisabledIcon(getLeafIcon()); } else if (sel) { setDisabledIcon(getOpenIcon()); } else { setDisabledIcon(getClosedIcon()); } } else { setEnabled(true); if (leaf) { setIcon(getLeafIcon()); } else if (sel) { setIcon(getOpenIcon()); } else { setIcon(getClosedIcon()); } } return this; } } }
⏎ com/sun/java/swing/plaf/windows/WindowsTreeUI.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, 160179👍, 5💬
Popular Posts:
JDK 11 jdk.jdeps.jmod is the JMOD file for JDK 11 JDeps tool, which can be invoked by the "jdeps" co...
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...
commons-lang-1.0.1.jar is the JAR file for Apache Commons Lang 1.0.1, which provides a host of helpe...
Apache Avalon began in 1999 as the Java Apache Server Framework and in late 2002 separated from the ...
How to download and install Apache XMLBeans Source Package? The source package contains Java source ...