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/colorchooser/DiagramComponent.java
/* * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.colorchooser; import java.awt.Color; import java.awt.Graphics; import java.awt.Insets; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.image.BufferedImage; import javax.swing.JComponent; @SuppressWarnings("serial") // Superclass is not serializable across versions final class DiagramComponent extends JComponent implements MouseListener, MouseMotionListener { private final ColorPanel panel; private final boolean diagram; private final Insets insets = new Insets(0, 0, 0, 0); private int width; private int height; private int[] array; private BufferedImage image; DiagramComponent(ColorPanel panel, boolean diagram) { this.panel = panel; this.diagram = diagram; addMouseListener(this); addMouseMotionListener(this); } @Override protected void paintComponent(Graphics g) { getInsets(this.insets); this.width = getWidth() - this.insets.left - this.insets.right; this.height = getHeight() - this.insets.top - this.insets.bottom; if ((this.width <= 0) || (this.height <= 0)) return; boolean update = (this.image == null) || (this.width != this.image.getWidth()) || (this.height != this.image.getHeight()); if (update) { int size = this.width * this.height; if ((this.array == null) || (this.array.length < size)) { this.array = new int[size]; } this.image = new BufferedImage(this.width, this.height, BufferedImage.TYPE_INT_RGB); } { float dx = 1.0f / (float) (this.width - 1); float dy = 1.0f / (float) (this.height - 1); int offset = 0; float y = 0.0f; for (int h = 0; h < this.height; h++, y += dy) { if (this.diagram) { float x = 0.0f; for (int w = 0; w < this.width; w++, x += dx, offset++) { this.array[offset] = this.panel.getColor(x, y); } } else { int color = this.panel.getColor(y); for (int w = 0; w < this.width; w++, offset++) { this.array[offset] = color; } } } } this.image.setRGB(0, 0, this.width, this.height, this.array, 0, this.width); g.drawImage(this.image, this.insets.left, this.insets.top, this.width, this.height, this); if (isEnabled()) { this.width--; this.height--; g.setXORMode(Color.WHITE); g.setColor(Color.BLACK); if (this.diagram) { int x = getValue(this.panel.getValueX(), this.insets.left, this.width); int y = getValue(this.panel.getValueY(), this.insets.top, this.height); g.drawLine(x - 8, y, x + 8, y); g.drawLine(x, y - 8, x, y + 8); } else { int z = getValue(this.panel.getValueZ(), this.insets.top, this.height); g.drawLine(this.insets.left, z, this.insets.left + this.width, z); } g.setPaintMode(); } } public void mousePressed(MouseEvent event) { mouseDragged(event); } public void mouseReleased(MouseEvent event) { } public void mouseClicked(MouseEvent event) { } public void mouseEntered(MouseEvent event) { } public void mouseExited(MouseEvent event) { } public void mouseMoved(MouseEvent event) { } public void mouseDragged(MouseEvent event) { if (isEnabled()) { float y = getValue(event.getY(), this.insets.top, this.height); if (this.diagram) { float x = getValue(event.getX(), this.insets.left, this.width); this.panel.setValue(x, y); } else { this.panel.setValue(y); } } } private static int getValue(float value, int min, int max) { return min + (int) (value * (float) (max)); } private static float getValue(int value, int min, int max) { if (min < value) { value -= min; return (value < max) ? (float) value / (float) max : 1.0f; } return 0.0f; } }
⏎ javax/swing/colorchooser/DiagramComponent.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, 194565👍, 5💬
Popular Posts:
What Is poi-5.2.3.jar? poi-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an...
Xalan-Java, Version 2.7.1, is an XSLT processor for transforming XML documents into HTML, text, or o...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-src.zip...
JDK 11 jdk.localedata.jmod is the JMOD file for JDK 11 Localedata module. JDK 11 Locale Data module ...
What Is poi-3.5.jar - Part 2? poi-3.5.jar is one of the JAR files for Apache POI 3.5, which provides...