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/MetalScrollButton.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 java.awt.Dimension; import java.awt.Graphics; import java.awt.Color; import java.awt.Polygon; import javax.swing.*; import javax.swing.plaf.basic.BasicArrowButton; /** * JButton object for Metal scrollbar arrows. * <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 Tom Santos * @author Steve Wilson */ @SuppressWarnings("serial") // Same-version serialization only public class MetalScrollButton extends BasicArrowButton { private static Color shadowColor; private static Color highlightColor; private boolean isFreeStanding = false; private int buttonWidth; /** * Constructs an instance of {@code MetalScrollButton}. * * @param direction the direction * @param width the width * @param freeStanding the free standing value */ public MetalScrollButton( int direction, int width, boolean freeStanding ) { super( direction ); shadowColor = UIManager.getColor("ScrollBar.darkShadow"); highlightColor = UIManager.getColor("ScrollBar.highlight"); buttonWidth = width; isFreeStanding = freeStanding; } /** * Sets the free standing value. * * @param freeStanding the free standing value */ public void setFreeStanding( boolean freeStanding ) { isFreeStanding = freeStanding; } public void paint( Graphics g ) { boolean leftToRight = MetalUtils.isLeftToRight(this); boolean isEnabled = getParent().isEnabled(); Color arrowColor = isEnabled ? MetalLookAndFeel.getControlInfo() : MetalLookAndFeel.getControlDisabled(); boolean isPressed = getModel().isPressed(); int width = getWidth(); int height = getHeight(); int w = width; int h = height; int arrowHeight = (height+1) / 4; int arrowWidth = (height+1) / 2; if ( isPressed ) { g.setColor( MetalLookAndFeel.getControlShadow() ); } else { g.setColor( getBackground() ); } g.fillRect( 0, 0, width, height ); if ( getDirection() == NORTH ) { if ( !isFreeStanding ) { height +=1; g.translate( 0, -1 ); width += 2; if ( !leftToRight ) { g.translate( -1, 0 ); } } // Draw the arrow g.setColor( arrowColor ); int startY = ((h+1) - arrowHeight) / 2; int startX = (w / 2); g.translate(startX, startY); g.fillPolygon(new int[]{0, 1, arrowHeight + 1, -arrowHeight}, new int[]{0, 0, arrowHeight, arrowHeight}, 4); g.translate(-startX, -startY); if (isEnabled) { g.setColor( highlightColor ); if ( !isPressed ) { g.drawLine( 1, 1, width - 3, 1 ); g.drawLine( 1, 1, 1, height - 1 ); } g.drawLine( width - 1, 1, width - 1, height - 1 ); g.setColor( shadowColor ); g.drawLine( 0, 0, width - 2, 0 ); g.drawLine( 0, 0, 0, height - 1 ); g.drawLine( width - 2, 2, width - 2, height - 1 ); } else { MetalUtils.drawDisabledBorder(g, 0, 0, width, height+1); } if ( !isFreeStanding ) { height -= 1; g.translate( 0, 1 ); width -= 2; if ( !leftToRight ) { g.translate( 1, 0 ); } } } else if ( getDirection() == SOUTH ) { if ( !isFreeStanding ) { height += 1; width += 2; if ( !leftToRight ) { g.translate( -1, 0 ); } } // Draw the arrow g.setColor( arrowColor ); int startY = (((h+1) - arrowHeight) / 2)+ arrowHeight-1; int startX = (w / 2); g.translate(startX, startY); g.fillPolygon(new int[]{0, 1, arrowHeight + 1, -arrowHeight}, new int[]{0, 0, -arrowHeight, -arrowHeight}, 4); g.translate(-startX, -startY); if (isEnabled) { g.setColor( highlightColor ); if ( !isPressed ) { g.drawLine( 1, 0, width - 3, 0 ); g.drawLine( 1, 0, 1, height - 3 ); } g.drawLine( 1, height - 1, width - 1, height - 1 ); g.drawLine( width - 1, 0, width - 1, height - 1 ); g.setColor( shadowColor ); g.drawLine( 0, 0, 0, height - 2 ); g.drawLine( width - 2, 0, width - 2, height - 2 ); g.drawLine( 2, height - 2, width - 2, height - 2 ); } else { MetalUtils.drawDisabledBorder(g, 0,-1, width, height+1); } if ( !isFreeStanding ) { height -= 1; width -= 2; if ( !leftToRight ) { g.translate( 1, 0 ); } } } else if ( getDirection() == EAST ) { if ( !isFreeStanding ) { height += 2; width += 1; } // Draw the arrow g.setColor( arrowColor ); int startX = (((w+1) - arrowHeight) / 2) + arrowHeight-1; int startY = (h / 2); g.translate(startX, startY); g.fillPolygon(new int[]{0, 0, -arrowHeight, -arrowHeight}, new int[]{0, 1, arrowHeight + 1, -arrowHeight}, 4); g.translate(-startX, -startY); if (isEnabled) { g.setColor( highlightColor ); if ( !isPressed ) { g.drawLine( 0, 1, width - 3, 1 ); g.drawLine( 0, 1, 0, height - 3 ); } g.drawLine( width - 1, 1, width - 1, height - 1 ); g.drawLine( 0, height - 1, width - 1, height - 1 ); g.setColor( shadowColor ); g.drawLine( 0, 0,width - 2, 0 ); g.drawLine( width - 2, 2, width - 2, height - 2 ); g.drawLine( 0, height - 2, width - 2, height - 2 ); } else { MetalUtils.drawDisabledBorder(g,-1,0, width+1, height); } if ( !isFreeStanding ) { height -= 2; width -= 1; } } else if ( getDirection() == WEST ) { if ( !isFreeStanding ) { height += 2; width += 1; g.translate( -1, 0 ); } // Draw the arrow g.setColor( arrowColor ); int startX = (((w+1) - arrowHeight) / 2); int startY = (h / 2); g.translate(startX, startY); g.fillPolygon(new int[]{0, 0, arrowHeight, arrowHeight}, new int[]{0, 1, arrowHeight + 1, -arrowHeight}, 4); g.translate(-startX, -startY); if (isEnabled) { g.setColor( highlightColor ); if ( !isPressed ) { g.drawLine( 1, 1, width - 1, 1 ); g.drawLine( 1, 1, 1, height - 3 ); } g.drawLine( 1, height - 1, width - 1, height - 1 ); g.setColor( shadowColor ); g.drawLine( 0, 0, width - 1, 0 ); g.drawLine( 0, 0, 0, height - 2 ); g.drawLine( 2, height - 2, width - 1, height - 2 ); } else { MetalUtils.drawDisabledBorder(g,0,0, width+1, height); } if ( !isFreeStanding ) { height -= 2; width -= 1; g.translate( 1, 0 ); } } } public Dimension getPreferredSize() { if ( getDirection() == NORTH ) { return new Dimension( buttonWidth, buttonWidth - 2 ); } else if ( getDirection() == SOUTH ) { return new Dimension( buttonWidth, buttonWidth - (isFreeStanding ? 1 : 2) ); } else if ( getDirection() == EAST ) { return new Dimension( buttonWidth - (isFreeStanding ? 1 : 2), buttonWidth ); } else if ( getDirection() == WEST ) { return new Dimension( buttonWidth - 2, buttonWidth ); } else { return new Dimension( 0, 0 ); } } public Dimension getMinimumSize() { return getPreferredSize(); } public Dimension getMaximumSize() { return new Dimension( Integer.MAX_VALUE, Integer.MAX_VALUE ); } /** * Returns the width of the button. * * @return the width of the button */ public int getButtonWidth() { return buttonWidth; } }
⏎ javax/swing/plaf/metal/MetalScrollButton.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, 195322👍, 5💬
Popular Posts:
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...
What Is log4j-1.2.13.jar? I got the JAR file from logging-log4j-1.2.13.zip .log4j-1.2.13.jar is the ...
The Java Naming and Directory Interface (JNDI) is part of the Java platform, providing applications ...
JDK 11 jdk.xml.dom.jmod is the JMOD file for JDK 11 XML DOM module. JDK 11 XML DOM module compiled c...
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms, it was develo...