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:
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/ColorPanel.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.ContainerOrderFocusTraversalPolicy; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ButtonGroup; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.border.EmptyBorder; import javax.swing.JSpinner.DefaultEditor; final class ColorPanel extends JPanel implements ActionListener { private final SlidingSpinner[] spinners = new SlidingSpinner[5]; private final float[] values = new float[this.spinners.length]; private final ColorModel model; private Color color; private int x = 1; private int y = 2; private int z; ColorPanel(ColorModel model) { super(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridx = 1; ButtonGroup group = new ButtonGroup(); EmptyBorder border = null; for (int i = 0; i < this.spinners.length; i++) { if (i < 3) { JRadioButton button = new JRadioButton(); if (i == 0) { Insets insets = button.getInsets(); insets.left = button.getPreferredSize().width; border = new EmptyBorder(insets); button.setSelected(true); gbc.insets.top = 5; } add(button, gbc); group.add(button); button.setActionCommand(Integer.toString(i)); button.addActionListener(this); this.spinners[i] = new SlidingSpinner(this, button); } else { JLabel label = new JLabel(); add(label, gbc); label.setBorder(border); label.setFocusable(false); this.spinners[i] = new SlidingSpinner(this, label); } } gbc.gridx = 2; gbc.weightx = 1.0; gbc.insets.top = 0; gbc.insets.left = 5; for (SlidingSpinner spinner : this.spinners) { add(spinner.getSlider(), gbc); gbc.insets.top = 5; } gbc.gridx = 3; gbc.weightx = 0.0; gbc.insets.top = 0; for (SlidingSpinner spinner : this.spinners) { add(spinner.getSpinner(), gbc); gbc.insets.top = 5; } setFocusTraversalPolicy(new ContainerOrderFocusTraversalPolicy()); setFocusTraversalPolicyProvider(true); setFocusable(false); this.model = model; } public void actionPerformed(ActionEvent event) { try { this.z = Integer.parseInt(event.getActionCommand()); this.y = (this.z != 2) ? 2 : 1; this.x = (this.z != 0) ? 0 : 1; getParent().repaint(); } catch (NumberFormatException exception) { } } void buildPanel() { int count = this.model.getCount(); this.spinners[4].setVisible(count > 4); for (int i = 0; i < count; i++) { String text = this.model.getLabel(this, i); Object object = this.spinners[i].getLabel(); if (object instanceof JRadioButton) { JRadioButton button = (JRadioButton) object; button.setText(text); button.getAccessibleContext().setAccessibleDescription(text); } else if (object instanceof JLabel) { JLabel label = (JLabel) object; label.setText(text); } this.spinners[i].setRange(this.model.getMinimum(i), this.model.getMaximum(i)); this.spinners[i].setValue(this.values[i]); this.spinners[i].getSlider().getAccessibleContext().setAccessibleName(text); this.spinners[i].getSpinner().getAccessibleContext().setAccessibleName(text); DefaultEditor editor = (DefaultEditor) this.spinners[i].getSpinner().getEditor(); editor.getTextField().getAccessibleContext().setAccessibleName(text); this.spinners[i].getSlider().getAccessibleContext().setAccessibleDescription(text); this.spinners[i].getSpinner().getAccessibleContext().setAccessibleDescription(text); editor.getTextField().getAccessibleContext().setAccessibleDescription(text); } } void colorChanged() { this.color = new Color(getColor(0), true); Object parent = getParent(); if (parent instanceof ColorChooserPanel) { ColorChooserPanel chooser = (ColorChooserPanel) parent; chooser.setSelectedColor(this.color); chooser.repaint(); } } float getValueX() { return this.spinners[this.x].getValue(); } float getValueY() { return 1.0f - this.spinners[this.y].getValue(); } float getValueZ() { return 1.0f - this.spinners[this.z].getValue(); } void setValue(float z) { this.spinners[this.z].setValue(1.0f - z); colorChanged(); } void setValue(float x, float y) { this.spinners[this.x].setValue(x); this.spinners[this.y].setValue(1.0f - y); colorChanged(); } int getColor(float z) { setDefaultValue(this.x); setDefaultValue(this.y); this.values[this.z] = 1.0f - z; return getColor(3); } int getColor(float x, float y) { this.values[this.x] = x; this.values[this.y] = 1.0f - y; setValue(this.z); return getColor(3); } void setColor(Color color) { if (!color.equals(this.color)) { this.color = color; this.model.setColor(color.getRGB(), this.values); for (int i = 0; i < this.model.getCount(); i++) { this.spinners[i].setValue(this.values[i]); } } } private int getColor(int index) { while (index < this.model.getCount()) { setValue(index++); } return this.model.getColor(this.values); } private void setValue(int index) { this.values[index] = this.spinners[index].getValue(); } private void setDefaultValue(int index) { float value = this.model.getDefault(index); this.values[index] = (value < 0.0f) ? this.spinners[index].getValue() : value; } }
⏎ javax/swing/colorchooser/ColorPanel.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-03-15, 212543👍, 6💬
Popular Posts:
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...
How to download and install Apache XMLBeans-2.6.0.zip? If you want to try the XMLBeans Java library,...
commons-io-2.6-sources.j aris the source JAR file for Apache Commons IO 2.6, which is a library of u...
What Is jms.jar? I heard it's related to JMS (Java Message Service) 1.1? The if you have an jms.jar ...
What Is commons-collections4-4.4 .jar?commons-collections4-4.4 .jaris the JAR file for Apache Common...