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/CellRendererPane.java
/* * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing; import java.awt.*; import java.awt.event.*; import java.io.*; import java.beans.PropertyChangeListener; import java.util.Locale; import java.util.Vector; import javax.accessibility.*; /** * This class is inserted in between cell renderers and the components that * use them. It just exists to thwart the repaint() and invalidate() methods * which would otherwise propagate up the tree when the renderer was configured. * It's used by the implementations of JTable, JTree, and JList. For example, * here's how CellRendererPane is used in the code the paints each row * in a JList: * <pre> * cellRendererPane = new CellRendererPane(); * ... * Component rendererComponent = renderer.getListCellRendererComponent(); * renderer.configureListCellRenderer(dataModel.getElementAt(row), row); * cellRendererPane.paintComponent(g, rendererComponent, this, x, y, w, h); * </pre> * <p> * A renderer component must override isShowing() and unconditionally return * true to work correctly because the Swing paint does nothing for components * with isShowing false. * <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 Hans Muller * @since 1.2 */ @SuppressWarnings("serial") // Same-version serialization only public class CellRendererPane extends Container implements Accessible { /** * Construct a CellRendererPane object. */ public CellRendererPane() { super(); setLayout(null); setVisible(false); } /** * Overridden to avoid propagating a invalidate up the tree when the * cell renderer child is configured. */ public void invalidate() { } /** * Shouldn't be called. */ public void paint(Graphics g) { } /** * Shouldn't be called. */ public void update(Graphics g) { } /** * If the specified component is already a child of this then we don't * bother doing anything - stacking order doesn't matter for cell * renderer components (CellRendererPane doesn't paint anyway). */ protected void addImpl(Component x, Object constraints, int index) { if (x.getParent() == this) { return; } else { super.addImpl(x, constraints, index); } } /** * Paint a cell renderer component c on graphics object g. Before the component * is drawn it's reparented to this (if that's necessary), it's bounds * are set to w,h and the graphics object is (effectively) translated to x,y. * If it's a JComponent, double buffering is temporarily turned off. After * the component is painted it's bounds are reset to -w, -h, 0, 0 so that, if * it's the last renderer component painted, it will not start consuming input. * The Container p is the component we're actually drawing on, typically it's * equal to this.getParent(). If shouldValidate is true the component c will be * validated before painted. * * @param g the {@code Graphics} object to draw on * @param c the {@code Component} to draw * @param p the {@code Container} component actually drawn on * @param x an int specifying the left side of the area draw in, in pixels, * measured from the left edge of the graphics context * @param y an int specifying the top of the area to draw in, in pixels * measured down from the top edge of the graphics context * @param w an int specifying the width of the area draw in, in pixels * @param h an int specifying the height of the area draw in, in pixels * @param shouldValidate if true, component {@code c} will be validated * before being painted */ public void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h, boolean shouldValidate) { if (c == null) { if (p != null) { Color oldColor = g.getColor(); g.setColor(p.getBackground()); g.fillRect(x, y, w, h); g.setColor(oldColor); } return; } if (c.getParent() != this) { this.add(c); } c.setBounds(x, y, w, h); if(shouldValidate) { c.validate(); } boolean wasDoubleBuffered = false; if ((c instanceof JComponent) && ((JComponent)c).isDoubleBuffered()) { wasDoubleBuffered = true; ((JComponent)c).setDoubleBuffered(false); } Graphics cg = g.create(x, y, w, h); try { c.paint(cg); } finally { cg.dispose(); } if (wasDoubleBuffered && (c instanceof JComponent)) { ((JComponent)c).setDoubleBuffered(true); } c.setBounds(-w, -h, 0, 0); } /** * Calls this.paintComponent(g, c, p, x, y, w, h, false). * * @param g the {@code Graphics} object to draw on * @param c the {@code Component} to draw * @param p the {@code Container} component actually drawn on * @param x an int specifying the left side of the area draw in, in pixels, * measured from the left edge of the graphics context * @param y an int specifying the top of the area to draw in, in pixels * measured down from the top edge of the graphics context * @param w an int specifying the width of the area draw in, in pixels * @param h an int specifying the height of the area draw in, in pixels */ public void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) { paintComponent(g, c, p, x, y, w, h, false); } /** * Calls this.paintComponent() with the rectangles x,y,width,height fields. * * @param g the {@code Graphics} object to draw on * @param c the {@code Component} to draw * @param p the {@code Container} component actually drawn on * @param r the {@code Rectangle} to draw in */ public void paintComponent(Graphics g, Component c, Container p, Rectangle r) { paintComponent(g, c, p, r.x, r.y, r.width, r.height); } private void writeObject(ObjectOutputStream s) throws IOException { removeAll(); s.defaultWriteObject(); } ///////////////// // Accessibility support //////////////// /** * {@code AccessibleContext} associated with this {@code CellRendererPan} */ protected AccessibleContext accessibleContext = null; /** * Gets the AccessibleContext associated with this CellRendererPane. * For CellRendererPanes, the AccessibleContext takes the form of an * AccessibleCellRendererPane. * A new AccessibleCellRendererPane instance is created if necessary. * * @return an AccessibleCellRendererPane that serves as the * AccessibleContext of this CellRendererPane */ public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleCellRendererPane(); } return accessibleContext; } /** * This class implements accessibility support for the * <code>CellRendererPane</code> class. */ protected class AccessibleCellRendererPane extends AccessibleAWTContainer { // AccessibleContext methods // /** * Get the role of this object. * * @return an instance of AccessibleRole describing the role of the * object * @see AccessibleRole */ public AccessibleRole getAccessibleRole() { return AccessibleRole.PANEL; } } // inner class AccessibleCellRendererPane }
⏎ javax/swing/CellRendererPane.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, 194701👍, 5💬
Popular Posts:
Commons VFS provides a single API for accessing various different file systems. It presents a unifor...
How to run "jarsigner" command from JDK tools.jar file? "jarsigner" command allows you to digitally ...
commons-collections4-4.2 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...