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/JToolTip.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; import javax.swing.plaf.*; import javax.accessibility.*; import java.beans.BeanProperty; import java.io.ObjectOutputStream; import java.io.ObjectInputStream; import java.io.IOException; import java.util.Objects; /** * Used to display a "Tip" for a Component. Typically components provide api * to automate the process of using <code>ToolTip</code>s. * For example, any Swing component can use the <code>JComponent</code> * <code>setToolTipText</code> method to specify the text * for a standard tooltip. A component that wants to create a custom * <code>ToolTip</code> * display can override <code>JComponent</code>'s <code>createToolTip</code> * method and use a subclass of this class. * <p> * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a> * in <em>The Java Tutorial</em> * for further documentation. * <p> * <strong>Warning:</strong> Swing is not thread safe. For more * information see <a * href="package-summary.html#threading">Swing's Threading * Policy</a>. * <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}. * * @see JComponent#setToolTipText * @see JComponent#createToolTip * @author Dave Moore * @author Rich Shiavi * @since 1.2 */ @SuppressWarnings("serial") public class JToolTip extends JComponent implements Accessible { /** * @see #getUIClassID * @see #readObject */ private static final String uiClassID = "ToolTipUI"; String tipText; JComponent component; /** Creates a tool tip. */ public JToolTip() { setOpaque(true); updateUI(); } /** * Returns the L&F object that renders this component. * * @return the <code>ToolTipUI</code> object that renders this component */ public ToolTipUI getUI() { return (ToolTipUI)ui; } /** * Resets the UI property to a value from the current look and feel. * * @see JComponent#updateUI */ public void updateUI() { setUI((ToolTipUI)UIManager.getUI(this)); } /** * Returns the name of the L&F class that renders this component. * * @return the string "ToolTipUI" * @see JComponent#getUIClassID * @see UIDefaults#getUI */ public String getUIClassID() { return uiClassID; } /** * Sets the text to show when the tool tip is displayed. * The string <code>tipText</code> may be <code>null</code>. * * @param tipText the <code>String</code> to display */ @BeanProperty(preferred = true, description = "Sets the text of the tooltip") public void setTipText(String tipText) { String oldValue = this.tipText; this.tipText = tipText; firePropertyChange("tiptext", oldValue, tipText); if (!Objects.equals(oldValue, tipText)) { revalidate(); repaint(); } } /** * Returns the text that is shown when the tool tip is displayed. * The returned value may be <code>null</code>. * * @return the <code>String</code> that is displayed */ public String getTipText() { return tipText; } /** * Specifies the component that the tooltip describes. * The component <code>c</code> may be <code>null</code> * and will have no effect. * <p> * This is a bound property. * * @param c the <code>JComponent</code> being described * @see JComponent#createToolTip */ @BeanProperty(description = "Sets the component that the tooltip describes.") public void setComponent(JComponent c) { JComponent oldValue = this.component; component = c; firePropertyChange("component", oldValue, c); } /** * Returns the component the tooltip applies to. * The returned value may be <code>null</code>. * * @return the component that the tooltip describes * * @see JComponent#createToolTip */ public JComponent getComponent() { return component; } /** * Always returns true since tooltips, by definition, * should always be on top of all other windows. */ // package private boolean alwaysOnTop() { return true; } /** * See <code>readObject</code> and <code>writeObject</code> * in <code>JComponent</code> for more * information about serialization in Swing. */ private void writeObject(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); if (getUIClassID().equals(uiClassID)) { byte count = JComponent.getWriteObjCounter(this); JComponent.setWriteObjCounter(this, --count); if (count == 0 && ui != null) { ui.installUI(this); } } } /** * Returns a string representation of this <code>JToolTip</code>. * This method * is intended to be used only for debugging purposes, and the * content and format of the returned string may vary between * implementations. The returned string may be empty but may not * be <code>null</code>. * * @return a string representation of this <code>JToolTip</code> */ protected String paramString() { String tipTextString = (tipText != null ? tipText : ""); return super.paramString() + ",tipText=" + tipTextString; } ///////////////// // Accessibility support //////////////// /** * Gets the AccessibleContext associated with this JToolTip. * For tool tips, the AccessibleContext takes the form of an * AccessibleJToolTip. * A new AccessibleJToolTip instance is created if necessary. * * @return an AccessibleJToolTip that serves as the * AccessibleContext of this JToolTip */ public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJToolTip(); } return accessibleContext; } /** * This class implements accessibility support for the * <code>JToolTip</code> class. It provides an implementation of the * Java Accessibility API appropriate to tool tip user-interface elements. * <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}. */ @SuppressWarnings("serial") protected class AccessibleJToolTip extends AccessibleJComponent { /** * Get the accessible description of this object. * * @return a localized String describing this object. */ public String getAccessibleDescription() { String description = accessibleDescription; // fallback to client property if (description == null) { description = (String)getClientProperty(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY); } if (description == null) { description = getTipText(); } return description; } /** * Get the role of this object. * * @return an instance of AccessibleRole describing the role of the * object */ public AccessibleRole getAccessibleRole() { return AccessibleRole.TOOL_TIP; } } }
⏎ javax/swing/JToolTip.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, 194813👍, 5💬
Popular Posts:
How to display XML element type information with the jaxp\TypeInfoWriter.java provided in the Apache...
JDK 11 jdk.jdi.jmod is the JMOD file for JDK 11 JDI (Java Debug Interface) tool. JDK 11 JDI tool com...
XStream is a simple library to serialize objects to XML and back again. JAR File Size and Download L...
How to perform XML Schema validation with sax\Writer.java provided in the Apache Xerces package? You...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...