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/border/MatteBorder.java
/* * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.border; import java.awt.Graphics; import java.awt.Insets; import java.awt.Component; import java.awt.Color; import javax.swing.Icon; /** * A class which provides a matte-like border of either a solid color * or a tiled 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. 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 Amy Fowler */ @SuppressWarnings("serial") public class MatteBorder extends EmptyBorder { /** * The color rendered for the border. */ protected Color color; /** * The icon to be used for tiling the border. */ protected Icon tileIcon; /** * Creates a matte border with the specified insets and color. * @param top the top inset of the border * @param left the left inset of the border * @param bottom the bottom inset of the border * @param right the right inset of the border * @param matteColor the color rendered for the border */ public MatteBorder(int top, int left, int bottom, int right, Color matteColor) { super(top, left, bottom, right); this.color = matteColor; } /** * Creates a matte border with the specified insets and color. * @param borderInsets the insets of the border * @param matteColor the color rendered for the border * @since 1.3 */ public MatteBorder(Insets borderInsets, Color matteColor) { super(borderInsets); this.color = matteColor; } /** * Creates a matte border with the specified insets and tile icon. * @param top the top inset of the border * @param left the left inset of the border * @param bottom the bottom inset of the border * @param right the right inset of the border * @param tileIcon the icon to be used for tiling the border */ public MatteBorder(int top, int left, int bottom, int right, Icon tileIcon) { super(top, left, bottom, right); this.tileIcon = tileIcon; } /** * Creates a matte border with the specified insets and tile icon. * @param borderInsets the insets of the border * @param tileIcon the icon to be used for tiling the border * @since 1.3 */ public MatteBorder(Insets borderInsets, Icon tileIcon) { super(borderInsets); this.tileIcon = tileIcon; } /** * Creates a matte border with the specified tile icon. The * insets will be calculated dynamically based on the size of * the tile icon, where the top and bottom will be equal to the * tile icon's height, and the left and right will be equal to * the tile icon's width. * @param tileIcon the icon to be used for tiling the border */ public MatteBorder(Icon tileIcon) { this(-1,-1,-1,-1, tileIcon); } /** * Paints the matte border. */ public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Insets insets = getBorderInsets(c); Color oldColor = g.getColor(); g.translate(x, y); // If the tileIcon failed loading, paint as gray. if (tileIcon != null) { color = (tileIcon.getIconWidth() == -1) ? Color.gray : null; } if (color != null) { g.setColor(color); g.fillRect(0, 0, width - insets.right, insets.top); g.fillRect(0, insets.top, insets.left, height - insets.top); g.fillRect(insets.left, height - insets.bottom, width - insets.left, insets.bottom); g.fillRect(width - insets.right, 0, insets.right, height - insets.bottom); } else if (tileIcon != null) { int tileW = tileIcon.getIconWidth(); int tileH = tileIcon.getIconHeight(); paintEdge(c, g, 0, 0, width - insets.right, insets.top, tileW, tileH); paintEdge(c, g, 0, insets.top, insets.left, height - insets.top, tileW, tileH); paintEdge(c, g, insets.left, height - insets.bottom, width - insets.left, insets.bottom, tileW, tileH); paintEdge(c, g, width - insets.right, 0, insets.right, height - insets.bottom, tileW, tileH); } g.translate(-x, -y); g.setColor(oldColor); } private void paintEdge(Component c, Graphics g, int x, int y, int width, int height, int tileW, int tileH) { g = g.create(x, y, width, height); int sY = -(y % tileH); for (x = -(x % tileW); x < width; x += tileW) { for (y = sY; y < height; y += tileH) { this.tileIcon.paintIcon(c, g, x, y); } } g.dispose(); } /** * Reinitialize the insets parameter with this Border's current Insets. * @param c the component for which this border insets value applies * @param insets the object to be reinitialized * @since 1.3 */ public Insets getBorderInsets(Component c, Insets insets) { return computeInsets(insets); } /** * Returns the insets of the border. * @since 1.3 */ public Insets getBorderInsets() { return computeInsets(new Insets(0,0,0,0)); } /* should be protected once api changes area allowed */ private Insets computeInsets(Insets insets) { if (tileIcon != null && top == -1 && bottom == -1 && left == -1 && right == -1) { int w = tileIcon.getIconWidth(); int h = tileIcon.getIconHeight(); insets.top = h; insets.right = w; insets.bottom = h; insets.left = w; } else { insets.left = left; insets.top = top; insets.right = right; insets.bottom = bottom; } return insets; } /** * Returns the color used for tiling the border or null * if a tile icon is being used. * * @return the {@code Color} object used to render the border or {@code null} * if a tile icon is used * @since 1.3 */ public Color getMatteColor() { return color; } /** * Returns the icon used for tiling the border or null * if a solid color is being used. * * @return the {@code Icon} used to tile the border or {@code null} if a * solid color is used to fill the border * @since 1.3 */ public Icon getTileIcon() { return tileIcon; } /** * Returns whether or not the border is opaque. * * @return {@code true} if the border is opaque, {@code false} otherwise */ public boolean isBorderOpaque() { // If a tileIcon is set, then it may contain transparent bits return color != null; } }
⏎ javax/swing/border/MatteBorder.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, 194607👍, 5💬
Popular Posts:
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 ...
Apache Log4j API provides the interface that applications should code to and provides the adapter co...
pache Derby is an open source relational database implemented entirely in Java and available under t...
JDK 17 java.xml.jmod is the JMOD file for JDK 17 XML (eXtensible Markup Language) module. JDK 17 XML...
JRE 8 plugin.jar is the JAR file for JRE 8 Java Control Panel Plugin interface and tools. JRE (Java ...