src/share/classes/javax/swing/JComponent.java
Print this page
*** 76,86 ****
* 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://java.sun.com/docs/books/tutorial/uiswing/overview/hierarchy.html">Swing Components and the Containment Hierarchy</a>,
* a section in <em>The Java Tutorial</em>.
*
* <p>
* The <code>JComponent</code> class provides:
* <ul>
--- 76,86 ----
* 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>
*** 90,114 ****
* 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://java.sun.com/docs/books/tutorial/uiswing/misc/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://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">Keyboard
! * Bindings in Swing</a>,
! * an article in <em>The Swing Connection</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://java.sun.com/docs/books/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
--- 90,113 ----
* 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
*** 122,140 ****
* you can associate name-object pairs
* 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://java.sun.com/docs/books/tutorial/uiswing/overview/draw.html">Painting</a> and
! * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">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://java.sun.com/docs/books/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
--- 121,139 ----
* you can associate name-object pairs
* 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
*** 148,158 ****
* 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://java.sun.com/docs/books/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
--- 147,157 ----
* 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
*** 1289,1299 ****
}
/**
* In release 1.4, the focus subsystem was rearchitected.
* For more information, see
! * <a href="http://java.sun.com/docs/books/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
--- 1288,1298 ----
}
/**
* 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
*** 1351,1361 ****
}
/**
* In release 1.4, the focus subsystem was rearchitected.
* For more information, see
! * <a href="http://java.sun.com/docs/books/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
--- 1350,1360 ----
}
/**
* 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
*** 1384,1394 ****
}
/**
* In release 1.4, the focus subsystem was rearchitected.
* For more information, see
! * <a href="http://java.sun.com/docs/books/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
--- 1383,1393 ----
}
/**
* 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
*** 1417,1427 ****
* 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://java.sun.com/docs/books/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
--- 1416,1426 ----
* 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
*** 1436,1446 ****
/**
* Returns <code>true</code> if this <code>JComponent</code> should
* get focus; otherwise returns <code>false</code>.
* <p>
* Please see
! * <a href="http://java.sun.com/docs/books/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,
--- 1435,1445 ----
/**
* 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,
*** 1462,1472 ****
* <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://java.sun.com/docs/books/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)
--- 1461,1471 ----
* <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)
*** 1485,1495 ****
* 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://java.sun.com/docs/books/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
--- 1484,1494 ----
* 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
*** 1507,1517 ****
* 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://java.sun.com/docs/books/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
--- 1506,1516 ----
* 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
*** 1528,1538 ****
* 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://java.sun.com/docs/books/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
--- 1527,1537 ----
* 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
*** 2593,2603 ****
}
/**
* In release 1.4, the focus subsystem was rearchitected.
* For more information, see
! * <a href="http://java.sun.com/docs/books/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>.
--- 2592,2602 ----
}
/**
* 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>.
*** 2984,2994 ****
/**
* Registers the text to display in a tool tip.
* The text displays when the cursor lingers over the component.
* <p>
! * See <a href="http://java.sun.com/docs/books/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
--- 2983,2993 ----
/**
* 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
*** 3204,3214 ****
* 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://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.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}
*
--- 3203,3213 ----
* 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}
*