Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
Collections:
Other Resources:
JRE 8 rt.jar - javax.* Package Source Code
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries.
JRE (Java Runtime) 8 is the runtime environment included in JDK 8.
JRE 8 rt.jar libraries are divided into 6 packages:
com.* - Internal Oracle and Sun Microsystems libraries java.* - Standard Java API libraries. javax.* - Extended Java API libraries. jdk.* - JDK supporting libraries. org.* - Third party libraries. sun.* - Old libraries developed by Sun Microsystems.
JAR File Information:
Directory of C:\fyicenter\jdk-1.8.0_191\jre\lib
63,596,151 rt.jar
Here is the list of Java classes of the javax.* package in JRE 1.8.0_191 rt.jar. Java source codes are also provided.
✍: FYIcenter
⏎ javax/swing/colorchooser/ColorChooserPanel.java
/*
* Copyright (c) 2008, 2012, 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.Component;
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
final class ColorChooserPanel extends AbstractColorChooserPanel implements PropertyChangeListener {
private static final int MASK = 0xFF000000;
private final ColorModel model;
private final ColorPanel panel;
private final DiagramComponent slider;
private final DiagramComponent diagram;
private final JFormattedTextField text;
private final JLabel label;
ColorChooserPanel(ColorModel model) {
this.model = model;
this.panel = new ColorPanel(this.model);
this.slider = new DiagramComponent(this.panel, false);
this.diagram = new DiagramComponent(this.panel, true);
this.text = new JFormattedTextField();
this.label = new JLabel(null, null, SwingConstants.RIGHT);
ValueFormatter.init(6, true, this.text);
}
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
setEnabled(this, enabled);
}
private static void setEnabled(Container container, boolean enabled) {
for (Component component : container.getComponents()) {
component.setEnabled(enabled);
if (component instanceof Container) {
setEnabled((Container) component, enabled);
}
}
}
@Override
public void updateChooser() {
Color color = getColorFromModel();
if (color != null) {
this.panel.setColor(color);
this.text.setValue(Integer.valueOf(color.getRGB()));
this.slider.repaint();
this.diagram.repaint();
}
}
@Override
protected void buildChooser() {
if (0 == getComponentCount()) {
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 3;
gbc.gridwidth = 2;
gbc.weighty = 1.0;
gbc.anchor = GridBagConstraints.NORTH;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets.top = 10;
gbc.insets.right = 10;
add(this.panel, gbc);
gbc.gridwidth = 1;
gbc.weightx = 1.0;
gbc.weighty = 0.0;
gbc.anchor = GridBagConstraints.CENTER;
gbc.insets.right = 5;
gbc.insets.bottom = 10;
add(this.label, gbc);
gbc.gridx = 4;
gbc.weightx = 0.0;
gbc.insets.right = 10;
add(this.text, gbc);
gbc.gridx = 2;
gbc.gridheight = 2;
gbc.anchor = GridBagConstraints.NORTH;
gbc.ipadx = this.text.getPreferredSize().height;
gbc.ipady = getPreferredSize().height;
add(this.slider, gbc);
gbc.gridx = 1;
gbc.insets.left = 10;
gbc.ipadx = gbc.ipady;
add(this.diagram, gbc);
this.label.setLabelFor(this.text);
this.text.addPropertyChangeListener("value", this); // NON-NLS: the property name
this.slider.setBorder(this.text.getBorder());
this.diagram.setBorder(this.text.getBorder());
setInheritsPopupMenu(this, true); // CR:4966112
}
String label = this.model.getText(this, "HexCode"); // NON-NLS: suffix
boolean visible = label != null;
this.text.setVisible(visible);
this.text.getAccessibleContext().setAccessibleDescription(label);
this.label.setVisible(visible);
if (visible) {
this.label.setText(label);
int mnemonic = this.model.getInteger(this, "HexCodeMnemonic"); // NON-NLS: suffix
if (mnemonic > 0) {
this.label.setDisplayedMnemonic(mnemonic);
mnemonic = this.model.getInteger(this, "HexCodeMnemonicIndex"); // NON-NLS: suffix
if (mnemonic >= 0) {
this.label.setDisplayedMnemonicIndex(mnemonic);
}
}
}
this.panel.buildPanel();
}
@Override
public String getDisplayName() {
return this.model.getText(this, "Name"); // NON-NLS: suffix
}
@Override
public int getMnemonic() {
return this.model.getInteger(this, "Mnemonic"); // NON-NLS: suffix
}
@Override
public int getDisplayedMnemonicIndex() {
return this.model.getInteger(this, "DisplayedMnemonicIndex"); // NON-NLS: suffix
}
@Override
public Icon getSmallDisplayIcon() {
return null;
}
@Override
public Icon getLargeDisplayIcon() {
return null;
}
public void propertyChange(PropertyChangeEvent event) {
ColorSelectionModel model = getColorSelectionModel();
if (model != null) {
Object object = event.getNewValue();
if (object instanceof Integer) {
int value = MASK & model.getSelectedColor().getRGB() | (Integer) object;
model.setSelectedColor(new Color(value, true));
}
}
this.text.selectAll();
}
/**
* Allows to show context popup for all components recursively.
*
* @param component the root component of the tree
* @param value whether or not the popup menu is inherited
*/
private static void setInheritsPopupMenu(JComponent component, boolean value) {
component.setInheritsPopupMenu(value);
for (Object object : component.getComponents()) {
if (object instanceof JComponent) {
setInheritsPopupMenu((JComponent) object, value);
}
}
}
}
⏎ javax/swing/colorchooser/ColorChooserPanel.java
Or download all of them as a single archive file:
File name: jre-rt-javax-1.8.0_191-src.zip File size: 5381005 bytes Release date: 2018-10-28 Download
⇒ JRE 8 rt.jar - org.* Package Source Code
2024-07-16, ≈572🔥, 7💬
Popular Posts:
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
Old version of xml-apis.jar. JAR File Size and Download Location: File name: xmlParserAPIs.jar File ...
JDK 17 jdk.incubator.vector.jmo dis the JMOD file for JDK 17 HTTP Server module. JDK 17 Incubator Ve...
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-src.zip...