src/share/classes/javax/swing/JComponent.java

Print this page

        

*** 78,88 **** * and <code>JApplet</code> -- * are specialized components * that provide a place for other Swing components to paint themselves. * For an explanation of containment hierarchies, see * <a ! href="http://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html">Swing Components and the Containment Hierarchy</a>, * a section in <em>The Java Tutorial</em>. * * <p> * The <code>JComponent</code> class provides: * <ul> --- 78,88 ---- * and <code>JApplet</code> -- * are specialized components * that provide a place for other Swing components to paint themselves. * For an explanation of containment hierarchies, see * <a ! href="https://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html">Swing Components and the Containment Hierarchy</a>, * a section in <em>The Java Tutorial</em>. * * <p> * The <code>JComponent</code> class provides: * <ul>
*** 92,115 **** * programmer or (optionally) selected by the user at runtime. * The look and feel for each component is provided by a * <em>UI delegate</em> -- an object that descends from * {@link javax.swing.plaf.ComponentUI}. * See <a ! * href="http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html">How * to Set the Look and Feel</a> * in <em>The Java Tutorial</em> * for more information. * <li>Comprehensive keystroke handling. * See the document <a ! * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html">How to Use Key Bindings</a>, * an article in <em>The Java Tutorial</em>, * for more information. * <li>Support for tool tips -- * short descriptions that pop up when the cursor lingers * over a component. * 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 more information. * <li>Support for accessibility. * <code>JComponent</code> contains all of the methods in the --- 92,115 ---- * programmer or (optionally) selected by the user at runtime. * The look and feel for each component is provided by a * <em>UI delegate</em> -- an object that descends from * {@link javax.swing.plaf.ComponentUI}. * See <a ! * href="https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html">How * to Set the Look and Feel</a> * in <em>The Java Tutorial</em> * for more information. * <li>Comprehensive keystroke handling. * See the document <a ! * href="https://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html">How to Use Key Bindings</a>, * an article in <em>The Java Tutorial</em>, * for more information. * <li>Support for tool tips -- * short descriptions that pop up when the cursor lingers * over a component. * See <a ! * href="https://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How * to Use Tool Tips</a> * in <em>The Java Tutorial</em> * for more information. * <li>Support for accessibility. * <code>JComponent</code> contains all of the methods in the
*** 124,141 **** * with any object that descends from <code>JComponent</code>. * <li>An infrastructure for painting * that includes double buffering and support for borders. * For more information see <a * href="http://www.oracle.com/technetwork/java/painting-140037.html#swing">Painting</a> and ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/border.htmll">How * to Use Borders</a>, * both of which are sections in <em>The Java Tutorial</em>. * </ul> * For more information on these subjects, see the * <a href="package-summary.html#package_description">Swing package description</a> * and <em>The Java Tutorial</em> section ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/jcomponent.html">The JComponent Class</a>. * <p> * <code>JComponent</code> and its subclasses document default values * for certain properties. For example, <code>JTable</code> documents the * default row height as 16. Each <code>JComponent</code> subclass * that has a <code>ComponentUI</code> will create the --- 124,141 ---- * with any object that descends from <code>JComponent</code>. * <li>An infrastructure for painting * that includes double buffering and support for borders. * For more information see <a * href="http://www.oracle.com/technetwork/java/painting-140037.html#swing">Painting</a> and ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/components/border.htmll">How * to Use Borders</a>, * both of which are sections in <em>The Java Tutorial</em>. * </ul> * For more information on these subjects, see the * <a href="package-summary.html#package_description">Swing package description</a> * and <em>The Java Tutorial</em> section ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/components/jcomponent.html">The JComponent Class</a>. * <p> * <code>JComponent</code> and its subclasses document default values * for certain properties. For example, <code>JTable</code> documents the * default row height as 16. Each <code>JComponent</code> subclass * that has a <code>ComponentUI</code> will create the
*** 149,159 **** * need a specific value for a particular property you should * explicitly set it. * <p> * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * <strong>Warning:</strong> Swing is not thread safe. For more * information see <a --- 149,159 ---- * need a specific value for a particular property you should * explicitly set it. * <p> * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * <strong>Warning:</strong> Swing is not thread safe. For more * information see <a
*** 1291,1301 **** } /** * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * Changes this <code>JComponent</code>'s focus traversal keys to * CTRL+TAB and CTRL+SHIFT+TAB. Also prevents --- 1291,1301 ---- } /** * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * Changes this <code>JComponent</code>'s focus traversal keys to * CTRL+TAB and CTRL+SHIFT+TAB. Also prevents
*** 1353,1363 **** } /** * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * Overrides the default <code>FocusTraversalPolicy</code> for this * <code>JComponent</code>'s focus traversal cycle by unconditionally --- 1353,1363 ---- } /** * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * Overrides the default <code>FocusTraversalPolicy</code> for this * <code>JComponent</code>'s focus traversal cycle by unconditionally
*** 1386,1396 **** } /** * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * Returns the <code>Component</code> set by a prior call to * <code>setNextFocusableComponent(Component)</code> on this --- 1386,1396 ---- } /** * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * Returns the <code>Component</code> set by a prior call to * <code>setNextFocusableComponent(Component)</code> on this
*** 1419,1429 **** * but did want the <code>JComponent</code> to be traversable via the * keyboard. If you do not want this <code>JComponent</code> focusable at * all, use the <code>setFocusable</code> method instead. * <p> * Please see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>, * for more information. * * @param requestFocusEnabled indicates whether you want this --- 1419,1429 ---- * but did want the <code>JComponent</code> to be traversable via the * keyboard. If you do not want this <code>JComponent</code> focusable at * all, use the <code>setFocusable</code> method instead. * <p> * Please see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>, * for more information. * * @param requestFocusEnabled indicates whether you want this
*** 1438,1448 **** /** * Returns <code>true</code> if this <code>JComponent</code> should * get focus; otherwise returns <code>false</code>. * <p> * Please see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>, * for more information. * * @return <code>true</code> if this component should get focus, --- 1438,1448 ---- /** * Returns <code>true</code> if this <code>JComponent</code> should * get focus; otherwise returns <code>false</code>. * <p> * Please see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>, * for more information. * * @return <code>true</code> if this component should get focus,
*** 1464,1474 **** * <p> * Note that the use of this method is discouraged because * its behavior is platform dependent. Instead we recommend the * use of {@link #requestFocusInWindow() requestFocusInWindow()}. * If you would like more information on focus, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * * @see java.awt.Component#requestFocusInWindow() * @see java.awt.Component#requestFocusInWindow(boolean) --- 1464,1474 ---- * <p> * Note that the use of this method is discouraged because * its behavior is platform dependent. Instead we recommend the * use of {@link #requestFocusInWindow() requestFocusInWindow()}. * If you would like more information on focus, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * * @see java.awt.Component#requestFocusInWindow() * @see java.awt.Component#requestFocusInWindow(boolean)
*** 1487,1497 **** * Note that the use of this method is discouraged because * its behavior is platform dependent. Instead we recommend the * use of {@link #requestFocusInWindow(boolean) * requestFocusInWindow(boolean)}. * If you would like more information on focus, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * * @param temporary boolean indicating if the focus change is temporary * @return <code>false</code> if the focus change request is guaranteed to --- 1487,1497 ---- * Note that the use of this method is discouraged because * its behavior is platform dependent. Instead we recommend the * use of {@link #requestFocusInWindow(boolean) * requestFocusInWindow(boolean)}. * If you would like more information on focus, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * * @param temporary boolean indicating if the focus change is temporary * @return <code>false</code> if the focus change request is guaranteed to
*** 1509,1519 **** * Refer to {@link java.awt.Component#requestFocusInWindow() * Component.requestFocusInWindow()} for a complete description of * this method. * <p> * If you would like more information on focus, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * * @return <code>false</code> if the focus change request is guaranteed to * fail; <code>true</code> if it is likely to succeed --- 1509,1519 ---- * Refer to {@link java.awt.Component#requestFocusInWindow() * Component.requestFocusInWindow()} for a complete description of * this method. * <p> * If you would like more information on focus, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * * @return <code>false</code> if the focus change request is guaranteed to * fail; <code>true</code> if it is likely to succeed
*** 1530,1540 **** * Refer to {@link java.awt.Component#requestFocusInWindow(boolean) * Component.requestFocusInWindow(boolean)} for a complete description of * this method. * <p> * If you would like more information on focus, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * * @param temporary boolean indicating if the focus change is temporary * @return <code>false</code> if the focus change request is guaranteed to --- 1530,1540 ---- * Refer to {@link java.awt.Component#requestFocusInWindow(boolean) * Component.requestFocusInWindow(boolean)} for a complete description of * this method. * <p> * If you would like more information on focus, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * * @param temporary boolean indicating if the focus change is temporary * @return <code>false</code> if the focus change request is guaranteed to
*** 2595,2605 **** } /** * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * Requests focus on this <code>JComponent</code>'s * <code>FocusTraversalPolicy</code>'s default <code>Component</code>. --- 2595,2605 ---- } /** * In release 1.4, the focus subsystem was rearchitected. * For more information, see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html"> * How to Use the Focus Subsystem</a>, * a section in <em>The Java Tutorial</em>. * <p> * Requests focus on this <code>JComponent</code>'s * <code>FocusTraversalPolicy</code>'s default <code>Component</code>.
*** 2986,2996 **** /** * Registers the text to display in a tool tip. * The text displays when the cursor lingers over the component. * <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. * * @param text the string to display; if the text is <code>null</code>, * the tool tip is turned off for this component --- 2986,2996 ---- /** * Registers the text to display in a tool tip. * The text displays when the cursor lingers over the component. * <p> ! * See <a href="https://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a> * in <em>The Java Tutorial</em> * for further documentation. * * @param text the string to display; if the text is <code>null</code>, * the tool tip is turned off for this component
*** 3206,3216 **** * set by the developer to a {@code non-null} value. Second, if the * system property {@code suppressSwingDropSupport} is {@code true}. The * default value for the system property is {@code false}. * <p> * Please see ! * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html"> * How to Use Drag and Drop and Data Transfer</a>, * a section in <em>The Java Tutorial</em>, for more information. * * @param newHandler the new {@code TransferHandler} * --- 3206,3216 ---- * set by the developer to a {@code non-null} value. Second, if the * system property {@code suppressSwingDropSupport} is {@code true}. The * default value for the system property is {@code false}. * <p> * Please see ! * <a href="https://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html"> * How to Use Drag and Drop and Data Transfer</a>, * a section in <em>The Java Tutorial</em>, for more information. * * @param newHandler the new {@code TransferHandler} *