< prev index next >
src/java.desktop/share/classes/java/awt/Component.java
Print this page
@@ -87,13 +87,13 @@
/**
* A <em>component</em> is an object having a graphical representation
* that can be displayed on the screen and that can interact with the
* user. Examples of components are the buttons, checkboxes, and scrollbars
* of a typical graphical user interface. <p>
- * The <code>Component</code> class is the abstract superclass of
+ * The {@code Component} class is the abstract superclass of
* the nonmenu-related Abstract Window Toolkit components. Class
- * <code>Component</code> can also be extended directly to create a
+ * {@code Component} can also be extended directly to create a
* lightweight component. A lightweight component is a component that is
* not associated with a native window. On the contrary, a heavyweight
* component is associated with a native window. The {@link #isLightweight()}
* method may be used to distinguish between the two kinds of the components.
* <p>
@@ -105,14 +105,14 @@
* validated afterwards by means of the {@link Container#validate()} method
* invoked on the top-most invalid container of the hierarchy.
*
* <h3>Serialization</h3>
* It is important to note that only AWT listeners which conform
- * to the <code>Serializable</code> protocol will be saved when
+ * to the {@code Serializable} protocol will be saved when
* the object is stored. If an AWT object has listeners that
* aren't marked serializable, they will be dropped at
- * <code>writeObject</code> time. Developers will need, as always,
+ * {@code writeObject} time. Developers will need, as always,
* to consider the implications of making an object serializable.
* One situation to watch out for is this:
* <pre>
* import java.awt.*;
* import java.awt.event.*;
@@ -134,16 +134,16 @@
* {
* System.out.println("Hello There");
* }
* }
* </pre>
- * In this example, serializing <code>aButton</code> by itself
- * will cause <code>MyApp</code> and everything it refers to
+ * In this example, serializing {@code aButton} by itself
+ * will cause {@code MyApp} and everything it refers to
* to be serialized as well. The problem is that the listener
* is serializable by coincidence, not by design. To separate
- * the decisions about <code>MyApp</code> and the
- * <code>ActionListener</code> being serializable one can use a
+ * the decisions about {@code MyApp} and the
+ * {@code ActionListener} being serializable one can use a
* nested class, as in the following example:
* <pre>
* import java.awt.*;
* import java.awt.event.*;
* import java.io.Serializable;
@@ -192,26 +192,26 @@
private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.Component");
private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Component");
/**
* The peer of the component. The peer implements the component's
- * behavior. The peer is set when the <code>Component</code> is
+ * behavior. The peer is set when the {@code Component} is
* added to a container that also is a peer.
* @see #addNotify
* @see #removeNotify
*/
transient volatile ComponentPeer peer;
/**
- * The parent of the object. It may be <code>null</code>
+ * The parent of the object. It may be {@code null}
* for top-level components.
* @see #getParent
*/
transient Container parent;
/**
- * The <code>AppContext</code> of the component. Applets/Plugin may
+ * The {@code AppContext} of the component. Applets/Plugin may
* change the AppContext.
*/
transient AppContext appContext;
/**
@@ -246,47 +246,47 @@
*/
int height;
/**
* The foreground color for this component.
- * <code>foreground</code> can be <code>null</code>.
+ * {@code foreground} can be {@code null}.
*
* @serial
* @see #getForeground
* @see #setForeground
*/
Color foreground;
/**
* The background color for this component.
- * <code>background</code> can be <code>null</code>.
+ * {@code background} can be {@code null}.
*
* @serial
* @see #getBackground
* @see #setBackground
*/
Color background;
/**
* The font used by this component.
- * The <code>font</code> can be <code>null</code>.
+ * The {@code font} can be {@code null}.
*
* @serial
* @see #getFont
* @see #setFont
*/
volatile Font font;
/**
* The font which the peer is currently using.
- * (<code>null</code> if no peer exists.)
+ * ({@code null} if no peer exists.)
*/
Font peerFont;
/**
* The cursor displayed when pointer is over this component.
- * This value can be <code>null</code>.
+ * This value can be {@code null}.
*
* @serial
* @see #getCursor
* @see #setCursor
*/
@@ -300,24 +300,24 @@
* @see #setLocale
*/
Locale locale;
/**
- * A reference to a <code>GraphicsConfiguration</code> object
+ * A reference to a {@code GraphicsConfiguration} object
* used to describe the characteristics of a graphics
* destination.
- * This value can be <code>null</code>.
+ * This value can be {@code null}.
*
* @since 1.3
* @serial
* @see GraphicsConfiguration
* @see #getGraphicsConfiguration
*/
private transient GraphicsConfiguration graphicsConfig = null;
/**
- * A reference to a <code>BufferStrategy</code> object
+ * A reference to a {@code BufferStrategy} object
* used to manipulate the buffers on this component.
*
* @since 1.4
* @see java.awt.image.BufferStrategy
* @see #getBufferStrategy()
@@ -365,11 +365,11 @@
* @see #invalidate
*/
private volatile boolean valid = false;
/**
- * The <code>DropTarget</code> associated with this component.
+ * The {@code DropTarget} associated with this component.
*
* @since 1.2
* @serial
* @see #setDropTarget
* @see #getDropTarget
@@ -382,21 +382,21 @@
*/
Vector<PopupMenu> popups;
/**
* A component's name.
- * This field can be <code>null</code>.
+ * This field can be {@code null}.
*
* @serial
* @see #getName
* @see #setName(String)
*/
private String name;
/**
* A bool to determine whether the name has
- * been set explicitly. <code>nameExplicitlySet</code> will
+ * been set explicitly. {@code nameExplicitlySet} will
* be false if the name has not been set and
* true if it has.
*
* @serial
* @see #getName
@@ -521,11 +521,11 @@
*/
transient ComponentOrientation componentOrientation
= ComponentOrientation.UNKNOWN;
/**
- * <code>newEventsOnly</code> will be true if the event is
+ * {@code newEventsOnly} will be true if the event is
* one of the event types enabled for the component.
* It will then allow for normal processing to
* continue. If it is false the event is passed
* to the component's parent and up the ancestor
* tree until the event has been consumed.
@@ -563,17 +563,17 @@
static final String hierarchyBoundsListenerK = "hierarchyBoundsL";
static final String windowStateListenerK = "windowStateL";
static final String windowFocusListenerK = "windowFocusL";
/**
- * The <code>eventMask</code> is ONLY set by subclasses via
- * <code>enableEvents</code>.
+ * The {@code eventMask} is ONLY set by subclasses via
+ * {@code enableEvents}.
* The mask should NOT be set when listeners are registered
* so that we can distinguish the difference between when
* listeners request events and subclasses request them.
* One bit is used to indicate whether input methods are
- * enabled; this bit is set by <code>enableInputMethods</code> and is
+ * enabled; this bit is set by {@code enableInputMethods} and is
* on by default.
*
* @serial
* @see #enableInputMethods
* @see AWTEvent
@@ -602,41 +602,41 @@
new GetPropertyAction("awt.image.redrawrate"));
incRate = (s != null) ? Integer.parseInt(s) : 100;
}
/**
- * Ease-of-use constant for <code>getAlignmentY()</code>.
+ * Ease-of-use constant for {@code getAlignmentY()}.
* Specifies an alignment to the top of the component.
* @see #getAlignmentY
*/
public static final float TOP_ALIGNMENT = 0.0f;
/**
- * Ease-of-use constant for <code>getAlignmentY</code> and
- * <code>getAlignmentX</code>. Specifies an alignment to
+ * Ease-of-use constant for {@code getAlignmentY} and
+ * {@code getAlignmentX}. Specifies an alignment to
* the center of the component
* @see #getAlignmentX
* @see #getAlignmentY
*/
public static final float CENTER_ALIGNMENT = 0.5f;
/**
- * Ease-of-use constant for <code>getAlignmentY</code>.
+ * Ease-of-use constant for {@code getAlignmentY}.
* Specifies an alignment to the bottom of the component.
* @see #getAlignmentY
*/
public static final float BOTTOM_ALIGNMENT = 1.0f;
/**
- * Ease-of-use constant for <code>getAlignmentX</code>.
+ * Ease-of-use constant for {@code getAlignmentX}.
* Specifies an alignment to the left side of the component.
* @see #getAlignmentX
*/
public static final float LEFT_ALIGNMENT = 0.0f;
/**
- * Ease-of-use constant for <code>getAlignmentX</code>.
+ * Ease-of-use constant for {@code getAlignmentX}.
* Specifies an alignment to the right side of the component.
* @see #getAlignmentX
*/
public static final float RIGHT_ALIGNMENT = 1.0f;
@@ -644,12 +644,12 @@
* JDK 1.1 serialVersionUID
*/
private static final long serialVersionUID = -7644114512714619750L;
/**
- * If any <code>PropertyChangeListeners</code> have been registered,
- * the <code>changeSupport</code> field describes them.
+ * If any {@code PropertyChangeListeners} have been registered,
+ * the {@code changeSupport} field describes them.
*
* @serial
* @since 1.2
* @see #addPropertyChangeListener
* @see #removePropertyChangeListener
@@ -703,45 +703,45 @@
* In general the baseline resize behavior will be valid for sizes
* greater than or equal to the minimum size (the actual minimum
* size; not a developer specified minimum size). For sizes
* smaller than the minimum size the baseline may change in a way
* other than the baseline resize behavior indicates. Similarly,
- * as the size approaches <code>Integer.MAX_VALUE</code> and/or
- * <code>Short.MAX_VALUE</code> the baseline may change in a way
+ * as the size approaches {@code Integer.MAX_VALUE} and/or
+ * {@code Short.MAX_VALUE} the baseline may change in a way
* other than the baseline resize behavior indicates.
*
* @see #getBaselineResizeBehavior
* @see #getBaseline(int,int)
* @since 1.6
*/
public enum BaselineResizeBehavior {
/**
* Indicates the baseline remains fixed relative to the
- * y-origin. That is, <code>getBaseline</code> returns
+ * y-origin. That is, {@code getBaseline} returns
* the same value regardless of the height or width. For example, a
- * <code>JLabel</code> containing non-empty text with a
- * vertical alignment of <code>TOP</code> should have a
- * baseline type of <code>CONSTANT_ASCENT</code>.
+ * {@code JLabel} containing non-empty text with a
+ * vertical alignment of {@code TOP} should have a
+ * baseline type of {@code CONSTANT_ASCENT}.
*/
CONSTANT_ASCENT,
/**
* Indicates the baseline remains fixed relative to the height
* and does not change as the width is varied. That is, for
* any height H the difference between H and
- * <code>getBaseline(w, H)</code> is the same. For example, a
- * <code>JLabel</code> containing non-empty text with a
- * vertical alignment of <code>BOTTOM</code> should have a
- * baseline type of <code>CONSTANT_DESCENT</code>.
+ * {@code getBaseline(w, H)} is the same. For example, a
+ * {@code JLabel} containing non-empty text with a
+ * vertical alignment of {@code BOTTOM} should have a
+ * baseline type of {@code CONSTANT_DESCENT}.
*/
CONSTANT_DESCENT,
/**
* Indicates the baseline remains a fixed distance from
* the center of the component. That is, for any height H the
- * difference between <code>getBaseline(w, H)</code> and
- * <code>H / 2</code> is the same (plus or minus one depending upon
+ * difference between {@code getBaseline(w, H)} and
+ * {@code H / 2} is the same (plus or minus one depending upon
* rounding error).
* <p>
* Because of possible rounding errors it is recommended
* you ask for the baseline with two consecutive heights and use
* the return value to determine if you need to pad calculations
@@ -986,15 +986,15 @@
}
});
}
/**
- * Constructs a new component. Class <code>Component</code> can be
+ * Constructs a new component. Class {@code Component} can be
* extended directly to create a lightweight component that does not
* utilize an opaque native window. A lightweight component must be
* hosted by a native container somewhere higher up in the component
- * tree (for example, by a <code>Frame</code> object).
+ * tree (for example, by a {@code Frame} object).
*/
protected Component() {
appContext = AppContext.getAppContext();
}
@@ -1002,12 +1002,12 @@
void initializeFocusTraversalKeys() {
focusTraversalKeys = new Set[3];
}
/**
- * Constructs a name for this component. Called by <code>getName</code>
- * when the name is <code>null</code>.
+ * Constructs a name for this component. Called by {@code getName}
+ * when the name is {@code null}.
*/
String constructComponentName() {
return null; // For strict compliance with prior platform versions, a Component
// that doesn't set its name should return null from
// getName()
@@ -1069,12 +1069,12 @@
Container getContainer() {
return getParent_NoClientCode();
}
/**
- * Associate a <code>DropTarget</code> with this component.
- * The <code>Component</code> will receive drops only if it
+ * Associate a {@code DropTarget} with this component.
+ * The {@code Component} will receive drops only if it
* is enabled.
*
* @see #isEnabled
* @param dt The DropTarget
*/
@@ -1117,31 +1117,31 @@
}
}
}
/**
- * Gets the <code>DropTarget</code> associated with this
- * <code>Component</code>.
+ * Gets the {@code DropTarget} associated with this
+ * {@code Component}.
*
* @return the drop target
*/
public synchronized DropTarget getDropTarget() { return dropTarget; }
/**
- * Gets the <code>GraphicsConfiguration</code> associated with this
- * <code>Component</code>.
- * If the <code>Component</code> has not been assigned a specific
- * <code>GraphicsConfiguration</code>,
- * the <code>GraphicsConfiguration</code> of the
- * <code>Component</code> object's top-level container is
+ * Gets the {@code GraphicsConfiguration} associated with this
+ * {@code Component}.
+ * If the {@code Component} has not been assigned a specific
+ * {@code GraphicsConfiguration},
+ * the {@code GraphicsConfiguration} of the
+ * {@code Component} object's top-level container is
* returned.
- * If the <code>Component</code> has been created, but not yet added
- * to a <code>Container</code>, this method returns <code>null</code>.
+ * If the {@code Component} has been created, but not yet added
+ * to a {@code Container}, this method returns {@code null}.
*
- * @return the <code>GraphicsConfiguration</code> used by this
- * <code>Component</code> or <code>null</code>
+ * @return the {@code GraphicsConfiguration} used by this
+ * {@code Component} or {@code null}
* @since 1.3
*/
public GraphicsConfiguration getGraphicsConfiguration() {
synchronized(getTreeLock()) {
return getGraphicsConfiguration_NoClientCode();
@@ -1176,12 +1176,12 @@
}
return false;
}
/**
- * Checks that this component's <code>GraphicsDevice</code>
- * <code>idString</code> matches the string argument.
+ * Checks that this component's {@code GraphicsDevice}
+ * {@code idString} matches the string argument.
*/
void checkGD(String stringID) {
if (graphicsConfig != null) {
if (!graphicsConfig.getDevice().getIDstring().equals(stringID)) {
throw new IllegalArgumentException(
@@ -1243,11 +1243,11 @@
* when it is correctly sized and positioned within its parent
* container and all its children are also valid.
* In order to account for peers' size requirements, components are invalidated
* before they are first shown on the screen. By the time the parent container
* is fully realized, all its components will be valid.
- * @return <code>true</code> if the component is valid, <code>false</code>
+ * @return {@code true} if the component is valid, {@code false}
* otherwise
* @see #validate
* @see #invalidate
* @since 1.0
*/
@@ -1268,12 +1268,12 @@
* A component is made undisplayable either when it is removed from
* a displayable containment hierarchy or when its containment hierarchy
* is made undisplayable. A containment hierarchy is made
* undisplayable when its ancestor window is disposed.
*
- * @return <code>true</code> if the component is displayable,
- * <code>false</code> otherwise
+ * @return {@code true} if the component is displayable,
+ * {@code false} otherwise
* @see Container#add(Component)
* @see Window#pack
* @see Window#show
* @see Container#remove(Component)
* @see Window#dispose
@@ -1285,13 +1285,13 @@
/**
* Determines whether this component should be visible when its
* parent is visible. Components are
* initially visible, with the exception of top level components such
- * as <code>Frame</code> objects.
- * @return <code>true</code> if the component is visible,
- * <code>false</code> otherwise
+ * as {@code Frame} objects.
+ * @return {@code true} if the component is visible,
+ * {@code false} otherwise
* @see #setVisible
* @since 1.0
*/
@Transient
public boolean isVisible() {
@@ -1301,13 +1301,13 @@
return visible;
}
/**
* Determines whether this component will be displayed on the screen.
- * @return <code>true</code> if the component and all of its ancestors
+ * @return {@code true} if the component and all of its ancestors
* until a toplevel window or null parent are visible,
- * <code>false</code> otherwise
+ * {@code false} otherwise
*/
boolean isRecursivelyVisible() {
return visible && (parent == null || parent.isRecursivelyVisible());
}
@@ -1368,34 +1368,34 @@
INCLUDE_DISABLED);
return inTheSameWindow;
}
/**
- * Returns the position of the mouse pointer in this <code>Component</code>'s
- * coordinate space if the <code>Component</code> is directly under the mouse
- * pointer, otherwise returns <code>null</code>.
- * If the <code>Component</code> is not showing on the screen, this method
- * returns <code>null</code> even if the mouse pointer is above the area
- * where the <code>Component</code> would be displayed.
- * If the <code>Component</code> is partially or fully obscured by other
- * <code>Component</code>s or native windows, this method returns a non-null
+ * Returns the position of the mouse pointer in this {@code Component}'s
+ * coordinate space if the {@code Component} is directly under the mouse
+ * pointer, otherwise returns {@code null}.
+ * If the {@code Component} is not showing on the screen, this method
+ * returns {@code null} even if the mouse pointer is above the area
+ * where the {@code Component} would be displayed.
+ * If the {@code Component} is partially or fully obscured by other
+ * {@code Component}s or native windows, this method returns a non-null
* value only if the mouse pointer is located above the unobscured part of the
- * <code>Component</code>.
+ * {@code Component}.
* <p>
- * For <code>Container</code>s it returns a non-null value if the mouse is
- * above the <code>Container</code> itself or above any of its descendants.
+ * For {@code Container}s it returns a non-null value if the mouse is
+ * above the {@code Container} itself or above any of its descendants.
* Use {@link Container#getMousePosition(boolean)} if you need to exclude children.
* <p>
* Sometimes the exact mouse coordinates are not important, and the only thing
- * that matters is whether a specific <code>Component</code> is under the mouse
- * pointer. If the return value of this method is <code>null</code>, mouse
- * pointer is not directly above the <code>Component</code>.
+ * that matters is whether a specific {@code Component} is under the mouse
+ * pointer. If the return value of this method is {@code null}, mouse
+ * pointer is not directly above the {@code Component}.
*
* @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true
* @see #isShowing
* @see Container#getMousePosition
- * @return mouse coordinates relative to this <code>Component</code>, or null
+ * @return mouse coordinates relative to this {@code Component}, or null
* @since 1.5
*/
public Point getMousePosition() throws HeadlessException {
if (GraphicsEnvironment.isHeadless()) {
throw new HeadlessException();
@@ -1436,12 +1436,12 @@
* <li>the component has been added to a visible {@code ScrollPane} but
* the {@code Component} is not currently in the scroll pane's view port.
* <li>the {@code Component} is obscured by another {@code Component} or
* {@code Container}.
* </ul>
- * @return <code>true</code> if the component is showing,
- * <code>false</code> otherwise
+ * @return {@code true} if the component is showing,
+ * {@code false} otherwise
* @see #setVisible
* @since 1.0
*/
public boolean isShowing() {
if (visible && (peer != null)) {
@@ -1453,13 +1453,13 @@
/**
* Determines whether this component is enabled. An enabled component
* can respond to user input and generate events. Components are
* enabled initially by default. A component may be enabled or disabled by
- * calling its <code>setEnabled</code> method.
- * @return <code>true</code> if the component is enabled,
- * <code>false</code> otherwise
+ * calling its {@code setEnabled} method.
+ * @return {@code true} if the component is enabled,
+ * {@code false} otherwise
* @see #setEnabled
* @since 1.0
*/
public boolean isEnabled() {
return isEnabledImpl();
@@ -1473,20 +1473,20 @@
return enabled;
}
/**
* Enables or disables this component, depending on the value of the
- * parameter <code>b</code>. An enabled component can respond to user
+ * parameter {@code b}. An enabled component can respond to user
* input and generate events. Components are enabled initially by default.
*
* <p>Note: Disabling a lightweight component does not prevent it from
* receiving MouseEvents.
* <p>Note: Disabling a heavyweight container prevents all components
* in this container from receiving any input events. But disabling a
* lightweight container affects only this container.
*
- * @param b If <code>true</code>, this component is
+ * @param b If {@code true}, this component is
* enabled; otherwise this component is disabled
* @see #isEnabled
* @see #isLightweight
* @since 1.1
*/
@@ -1494,11 +1494,11 @@
enable(b);
}
/**
* @deprecated As of JDK version 1.1,
- * replaced by <code>setEnabled(boolean)</code>.
+ * replaced by {@code setEnabled(boolean)}.
*/
@Deprecated
public void enable() {
if (!enabled) {
synchronized (getTreeLock()) {
@@ -1524,11 +1524,11 @@
*
* @param b {@code true} to enable this component;
* otherwise {@code false}
*
* @deprecated As of JDK version 1.1,
- * replaced by <code>setEnabled(boolean)</code>.
+ * replaced by {@code setEnabled(boolean)}.
*/
@Deprecated
public void enable(boolean b) {
if (b) {
enable();
@@ -1537,11 +1537,11 @@
}
}
/**
* @deprecated As of JDK version 1.1,
- * replaced by <code>setEnabled(boolean)</code>.
+ * replaced by {@code setEnabled(boolean)}.
*/
@Deprecated
public void disable() {
if (enabled) {
KeyboardFocusManager.clearMostRecentFocusOwner(this);
@@ -1627,16 +1627,16 @@
}
}
/**
* Shows or hides this component depending on the value of parameter
- * <code>b</code>.
+ * {@code b}.
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
- * @param b if <code>true</code>, shows this component;
+ * @param b if {@code true}, shows this component;
* otherwise, hides this component
* @see #isVisible
* @see #invalidate
* @since 1.1
*/
@@ -1644,11 +1644,11 @@
show(b);
}
/**
* @deprecated As of JDK version 1.1,
- * replaced by <code>setVisible(boolean)</code>.
+ * replaced by {@code setVisible(boolean)}.
*/
@Deprecated
public void show() {
if (!visible) {
synchronized (getTreeLock()) {
@@ -1687,11 +1687,11 @@
*
* @param b {@code true} to make this component visible;
* otherwise {@code false}
*
* @deprecated As of JDK version 1.1,
- * replaced by <code>setVisible(boolean)</code>.
+ * replaced by {@code setVisible(boolean)}.
*/
@Deprecated
public void show(boolean b) {
if (b) {
show();
@@ -1712,11 +1712,11 @@
/* do nothing */
}
/**
* @deprecated As of JDK version 1.1,
- * replaced by <code>setVisible(boolean)</code>.
+ * replaced by {@code setVisible(boolean)}.
*/
@Deprecated
public void hide() {
isPacked = false;
@@ -1777,11 +1777,11 @@
}
/**
* Sets the foreground color of this component.
* @param c the color to become this component's
- * foreground color; if this parameter is <code>null</code>
+ * foreground color; if this parameter is {@code null}
* then this component will inherit
* the foreground color of its parent
* @see #getForeground
* @since 1.0
*/
@@ -1800,15 +1800,15 @@
firePropertyChange("foreground", oldColor, c);
}
/**
* Returns whether the foreground color has been explicitly set for this
- * Component. If this method returns <code>false</code>, this Component is
+ * Component. If this method returns {@code false}, this Component is
* inheriting its foreground color from an ancestor.
*
- * @return <code>true</code> if the foreground color has been explicitly
- * set for this Component; <code>false</code> otherwise.
+ * @return {@code true} if the foreground color has been explicitly
+ * set for this Component; {@code false} otherwise.
* @since 1.4
*/
public boolean isForegroundSet() {
return (foreground != null);
}
@@ -1837,11 +1837,11 @@
* The background color affects each component differently and the
* parts of the component that are affected by the background color
* may differ between operating systems.
*
* @param c the color to become this component's color;
- * if this parameter is <code>null</code>, then this
+ * if this parameter is {@code null}, then this
* component will inherit the background color of its parent
* @see #getBackground
* @since 1.0
* @beaninfo
* bound: true
@@ -1861,15 +1861,15 @@
firePropertyChange("background", oldColor, c);
}
/**
* Returns whether the background color has been explicitly set for this
- * Component. If this method returns <code>false</code>, this Component is
+ * Component. If this method returns {@code false}, this Component is
* inheriting its background color from an ancestor.
*
- * @return <code>true</code> if the background color has been explicitly
- * set for this Component; <code>false</code> otherwise.
+ * @return {@code true} if the background color has been explicitly
+ * set for this Component; {@code false} otherwise.
* @since 1.4
*/
public boolean isBackgroundSet() {
return (background != null);
}
@@ -1904,11 +1904,11 @@
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
* @param f the font to become this component's font;
- * if this parameter is <code>null</code> then this
+ * if this parameter is {@code null} then this
* component will inherit the font of its parent
* @see #getFont
* @see #invalidate
* @since 1.0
* @beaninfo
@@ -1941,15 +1941,15 @@
}
}
/**
* Returns whether the font has been explicitly set for this Component. If
- * this method returns <code>false</code>, this Component is inheriting its
+ * this method returns {@code false}, this Component is inheriting its
* font from an ancestor.
*
- * @return <code>true</code> if the font has been explicitly set for this
- * Component; <code>false</code> otherwise.
+ * @return {@code true} if the font has been explicitly set for this
+ * Component; {@code false} otherwise.
* @since 1.4
*/
public boolean isFontSet() {
return (font != null);
}
@@ -1957,11 +1957,11 @@
/**
* Gets the locale of this component.
* @return this component's locale; if this component does not
* have a locale, the locale of its parent is returned
* @see #setLocale
- * @exception IllegalComponentStateException if the <code>Component</code>
+ * @exception IllegalComponentStateException if the {@code Component}
* does not have its own locale and has not yet been added to
* a containment hierarchy such that the locale can be determined
* from the containing parent
* @since 1.1
*/
@@ -2001,11 +2001,11 @@
// This could change the preferred size of the Component.
invalidateIfValid();
}
/**
- * Gets the instance of <code>ColorModel</code> used to display
+ * Gets the instance of {@code ColorModel} used to display
* the component on the output device.
* @return the color model used by this component
* @see java.awt.image.ColorModel
* @see java.awt.peer.ComponentPeer#getColorModel()
* @see Toolkit#getColorModel()
@@ -2026,17 +2026,17 @@
* point specifying the component's top-left corner.
* The location will be relative to the parent's coordinate space.
* <p>
* Due to the asynchronous nature of native event handling, this
* method can return outdated values (for instance, after several calls
- * of <code>setLocation()</code> in rapid succession). For this
+ * of {@code setLocation()} in rapid succession). For this
* reason, the recommended method of obtaining a component's position is
- * within <code>java.awt.event.ComponentListener.componentMoved()</code>,
+ * within {@code java.awt.event.ComponentListener.componentMoved()},
* which is called after the operating system has finished moving the
* component.
* </p>
- * @return an instance of <code>Point</code> representing
+ * @return an instance of {@code Point} representing
* the top-left corner of the component's bounds in
* the coordinate space of the component's parent
* @see #setLocation
* @see #getLocationOnScreen
* @since 1.1
@@ -2047,11 +2047,11 @@
/**
* Gets the location of this component in the form of a point
* specifying the component's top-left corner in the screen's
* coordinate space.
- * @return an instance of <code>Point</code> representing
+ * @return an instance of {@code Point} representing
* the top-left corner of the component's bounds in the
* coordinate space of the screen
* @throws IllegalComponentStateException if the
* component is not showing on the screen
* @see #setLocation
@@ -2093,11 +2093,11 @@
/**
* Returns the location of this component's top left corner.
*
* @return the location of this component's top left corner
* @deprecated As of JDK version 1.1,
- * replaced by <code>getLocation()</code>.
+ * replaced by {@code getLocation()}.
*/
@Deprecated
public Point location() {
return location_NoClientCode();
}
@@ -2106,11 +2106,11 @@
return new Point(x, y);
}
/**
* Moves this component to a new location. The top-left corner of
- * the new location is specified by the <code>x</code> and <code>y</code>
+ * the new location is specified by the {@code x} and {@code y}
* parameters in the coordinate space of this component's parent.
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
@@ -2134,11 +2134,11 @@
* top-left corner in the parent's coordinate space
* @param y the <i>y</i>-coordinate of the new location's
* top-left corner in the parent's coordinate space
*
* @deprecated As of JDK version 1.1,
- * replaced by <code>setLocation(int, int)</code>.
+ * replaced by {@code setLocation(int, int)}.
*/
@Deprecated
public void move(int x, int y) {
synchronized(getTreeLock()) {
setBoundsOp(ComponentPeer.SET_LOCATION);
@@ -2146,12 +2146,12 @@
}
}
/**
* Moves this component to a new location. The top-left corner of
- * the new location is specified by point <code>p</code>. Point
- * <code>p</code> is given in the parent's coordinate space.
+ * the new location is specified by point {@code p}. Point
+ * {@code p} is given in the parent's coordinate space.
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
* @param p the point defining the top-left corner
@@ -2166,16 +2166,16 @@
setLocation(p.x, p.y);
}
/**
* Returns the size of this component in the form of a
- * <code>Dimension</code> object. The <code>height</code>
- * field of the <code>Dimension</code> object contains
- * this component's height, and the <code>width</code>
- * field of the <code>Dimension</code> object contains
+ * {@code Dimension} object. The {@code height}
+ * field of the {@code Dimension} object contains
+ * this component's height, and the {@code width}
+ * field of the {@code Dimension} object contains
* this component's width.
- * @return a <code>Dimension</code> object that indicates the
+ * @return a {@code Dimension} object that indicates the
* size of this component
* @see #setSize
* @since 1.1
*/
public Dimension getSize() {
@@ -2187,20 +2187,20 @@
* {@code Dimension} object.
*
* @return the {@code Dimension} object that indicates the
* size of this component
* @deprecated As of JDK version 1.1,
- * replaced by <code>getSize()</code>.
+ * replaced by {@code getSize()}.
*/
@Deprecated
public Dimension size() {
return new Dimension(width, height);
}
/**
- * Resizes this component so that it has width <code>width</code>
- * and height <code>height</code>.
+ * Resizes this component so that it has width {@code width}
+ * and height {@code height}.
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
* @param width the new width of this component in pixels
@@ -2218,23 +2218,23 @@
* Resizes this component.
*
* @param width the new width of the component
* @param height the new height of the component
* @deprecated As of JDK version 1.1,
- * replaced by <code>setSize(int, int)</code>.
+ * replaced by {@code setSize(int, int)}.
*/
@Deprecated
public void resize(int width, int height) {
synchronized(getTreeLock()) {
setBoundsOp(ComponentPeer.SET_SIZE);
setBounds(x, y, width, height);
}
}
/**
- * Resizes this component so that it has width <code>d.width</code>
- * and height <code>d.height</code>.
+ * Resizes this component so that it has width {@code d.width}
+ * and height {@code d.height}.
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
* @param d the dimension specifying the new size
@@ -2253,20 +2253,20 @@
* Resizes this component so that it has width {@code d.width}
* and height {@code d.height}.
*
* @param d the new size of this component
* @deprecated As of JDK version 1.1,
- * replaced by <code>setSize(Dimension)</code>.
+ * replaced by {@code setSize(Dimension)}.
*/
@Deprecated
public void resize(Dimension d) {
setSize(d.width, d.height);
}
/**
* Gets the bounds of this component in the form of a
- * <code>Rectangle</code> object. The bounds specify this
+ * {@code Rectangle} object. The bounds specify this
* component's width, height, and location relative to
* its parent.
* @return a rectangle indicating this component's bounds
* @see #setBounds
* @see #getLocation
@@ -2279,29 +2279,29 @@
/**
* Returns the bounding rectangle of this component.
*
* @return the bounding rectangle for this component
* @deprecated As of JDK version 1.1,
- * replaced by <code>getBounds()</code>.
+ * replaced by {@code getBounds()}.
*/
@Deprecated
public Rectangle bounds() {
return new Rectangle(x, y, width, height);
}
/**
* Moves and resizes this component. The new location of the top-left
- * corner is specified by <code>x</code> and <code>y</code>, and the
- * new size is specified by <code>width</code> and <code>height</code>.
+ * corner is specified by {@code x} and {@code y}, and the
+ * new size is specified by {@code width} and {@code height}.
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
* @param x the new <i>x</i>-coordinate of this component
* @param y the new <i>y</i>-coordinate of this component
- * @param width the new <code>width</code> of this component
- * @param height the new <code>height</code> of this
+ * @param width the new {@code width} of this component
+ * @param height the new {@code height} of this
* component
* @see #getBounds
* @see #setLocation(int, int)
* @see #setLocation(Point)
* @see #setSize(int, int)
@@ -2320,11 +2320,11 @@
* @param y the <i>y</i> coordinate of the upper left corner of the rectangle
* @param width the width of the rectangle
* @param height the height of the rectangle
*
* @deprecated As of JDK version 1.1,
- * replaced by <code>setBounds(int, int, int, int)</code>.
+ * replaced by {@code setBounds(int, int, int, int)}.
*/
@Deprecated
public void reshape(int x, int y, int width, int height) {
synchronized (getTreeLock()) {
try {
@@ -2440,14 +2440,14 @@
}
}
/**
* Moves and resizes this component to conform to the new
- * bounding rectangle <code>r</code>. This component's new
- * position is specified by <code>r.x</code> and <code>r.y</code>,
- * and its new size is specified by <code>r.width</code> and
- * <code>r.height</code>
+ * bounding rectangle {@code r}. This component's new
+ * position is specified by {@code r.x} and {@code r.y},
+ * and its new size is specified by {@code r.width} and
+ * {@code r.height}
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
* @param r the new bounding rectangle for this component
@@ -2466,12 +2466,12 @@
/**
* Returns the current x coordinate of the components origin.
* This method is preferable to writing
- * <code>component.getBounds().x</code>,
- * or <code>component.getLocation().x</code> because it doesn't
+ * {@code component.getBounds().x},
+ * or {@code component.getLocation().x} because it doesn't
* cause any heap allocations.
*
* @return the current x coordinate of the components origin
* @since 1.2
*/
@@ -2481,12 +2481,12 @@
/**
* Returns the current y coordinate of the components origin.
* This method is preferable to writing
- * <code>component.getBounds().y</code>,
- * or <code>component.getLocation().y</code> because it
+ * {@code component.getBounds().y},
+ * or {@code component.getLocation().y} because it
* doesn't cause any heap allocations.
*
* @return the current y coordinate of the components origin
* @since 1.2
*/
@@ -2496,12 +2496,12 @@
/**
* Returns the current width of this component.
* This method is preferable to writing
- * <code>component.getBounds().width</code>,
- * or <code>component.getSize().width</code> because it
+ * {@code component.getBounds().width},
+ * or {@code component.getSize().width} because it
* doesn't cause any heap allocations.
*
* @return the current width of this component
* @since 1.2
*/
@@ -2511,12 +2511,12 @@
/**
* Returns the current height of this component.
* This method is preferable to writing
- * <code>component.getBounds().height</code>,
- * or <code>component.getSize().height</code> because it
+ * {@code component.getBounds().height},
+ * or {@code component.getSize().height} because it
* doesn't cause any heap allocations.
*
* @return the current height of this component
* @since 1.2
*/
@@ -2524,14 +2524,14 @@
return height;
}
/**
* Stores the bounds of this component into "return value" <b>rv</b> and
- * return <b>rv</b>. If rv is <code>null</code> a new
- * <code>Rectangle</code> is allocated.
- * This version of <code>getBounds</code> is useful if the caller
- * wants to avoid allocating a new <code>Rectangle</code> object
+ * return <b>rv</b>. If rv is {@code null} a new
+ * {@code Rectangle} is allocated.
+ * This version of {@code getBounds} is useful if the caller
+ * wants to avoid allocating a new {@code Rectangle} object
* on the heap.
*
* @param rv the return value, modified to the components bounds
* @return rv
*/
@@ -2545,14 +2545,14 @@
}
}
/**
* Stores the width/height of this component into "return value" <b>rv</b>
- * and return <b>rv</b>. If rv is <code>null</code> a new
- * <code>Dimension</code> object is allocated. This version of
- * <code>getSize</code> is useful if the caller wants to avoid
- * allocating a new <code>Dimension</code> object on the heap.
+ * and return <b>rv</b>. If rv is {@code null} a new
+ * {@code Dimension} object is allocated. This version of
+ * {@code getSize} is useful if the caller wants to avoid
+ * allocating a new {@code Dimension} object on the heap.
*
* @param rv the return value, modified to the components size
* @return rv
*/
public Dimension getSize(Dimension rv) {
@@ -2565,14 +2565,14 @@
}
}
/**
* Stores the x,y origin of this component into "return value" <b>rv</b>
- * and return <b>rv</b>. If rv is <code>null</code> a new
- * <code>Point</code> is allocated.
- * This version of <code>getLocation</code> is useful if the
- * caller wants to avoid allocating a new <code>Point</code>
+ * and return <b>rv</b>. If rv is {@code null} a new
+ * {@code Point} is allocated.
+ * This version of {@code getLocation} is useful if the
+ * caller wants to avoid allocating a new {@code Point}
* object on the heap.
*
* @param rv the return value, modified to the components location
* @return rv
*/
@@ -2613,16 +2613,16 @@
}
/**
* A lightweight component doesn't have a native toolkit peer.
- * Subclasses of <code>Component</code> and <code>Container</code>,
- * other than the ones defined in this package like <code>Button</code>
- * or <code>Scrollbar</code>, are lightweight.
+ * Subclasses of {@code Component} and {@code Container},
+ * other than the ones defined in this package like {@code Button}
+ * or {@code Scrollbar}, are lightweight.
* All of the Swing components are lightweights.
* <p>
- * This method will always return <code>false</code> if this component
+ * This method will always return {@code false} if this component
* is not displayable because it is impossible to determine the
* weight of an undisplayable component.
*
* @return true if this component has a lightweight peer; false if
* it has a native peer or no peer
@@ -2634,12 +2634,12 @@
}
/**
* Sets the preferred size of this component to a constant
- * value. Subsequent calls to <code>getPreferredSize</code> will always
- * return this value. Setting the preferred size to <code>null</code>
+ * value. Subsequent calls to {@code getPreferredSize} will always
+ * return this value. Setting the preferred size to {@code null}
* restores the default behavior.
*
* @param preferredSize The new preferred size, or null
* @see #getPreferredSize
* @see #isPreferredSizeSet
@@ -2662,13 +2662,13 @@
}
/**
* Returns true if the preferred size has been set to a
- * non-<code>null</code> value otherwise returns false.
+ * non-{@code null} value otherwise returns false.
*
- * @return true if <code>setPreferredSize</code> has been invoked
+ * @return true if {@code setPreferredSize} has been invoked
* with a non-null value.
* @since 1.5
*/
public boolean isPreferredSizeSet() {
return prefSizeSet;
@@ -2689,11 +2689,11 @@
/**
* Returns the component's preferred size.
*
* @return the component's preferred size
* @deprecated As of JDK version 1.1,
- * replaced by <code>getPreferredSize()</code>.
+ * replaced by {@code getPreferredSize()}.
*/
@Deprecated
public Dimension preferredSize() {
/* Avoid grabbing the lock if a reasonable cached size value
* is available.
@@ -2710,12 +2710,12 @@
return new Dimension(dim);
}
/**
* Sets the minimum size of this component to a constant
- * value. Subsequent calls to <code>getMinimumSize</code> will always
- * return this value. Setting the minimum size to <code>null</code>
+ * value. Subsequent calls to {@code getMinimumSize} will always
+ * return this value. Setting the minimum size to {@code null}
* restores the default behavior.
*
* @param minimumSize the new minimum size of this component
* @see #getMinimumSize
* @see #isMinimumSizeSet
@@ -2736,14 +2736,14 @@
minSizeSet = (minimumSize != null);
firePropertyChange("minimumSize", old, minimumSize);
}
/**
- * Returns whether or not <code>setMinimumSize</code> has been
+ * Returns whether or not {@code setMinimumSize} has been
* invoked with a non-null value.
*
- * @return true if <code>setMinimumSize</code> has been invoked with a
+ * @return true if {@code setMinimumSize} has been invoked with a
* non-null value.
* @since 1.5
*/
public boolean isMinimumSizeSet() {
return minSizeSet;
@@ -2762,11 +2762,11 @@
/**
* Returns the minimum size of this component.
*
* @return the minimum size of this component
* @deprecated As of JDK version 1.1,
- * replaced by <code>getMinimumSize()</code>.
+ * replaced by {@code getMinimumSize()}.
*/
@Deprecated
public Dimension minimumSize() {
/* Avoid grabbing the lock if a reasonable cached size value
* is available.
@@ -2783,15 +2783,15 @@
return new Dimension(dim);
}
/**
* Sets the maximum size of this component to a constant
- * value. Subsequent calls to <code>getMaximumSize</code> will always
- * return this value. Setting the maximum size to <code>null</code>
+ * value. Subsequent calls to {@code getMaximumSize} will always
+ * return this value. Setting the maximum size to {@code null}
* restores the default behavior.
*
- * @param maximumSize a <code>Dimension</code> containing the
+ * @param maximumSize a {@code Dimension} containing the
* desired maximum allowable size
* @see #getMaximumSize
* @see #isMaximumSizeSet
* @since 1.5
*/
@@ -2810,14 +2810,14 @@
maxSizeSet = (maximumSize != null);
firePropertyChange("maximumSize", old, maximumSize);
}
/**
- * Returns true if the maximum size has been set to a non-<code>null</code>
+ * Returns true if the maximum size has been set to a non-{@code null}
* value otherwise returns false.
*
- * @return true if <code>maximumSize</code> is non-<code>null</code>,
+ * @return true if {@code maximumSize} is non-{@code null},
* false otherwise
* @since 1.5
*/
public boolean isMaximumSizeSet() {
return maxSizeSet;
@@ -2864,20 +2864,20 @@
}
/**
* Returns the baseline. The baseline is measured from the top of
* the component. This method is primarily meant for
- * <code>LayoutManager</code>s to align components along their
+ * {@code LayoutManager}s to align components along their
* baseline. A return value less than 0 indicates this component
* does not have a reasonable baseline and that
- * <code>LayoutManager</code>s should not align this component on
+ * {@code LayoutManager}s should not align this component on
* its baseline.
* <p>
* The default implementation returns -1. Subclasses that support
* baseline should override appropriately. If a value >= 0 is
* returned, then the component has a valid baseline for any
- * size >= the minimum size and <code>getBaselineResizeBehavior</code>
+ * size >= the minimum size and {@code getBaselineResizeBehavior}
* can be used to determine how the baseline changes with size.
*
* @param width the width to get the baseline for
* @param height the height to get the baseline for
* @return the baseline or < 0 indicating there is no reasonable
@@ -2899,19 +2899,19 @@
* Returns an enum indicating how the baseline of the component
* changes as the size changes. This method is primarily meant for
* layout managers and GUI builders.
* <p>
* The default implementation returns
- * <code>BaselineResizeBehavior.OTHER</code>. Subclasses that have a
+ * {@code BaselineResizeBehavior.OTHER}. Subclasses that have a
* baseline should override appropriately. Subclasses should
- * never return <code>null</code>; if the baseline can not be
- * calculated return <code>BaselineResizeBehavior.OTHER</code>. Callers
+ * never return {@code null}; if the baseline can not be
+ * calculated return {@code BaselineResizeBehavior.OTHER}. Callers
* should first ask for the baseline using
- * <code>getBaseline</code> and if a value >= 0 is returned use
+ * {@code getBaseline} and if a value >= 0 is returned use
* this method. It is acceptable for this method to return a
- * value other than <code>BaselineResizeBehavior.OTHER</code> even if
- * <code>getBaseline</code> returns a value less than 0.
+ * value other than {@code BaselineResizeBehavior.OTHER} even if
+ * {@code getBaseline} returns a value less than 0.
*
* @return an enum indicating how the baseline changes as the component
* size changes
* @see #getBaseline(int, int)
* @since 1.6
@@ -2931,11 +2931,11 @@
layout();
}
/**
* @deprecated As of JDK version 1.1,
- * replaced by <code>doLayout()</code>.
+ * replaced by {@code doLayout()}.
*/
@Deprecated
public void layout() {
}
@@ -3080,13 +3080,13 @@
}
}
/**
* Creates a graphics context for this component. This method will
- * return <code>null</code> if this component is currently not
+ * return {@code null} if this component is currently not
* displayable.
- * @return a graphics context for this component, or <code>null</code>
+ * @return a graphics context for this component, or {@code null}
* if it has none
* @see #paint
* @since 1.0
*/
public Graphics getGraphics() {
@@ -3144,11 +3144,11 @@
* used. Instead metrics can be obtained at rendering time by calling
* {@link Graphics#getFontMetrics()} or text measurement APIs on the
* {@link Font Font} class.
* @param font the font for which font metrics is to be
* obtained
- * @return the font metrics for <code>font</code>
+ * @return the font metrics for {@code font}
* @see #getFont
* @see java.awt.peer.ComponentPeer#getFontMetrics(Font)
* @see Toolkit#getFontMetrics(Font)
* @since 1.0
*/
@@ -3167,23 +3167,23 @@
return sun.font.FontDesignMetrics.getMetrics(font);
}
/**
* Sets the cursor image to the specified cursor. This cursor
- * image is displayed when the <code>contains</code> method for
+ * image is displayed when the {@code contains} method for
* this component returns true for the current cursor location, and
* this Component is visible, displayable, and enabled. Setting the
- * cursor of a <code>Container</code> causes that cursor to be displayed
+ * cursor of a {@code Container} causes that cursor to be displayed
* within all of the container's subcomponents, except for those
- * that have a non-<code>null</code> cursor.
+ * that have a non-{@code null} cursor.
* <p>
* The method may have no visual effect if the Java platform
* implementation and/or the native system do not support
* changing the mouse cursor shape.
* @param cursor One of the constants defined
- * by the <code>Cursor</code> class;
- * if this parameter is <code>null</code>
+ * by the {@code Cursor} class;
+ * if this parameter is {@code null}
* then this component will inherit
* the cursor of its parent
* @see #isEnabled
* @see #isShowing
* @see #getCursor
@@ -3219,11 +3219,11 @@
/**
* Gets the cursor set in the component. If the component does
* not have a cursor set, the cursor of its parent is returned.
* If no cursor is set in the entire hierarchy,
- * <code>Cursor.DEFAULT_CURSOR</code> is returned.
+ * {@code Cursor.DEFAULT_CURSOR} is returned.
*
* @return the cursor for this component
* @see #setCursor
* @since 1.1
*/
@@ -3244,15 +3244,15 @@
}
}
/**
* Returns whether the cursor has been explicitly set for this Component.
- * If this method returns <code>false</code>, this Component is inheriting
+ * If this method returns {@code false}, this Component is inheriting
* its cursor from an ancestor.
*
- * @return <code>true</code> if the cursor has been explicitly set for this
- * Component; <code>false</code> otherwise.
+ * @return {@code true} if the cursor has been explicitly set for this
+ * Component; {@code false} otherwise.
* @since 1.4
*/
public boolean isCursorSet() {
return (cursor != null);
}
@@ -3261,16 +3261,16 @@
* Paints this component.
* <p>
* This method is called when the contents of the component should
* be painted; such as when the component is first being shown or
* is damaged and in need of repair. The clip rectangle in the
- * <code>Graphics</code> parameter is set to the area
+ * {@code Graphics} parameter is set to the area
* which needs to be painted.
- * Subclasses of <code>Component</code> that override this
- * method need not call <code>super.paint(g)</code>.
+ * Subclasses of {@code Component} that override this
+ * method need not call {@code super.paint(g)}.
* <p>
- * For performance reasons, <code>Component</code>s with zero width
+ * For performance reasons, {@code Component}s with zero width
* or height aren't considered to need painting when they are first shown,
* and also aren't considered to need repair.
* <p>
* <b>Note</b>: For more information on the paint mechanisms utilitized
* by AWT and Swing, including information on how to write the most
@@ -3286,25 +3286,25 @@
/**
* Updates this component.
* <p>
* If this component is not a lightweight component, the
- * AWT calls the <code>update</code> method in response to
- * a call to <code>repaint</code>. You can assume that
+ * AWT calls the {@code update} method in response to
+ * a call to {@code repaint}. You can assume that
* the background is not cleared.
* <p>
- * The <code>update</code> method of <code>Component</code>
- * calls this component's <code>paint</code> method to redraw
+ * The {@code update} method of {@code Component}
+ * calls this component's {@code paint} method to redraw
* this component. This method is commonly overridden by subclasses
* which need to do additional work in response to a call to
- * <code>repaint</code>.
+ * {@code repaint}.
* Subclasses of Component that override this method should either
- * call <code>super.update(g)</code>, or call <code>paint(g)</code>
- * directly from their <code>update</code> method.
+ * call {@code super.update(g)}, or call {@code paint(g)}
+ * directly from their {@code update} method.
* <p>
* The origin of the graphics context, its
- * (<code>0</code>, <code>0</code>) coordinate point, is the
+ * ({@code 0}, {@code 0}) coordinate point, is the
* top-left corner of this component. The clipping region of the
* graphics context is the bounding rectangle of this component.
*
* <p>
* <b>Note</b>: For more information on the paint mechanisms utilitized
@@ -3323,11 +3323,11 @@
/**
* Paints this component and all of its subcomponents.
* <p>
* The origin of the graphics context, its
- * (<code>0</code>, <code>0</code>) coordinate point, is the
+ * ({@code 0}, {@code 0}) coordinate point, is the
* top-left corner of this component. The clipping region of the
* graphics context is the bounding rectangle of this component.
*
* @param g the graphics context to use for painting
* @see #paint
@@ -3361,13 +3361,13 @@
/**
* Repaints this component.
* <p>
* If this component is a lightweight component, this method
- * causes a call to this component's <code>paint</code>
+ * causes a call to this component's {@code paint}
* method as soon as possible. Otherwise, this method causes
- * a call to this component's <code>update</code> method as soon
+ * a call to this component's {@code update} method as soon
* as possible.
* <p>
* <b>Note</b>: For more information on the paint mechanisms utilitized
* by AWT and Swing, including information on how to write the most
* efficient painting code, see
@@ -3381,12 +3381,12 @@
repaint(0, 0, 0, width, height);
}
/**
* Repaints the component. If this component is a lightweight
- * component, this results in a call to <code>paint</code>
- * within <code>tm</code> milliseconds.
+ * component, this results in a call to {@code paint}
+ * within {@code tm} milliseconds.
* <p>
* <b>Note</b>: For more information on the paint mechanisms utilitized
* by AWT and Swing, including information on how to write the most
* efficient painting code, see
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
@@ -3402,13 +3402,13 @@
/**
* Repaints the specified rectangle of this component.
* <p>
* If this component is a lightweight component, this method
- * causes a call to this component's <code>paint</code> method
+ * causes a call to this component's {@code paint} method
* as soon as possible. Otherwise, this method causes a call to
- * this component's <code>update</code> method as soon as possible.
+ * this component's {@code update} method as soon as possible.
* <p>
* <b>Note</b>: For more information on the paint mechanisms utilitized
* by AWT and Swing, including information on how to write the most
* efficient painting code, see
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
@@ -3424,16 +3424,16 @@
repaint(0, x, y, width, height);
}
/**
* Repaints the specified rectangle of this component within
- * <code>tm</code> milliseconds.
+ * {@code tm} milliseconds.
* <p>
* If this component is a lightweight component, this method causes
- * a call to this component's <code>paint</code> method.
+ * a call to this component's {@code paint} method.
* Otherwise, this method causes a call to this component's
- * <code>update</code> method.
+ * {@code update} method.
* <p>
* <b>Note</b>: For more information on the paint mechanisms utilitized
* by AWT and Swing, including information on how to write the most
* efficient painting code, see
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
@@ -3487,14 +3487,14 @@
* Prints this component. Applications should override this method
* for components that must do special processing before being
* printed or should be printed differently than they are painted.
* <p>
* The default implementation of this method calls the
- * <code>paint</code> method.
+ * {@code paint} method.
* <p>
* The origin of the graphics context, its
- * (<code>0</code>, <code>0</code>) coordinate point, is the
+ * ({@code 0}, {@code 0}) coordinate point, is the
* top-left corner of this component. The clipping region of the
* graphics context is the bounding rectangle of this component.
* @param g the graphics context to use for printing
* @see #paint(Graphics)
* @since 1.0
@@ -3505,11 +3505,11 @@
/**
* Prints this component and all of its subcomponents.
* <p>
* The origin of the graphics context, its
- * (<code>0</code>, <code>0</code>) coordinate point, is the
+ * ({@code 0}, {@code 0}) coordinate point, is the
* top-left corner of this component. The clipping region of the
* graphics context is the bounding rectangle of this component.
* @param g the graphics context to use for printing
* @see #print(Graphics)
* @since 1.0
@@ -3548,45 +3548,45 @@
return new Insets(0, 0, 0, 0);
}
/**
* Repaints the component when the image has changed.
- * This <code>imageUpdate</code> method of an <code>ImageObserver</code>
+ * This {@code imageUpdate} method of an {@code ImageObserver}
* is called when more information about an
* image which had been previously requested using an asynchronous
- * routine such as the <code>drawImage</code> method of
- * <code>Graphics</code> becomes available.
- * See the definition of <code>imageUpdate</code> for
+ * routine such as the {@code drawImage} method of
+ * {@code Graphics} becomes available.
+ * See the definition of {@code imageUpdate} for
* more information on this method and its arguments.
* <p>
- * The <code>imageUpdate</code> method of <code>Component</code>
+ * The {@code imageUpdate} method of {@code Component}
* incrementally draws an image on the component as more of the bits
* of the image are available.
* <p>
- * If the system property <code>awt.image.incrementaldraw</code>
- * is missing or has the value <code>true</code>, the image is
+ * If the system property {@code awt.image.incrementaldraw}
+ * is missing or has the value {@code true}, the image is
* incrementally drawn. If the system property has any other value,
* then the image is not drawn until it has been completely loaded.
* <p>
* Also, if incremental drawing is in effect, the value of the
- * system property <code>awt.image.redrawrate</code> is interpreted
+ * system property {@code awt.image.redrawrate} is interpreted
* as an integer to give the maximum redraw rate, in milliseconds. If
* the system property is missing or cannot be interpreted as an
* integer, the redraw rate is once every 100ms.
* <p>
- * The interpretation of the <code>x</code>, <code>y</code>,
- * <code>width</code>, and <code>height</code> arguments depends on
- * the value of the <code>infoflags</code> argument.
+ * The interpretation of the {@code x}, {@code y},
+ * {@code width}, and {@code height} arguments depends on
+ * the value of the {@code infoflags} argument.
*
* @param img the image being observed
- * @param infoflags see <code>imageUpdate</code> for more information
+ * @param infoflags see {@code imageUpdate} for more information
* @param x the <i>x</i> coordinate
* @param y the <i>y</i> coordinate
* @param w the width
* @param h the height
- * @return <code>false</code> if the infoflags indicate that the
- * image is completely loaded; <code>true</code> otherwise.
+ * @return {@code false} if the infoflags indicate that the
+ * image is completely loaded; {@code true} otherwise.
*
* @see java.awt.image.ImageObserver
* @see Graphics#drawImage(Image, int, int, Color, java.awt.image.ImageObserver)
* @see Graphics#drawImage(Image, int, int, java.awt.image.ImageObserver)
* @see Graphics#drawImage(Image, int, int, int, int, Color, java.awt.image.ImageObserver)
@@ -3631,14 +3631,14 @@
* Creates an off-screen drawable image
* to be used for double buffering.
* @param width the specified width
* @param height the specified height
* @return an off-screen drawable image, which can be used for double
- * buffering. The return value may be <code>null</code> if the
+ * buffering. The return value may be {@code null} if the
* component is not displayable. This will always happen if
- * <code>GraphicsEnvironment.isHeadless()</code> returns
- * <code>true</code>.
+ * {@code GraphicsEnvironment.isHeadless()} returns
+ * {@code true}.
* @see #isDisplayable
* @see GraphicsEnvironment#isHeadless
* @since 1.0
*/
public Image createImage(int width, int height) {
@@ -3655,14 +3655,14 @@
* Creates a volatile off-screen drawable image
* to be used for double buffering.
* @param width the specified width.
* @param height the specified height.
* @return an off-screen drawable image, which can be used for double
- * buffering. The return value may be <code>null</code> if the
+ * buffering. The return value may be {@code null} if the
* component is not displayable. This will always happen if
- * <code>GraphicsEnvironment.isHeadless()</code> returns
- * <code>true</code>.
+ * {@code GraphicsEnvironment.isHeadless()} returns
+ * {@code true}.
* @see java.awt.image.VolatileImage
* @see #isDisplayable
* @see GraphicsEnvironment#isHeadless
* @since 1.4
*/
@@ -3681,11 +3681,11 @@
/**
* Creates a volatile off-screen drawable image, with the given capabilities.
* The contents of this image may be lost at any time due
* to operating system issues, so the image must be managed
- * via the <code>VolatileImage</code> interface.
+ * via the {@code VolatileImage} interface.
* @param width the specified width.
* @param height the specified height.
* @param caps the image capabilities
* @exception AWTException if an image with the specified capabilities cannot
* be created
@@ -3702,16 +3702,16 @@
/**
* Prepares an image for rendering on this component. The image
* data is downloaded asynchronously in another thread and the
* appropriate screen representation of the image is generated.
- * @param image the <code>Image</code> for which to
+ * @param image the {@code Image} for which to
* prepare a screen representation
- * @param observer the <code>ImageObserver</code> object
+ * @param observer the {@code ImageObserver} object
* to be notified as the image is being prepared
- * @return <code>true</code> if the image has already been fully
- * prepared; <code>false</code> otherwise
+ * @return {@code true} if the image has already been fully
+ * prepared; {@code false} otherwise
* @since 1.0
*/
public boolean prepareImage(Image image, ImageObserver observer) {
return prepareImage(image, -1, -1, observer);
}
@@ -3721,18 +3721,18 @@
* specified width and height.
* <p>
* The image data is downloaded asynchronously in another thread,
* and an appropriately scaled screen representation of the image is
* generated.
- * @param image the instance of <code>Image</code>
+ * @param image the instance of {@code Image}
* for which to prepare a screen representation
* @param width the width of the desired screen representation
* @param height the height of the desired screen representation
- * @param observer the <code>ImageObserver</code> object
+ * @param observer the {@code ImageObserver} object
* to be notified as the image is being prepared
- * @return <code>true</code> if the image has already been fully
- * prepared; <code>false</code> otherwise
+ * @return {@code true} if the image has already been fully
+ * prepared; {@code false} otherwise
* @see java.awt.image.ImageObserver
* @since 1.0
*/
public boolean prepareImage(Image image, int width, int height,
ImageObserver observer) {
@@ -3751,21 +3751,21 @@
/**
* Returns the status of the construction of a screen representation
* of the specified image.
* <p>
* This method does not cause the image to begin loading. An
- * application must use the <code>prepareImage</code> method
+ * application must use the {@code prepareImage} method
* to force the loading of an image.
* <p>
* Information on the flags returned by this method can be found
- * with the discussion of the <code>ImageObserver</code> interface.
- * @param image the <code>Image</code> object whose status
+ * with the discussion of the {@code ImageObserver} interface.
+ * @param image the {@code Image} object whose status
* is being checked
- * @param observer the <code>ImageObserver</code>
+ * @param observer the {@code ImageObserver}
* object to be notified as the image is being prepared
* @return the bitwise inclusive <b>OR</b> of
- * <code>ImageObserver</code> flags indicating what
+ * {@code ImageObserver} flags indicating what
* information about the image is currently available
* @see #prepareImage(Image, int, int, java.awt.image.ImageObserver)
* @see Toolkit#checkImage(Image, int, int, java.awt.image.ImageObserver)
* @see java.awt.image.ImageObserver
* @since 1.0
@@ -3777,31 +3777,31 @@
/**
* Returns the status of the construction of a screen representation
* of the specified image.
* <p>
* This method does not cause the image to begin loading. An
- * application must use the <code>prepareImage</code> method
+ * application must use the {@code prepareImage} method
* to force the loading of an image.
* <p>
- * The <code>checkImage</code> method of <code>Component</code>
- * calls its peer's <code>checkImage</code> method to calculate
+ * The {@code checkImage} method of {@code Component}
+ * calls its peer's {@code checkImage} method to calculate
* the flags. If this component does not yet have a peer, the
- * component's toolkit's <code>checkImage</code> method is called
+ * component's toolkit's {@code checkImage} method is called
* instead.
* <p>
* Information on the flags returned by this method can be found
- * with the discussion of the <code>ImageObserver</code> interface.
- * @param image the <code>Image</code> object whose status
+ * with the discussion of the {@code ImageObserver} interface.
+ * @param image the {@code Image} object whose status
* is being checked
* @param width the width of the scaled version
* whose status is to be checked
* @param height the height of the scaled version
* whose status is to be checked
- * @param observer the <code>ImageObserver</code> object
+ * @param observer the {@code ImageObserver} object
* to be notified as the image is being prepared
* @return the bitwise inclusive <b>OR</b> of
- * <code>ImageObserver</code> flags indicating what
+ * {@code ImageObserver} flags indicating what
* information about the image is currently available
* @see #prepareImage(Image, int, int, java.awt.image.ImageObserver)
* @see Toolkit#checkImage(Image, int, int, java.awt.image.ImageObserver)
* @see java.awt.image.ImageObserver
* @since 1.0
@@ -3822,11 +3822,11 @@
/**
* Creates a new strategy for multi-buffering on this component.
* Multi-buffering is useful for rendering performance. This method
* attempts to create the best strategy available with the number of
- * buffers supplied. It will always create a <code>BufferStrategy</code>
+ * buffers supplied. It will always create a {@code BufferStrategy}
* with that number of buffers.
* A page-flipping strategy is attempted first, then a blitting strategy
* using accelerated buffers. Finally, an unaccelerated blitting
* strategy is used.
* <p>
@@ -3883,21 +3883,21 @@
* required buffer capabilities. This is useful, for example, if only
* accelerated memory or page flipping is desired (as specified by the
* buffer capabilities).
* <p>
* Each time this method
- * is called, <code>dispose</code> will be invoked on the existing
- * <code>BufferStrategy</code>.
+ * is called, {@code dispose} will be invoked on the existing
+ * {@code BufferStrategy}.
* @param numBuffers number of buffers to create
* @param caps the required capabilities for creating the buffer strategy;
- * cannot be <code>null</code>
+ * cannot be {@code null}
* @exception AWTException if the capabilities supplied could not be
* supported or met; this may happen, for example, if there is not enough
* accelerated memory currently available, or if page flipping is specified
* but not possible.
* @exception IllegalArgumentException if numBuffers is less than 1, or if
- * caps is <code>null</code>
+ * caps is {@code null}
* @see Window#getBufferStrategy()
* @see Canvas#getBufferStrategy()
* @since 1.4
*/
void createBufferStrategy(int numBuffers,
@@ -3978,11 +3978,11 @@
return null;
}
/**
* Inner class for flipping buffers on a component. That component must
- * be a <code>Canvas</code> or <code>Window</code> or <code>Applet</code>.
+ * be a {@code Canvas} or {@code Window} or {@code Applet}.
* @see Canvas
* @see Window
* @see Applet
* @see java.awt.image.BufferStrategy
* @author Michael Martak
@@ -4029,12 +4029,12 @@
*/
int height;
/**
* Creates a new flipping buffer strategy for this component.
- * The component must be a <code>Canvas</code> or <code>Window</code> or
- * <code>Applet</code>.
+ * The component must be a {@code Canvas} or {@code Window} or
+ * {@code Applet}.
* @see Canvas
* @see Window
* @see Applet
* @param numBuffers the number of buffers
* @param caps the capabilities of the buffers
@@ -4067,18 +4067,18 @@
* Creates one or more complex, flipping buffers with the given
* capabilities.
* @param numBuffers number of buffers to create; must be greater than
* one
* @param caps the capabilities of the buffers.
- * <code>BufferCapabilities.isPageFlipping</code> must be
- * <code>true</code>.
+ * {@code BufferCapabilities.isPageFlipping} must be
+ * {@code true}.
* @exception AWTException if the capabilities supplied could not be
* supported or met
* @exception IllegalStateException if the component has no peer
* @exception IllegalArgumentException if numBuffers is less than two,
- * or if <code>BufferCapabilities.isPageFlipping</code> is not
- * <code>true</code>.
+ * or if {@code BufferCapabilities.isPageFlipping} is not
+ * {@code true}.
* @see java.awt.BufferCapabilities#isPageFlipping()
*/
protected void createBuffers(int numBuffers, BufferCapabilities caps)
throws AWTException
{
@@ -4155,11 +4155,11 @@
/**
* Flipping moves the contents of the back buffer to the front buffer,
* either by copying or by moving the video pointer.
* @param flipAction an integer value describing the flipping action
* for the contents of the back buffer. This should be one of the
- * values of the <code>BufferCapabilities.FlipContents</code>
+ * values of the {@code BufferCapabilities.FlipContents}
* property.
* @exception IllegalStateException if the buffers have not yet
* been created
* @see java.awt.BufferCapabilities#getFlipContents()
*/
@@ -4269,11 +4269,11 @@
}
}
/**
* @return whether the drawing buffer was lost since the last call to
- * <code>getDrawGraphics</code>
+ * {@code getDrawGraphics}
*/
public boolean contentsLost() {
if (drawVBuffer == null) {
return false;
}
@@ -4556,11 +4556,11 @@
}
}
/**
* @return whether the drawing buffer was lost since the last call to
- * <code>getDrawGraphics</code>
+ * {@code getDrawGraphics}
*/
public boolean contentsLost() {
if (backBuffers == null) {
return false;
} else {
@@ -4635,11 +4635,11 @@
}
}
/**
* Inner class for flipping buffers on a component. That component must
- * be a <code>Canvas</code> or <code>Window</code>.
+ * be a {@code Canvas} or {@code Window}.
* @see Canvas
* @see Window
* @see java.awt.image.BufferStrategy
* @author Michael Martak
* @since 1.4
@@ -4703,11 +4703,11 @@
return ignoreRepaint;
}
/**
* Checks whether this component "contains" the specified point,
- * where <code>x</code> and <code>y</code> are defined to be
+ * where {@code x} and {@code y} are defined to be
* relative to the coordinate system of this component.
*
* @param x the <i>x</i> coordinate of the point
* @param y the <i>y</i> coordinate of the point
* @return {@code true} if the point is within the component;
@@ -4756,19 +4756,19 @@
* and if so, returns the containing component. This method only
* looks one level deep. If the point (<i>x</i>, <i>y</i>) is
* inside a subcomponent that itself has subcomponents, it does not
* go looking down the subcomponent tree.
* <p>
- * The <code>locate</code> method of <code>Component</code> simply
+ * The {@code locate} method of {@code Component} simply
* returns the component itself if the (<i>x</i>, <i>y</i>)
- * coordinate location is inside its bounding box, and <code>null</code>
+ * coordinate location is inside its bounding box, and {@code null}
* otherwise.
* @param x the <i>x</i> coordinate
* @param y the <i>y</i> coordinate
* @return the component or subcomponent that contains the
* (<i>x</i>, <i>y</i>) location;
- * <code>null</code> if the location
+ * {@code null} if the location
* is outside this component
* @see #contains(int, int)
* @since 1.0
*/
public Component getComponentAt(int x, int y) {
@@ -4804,21 +4804,21 @@
}
/**
* @param e the event to deliver
* @deprecated As of JDK version 1.1,
- * replaced by <code>dispatchEvent(AWTEvent e)</code>.
+ * replaced by {@code dispatchEvent(AWTEvent e)}.
*/
@Deprecated
public void deliverEvent(Event e) {
postEvent(e);
}
/**
* Dispatches an event to this component or one of its sub components.
- * Calls <code>processEvent</code> before returning for 1.1-style
- * events which have been enabled for the <code>Component</code>.
+ * Calls {@code processEvent} before returning for 1.1-style
+ * events which have been enabled for the {@code Component}.
* @param e the event
*/
public final void dispatchEvent(AWTEvent e) {
dispatchEventImpl(e);
}
@@ -5282,11 +5282,11 @@
// Event source interfaces
/**
* Adds the specified component listener to receive component events from
* this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the component listener
@@ -5307,11 +5307,11 @@
/**
* Removes the specified component listener so that it no longer
* receives component events from this component. This method performs
* no function, nor does it throw an exception, if the listener
* specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
* @param l the component listener
* @see java.awt.event.ComponentEvent
@@ -5329,11 +5329,11 @@
/**
* Returns an array of all the component listeners
* registered on this component.
*
- * @return all <code>ComponentListener</code>s of this component
+ * @return all {@code ComponentListener}s of this component
* or an empty array if no component
* listeners are currently registered
*
* @see #addComponentListener
* @see #removeComponentListener
@@ -5344,11 +5344,11 @@
}
/**
* Adds the specified focus listener to receive focus events from
* this component when this component gains input focus.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the focus listener
@@ -5375,11 +5375,11 @@
/**
* Removes the specified focus listener so that it no longer
* receives focus events from this component. This method performs
* no function, nor does it throw an exception, if the listener
* specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the focus listener
@@ -5398,11 +5398,11 @@
/**
* Returns an array of all the focus listeners
* registered on this component.
*
- * @return all of this component's <code>FocusListener</code>s
+ * @return all of this component's {@code FocusListener}s
* or an empty array if no component
* listeners are currently registered
*
* @see #addFocusListener
* @see #removeFocusListener
@@ -5414,11 +5414,11 @@
/**
* Adds the specified hierarchy listener to receive hierarchy changed
* events from this component when the hierarchy to which this container
* belongs changes.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the hierarchy listener
@@ -5452,11 +5452,11 @@
/**
* Removes the specified hierarchy listener so that it no longer
* receives hierarchy changed events from this component. This method
* performs no function, nor does it throw an exception, if the listener
* specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the hierarchy listener
@@ -5489,11 +5489,11 @@
/**
* Returns an array of all the hierarchy listeners
* registered on this component.
*
- * @return all of this component's <code>HierarchyListener</code>s
+ * @return all of this component's {@code HierarchyListener}s
* or an empty array if no hierarchy
* listeners are currently registered
*
* @see #addHierarchyListener
* @see #removeHierarchyListener
@@ -5505,11 +5505,11 @@
/**
* Adds the specified hierarchy bounds listener to receive hierarchy
* bounds events from this component when the hierarchy to which this
* container belongs changes.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the hierarchy bounds listener
@@ -5545,11 +5545,11 @@
/**
* Removes the specified hierarchy bounds listener so that it no longer
* receives hierarchy bounds events from this component. This method
* performs no function, nor does it throw an exception, if the listener
* specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the hierarchy bounds listener
@@ -5651,11 +5651,11 @@
/**
* Returns an array of all the hierarchy bounds listeners
* registered on this component.
*
- * @return all of this component's <code>HierarchyBoundsListener</code>s
+ * @return all of this component's {@code HierarchyBoundsListener}s
* or an empty array if no hierarchy bounds
* listeners are currently registered
*
* @see #addHierarchyBoundsListener
* @see #removeHierarchyBoundsListener
@@ -5707,11 +5707,11 @@
/**
* Removes the specified key listener so that it no longer
* receives key events from this component. This method performs
* no function, nor does it throw an exception, if the listener
* specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the key listener
@@ -5730,11 +5730,11 @@
/**
* Returns an array of all the key listeners
* registered on this component.
*
- * @return all of this component's <code>KeyListener</code>s
+ * @return all of this component's {@code KeyListener}s
* or an empty array if no key
* listeners are currently registered
*
* @see #addKeyListener
* @see #removeKeyListener
@@ -5745,11 +5745,11 @@
}
/**
* Adds the specified mouse listener to receive mouse events from
* this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the mouse listener
@@ -5776,11 +5776,11 @@
/**
* Removes the specified mouse listener so that it no longer
* receives mouse events from this component. This method performs
* no function, nor does it throw an exception, if the listener
* specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the mouse listener
@@ -5799,11 +5799,11 @@
/**
* Returns an array of all the mouse listeners
* registered on this component.
*
- * @return all of this component's <code>MouseListener</code>s
+ * @return all of this component's {@code MouseListener}s
* or an empty array if no mouse
* listeners are currently registered
*
* @see #addMouseListener
* @see #removeMouseListener
@@ -5814,11 +5814,11 @@
}
/**
* Adds the specified mouse motion listener to receive mouse motion
* events from this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the mouse motion listener
@@ -5845,11 +5845,11 @@
/**
* Removes the specified mouse motion listener so that it no longer
* receives mouse motion events from this component. This method performs
* no function, nor does it throw an exception, if the listener
* specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the mouse motion listener
@@ -5868,11 +5868,11 @@
/**
* Returns an array of all the mouse motion listeners
* registered on this component.
*
- * @return all of this component's <code>MouseMotionListener</code>s
+ * @return all of this component's {@code MouseMotionListener}s
* or an empty array if no mouse motion
* listeners are currently registered
*
* @see #addMouseMotionListener
* @see #removeMouseMotionListener
@@ -5888,11 +5888,11 @@
* sub-components.
* <p>
* For information on how mouse wheel events are dispatched, see
* the class description for {@link MouseWheelEvent}.
* <p>
- * If l is <code>null</code>, no exception is thrown and no
+ * If l is {@code null}, no exception is thrown and no
* action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the mouse wheel listener
@@ -5941,11 +5941,11 @@
/**
* Returns an array of all the mouse wheel listeners
* registered on this component.
*
- * @return all of this component's <code>MouseWheelListener</code>s
+ * @return all of this component's {@code MouseWheelListener}s
* or an empty array if no mouse wheel
* listeners are currently registered
*
* @see #addMouseWheelListener
* @see #removeMouseWheelListener
@@ -5957,13 +5957,13 @@
/**
* Adds the specified input method listener to receive
* input method events from this component. A component will
* only receive input method events from input methods
- * if it also overrides <code>getInputMethodRequests</code> to return an
- * <code>InputMethodRequests</code> instance.
- * If listener <code>l</code> is <code>null</code>,
+ * if it also overrides {@code getInputMethodRequests} to return an
+ * {@code InputMethodRequests} instance.
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="{@docRoot}/java/awt/doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the input method listener
@@ -5985,11 +5985,11 @@
/**
* Removes the specified input method listener so that it no longer
* receives input method events from this component. This method performs
* no function, nor does it throw an exception, if the listener
* specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
+ * If listener {@code l} is {@code null},
* no exception is thrown and no action is performed.
* <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads"
* >AWT Threading Issues</a> for details on AWT's threading model.
*
* @param l the input method listener
@@ -6008,11 +6008,11 @@
/**
* Returns an array of all the input method listeners
* registered on this component.
*
- * @return all of this component's <code>InputMethodListener</code>s
+ * @return all of this component's {@code InputMethodListener}s
* or an empty array if no input method
* listeners are currently registered
*
* @see #addInputMethodListener
* @see #removeInputMethodListener
@@ -6023,36 +6023,36 @@
}
/**
* Returns an array of all the objects currently registered
* as <code><em>Foo</em>Listener</code>s
- * upon this <code>Component</code>.
+ * upon this {@code Component}.
* <code><em>Foo</em>Listener</code>s are registered using the
* <code>add<em>Foo</em>Listener</code> method.
*
* <p>
- * You can specify the <code>listenerType</code> argument
+ * You can specify the {@code listenerType} argument
* with a class literal, such as
* <code><em>Foo</em>Listener.class</code>.
* For example, you can query a
- * <code>Component</code> <code>c</code>
+ * {@code Component c}
* for its mouse listeners with the following code:
*
* <pre>MouseListener[] mls = (MouseListener[])(c.getListeners(MouseListener.class));</pre>
*
* If no such listeners exist, this method returns an empty array.
*
* @param <T> the type of the listeners
* @param listenerType the type of listeners requested; this parameter
* should specify an interface that descends from
- * <code>java.util.EventListener</code>
+ * {@code java.util.EventListener}
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s on this component,
* or an empty array if no such listeners have been added
- * @exception ClassCastException if <code>listenerType</code>
+ * @exception ClassCastException if {@code listenerType}
* doesn't specify a class or interface that implements
- * <code>java.util.EventListener</code>
+ * {@code java.util.EventListener}
* @throws NullPointerException if {@code listenerType} is {@code null}
* @see #getComponentListeners
* @see #getFocusListeners
* @see #getHierarchyListeners
* @see #getHierarchyBoundsListeners
@@ -6094,15 +6094,15 @@
/**
* Gets the input method request handler which supports
* requests from input methods for this component. A component
* that supports on-the-spot text input must override this
- * method to return an <code>InputMethodRequests</code> instance.
+ * method to return an {@code InputMethodRequests} instance.
* At the same time, it also has to handle input method events.
*
* @return the input method request handler for this component,
- * <code>null</code> by default
+ * {@code null} by default
* @see #addInputMethodListener
* @since 1.2
*/
public InputMethodRequests getInputMethodRequests() {
return null;
@@ -6114,11 +6114,11 @@
* in this component. By default, the input context used for
* the parent component is returned. Components may
* override this to return a private input context.
*
* @return the input context used by this component;
- * <code>null</code> if no context can be determined
+ * {@code null} if no context can be determined
* @since 1.2
*/
public InputContext getInputContext() {
Container parent = this.parent;
if (parent == null) {
@@ -6134,12 +6134,12 @@
* <p>
* Event types are automatically enabled when a listener for
* that event type is added to the component.
* <p>
* This method only needs to be invoked by subclasses of
- * <code>Component</code> which desire to have the specified event
- * types delivered to <code>processEvent</code> regardless of whether
+ * {@code Component} which desire to have the specified event
+ * types delivered to {@code processEvent} regardless of whether
* or not a listener is registered.
* @param eventsToEnable the event mask defining the event types
* @see #processEvent
* @see #disableEvents
* @see AWTEvent
@@ -6307,32 +6307,32 @@
}
/**
* Potentially coalesce an event being posted with an existing
- * event. This method is called by <code>EventQueue.postEvent</code>
+ * event. This method is called by {@code EventQueue.postEvent}
* if an event with the same ID as the event to be posted is found in
* the queue (both events must have this component as their source).
* This method either returns a coalesced event which replaces
* the existing event (and the new event is then discarded), or
- * <code>null</code> to indicate that no combining should be done
+ * {@code null} to indicate that no combining should be done
* (add the second event to the end of the queue). Either event
* parameter may be modified and returned, as the other one is discarded
- * unless <code>null</code> is returned.
+ * unless {@code null} is returned.
* <p>
- * This implementation of <code>coalesceEvents</code> coalesces
+ * This implementation of {@code coalesceEvents} coalesces
* two event types: mouse move (and drag) events,
* and paint (and update) events.
* For mouse move events the last event is always returned, causing
* intermediate moves to be discarded. For paint events, the new
- * event is coalesced into a complex <code>RepaintArea</code> in the peer.
- * The new <code>AWTEvent</code> is always returned.
+ * event is coalesced into a complex {@code RepaintArea} in the peer.
+ * The new {@code AWTEvent} is always returned.
*
- * @param existingEvent the event already on the <code>EventQueue</code>
+ * @param existingEvent the event already on the {@code EventQueue}
* @param newEvent the event being posted to the
- * <code>EventQueue</code>
- * @return a coalesced event, or <code>null</code> indicating that no
+ * {@code EventQueue}
+ * @return a coalesced event, or {@code null} indicating that no
* coalescing was done
*/
protected AWTEvent coalesceEvents(AWTEvent existingEvent,
AWTEvent newEvent) {
return null;
@@ -6341,11 +6341,11 @@
/**
* Processes events occurring on this component. By default this
* method calls the appropriate
* <code>process<event type>Event</code>
* method for the given class of event.
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the event
* @see #processComponentEvent
@@ -6401,21 +6401,21 @@
}
/**
* Processes component events occurring on this component by
* dispatching them to any registered
- * <code>ComponentListener</code> objects.
+ * {@code ComponentListener} objects.
* <p>
* This method is not called unless component events are
* enabled for this component. Component events are enabled
* when one of the following occurs:
* <ul>
- * <li>A <code>ComponentListener</code> object is registered
- * via <code>addComponentListener</code>.
- * <li>Component events are enabled via <code>enableEvents</code>.
+ * <li>A {@code ComponentListener} object is registered
+ * via {@code addComponentListener}.
+ * <li>Component events are enabled via {@code enableEvents}.
* </ul>
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the component event
* @see java.awt.event.ComponentEvent
@@ -6446,37 +6446,37 @@
}
/**
* Processes focus events occurring on this component by
* dispatching them to any registered
- * <code>FocusListener</code> objects.
+ * {@code FocusListener} objects.
* <p>
* This method is not called unless focus events are
* enabled for this component. Focus events are enabled
* when one of the following occurs:
* <ul>
- * <li>A <code>FocusListener</code> object is registered
- * via <code>addFocusListener</code>.
- * <li>Focus events are enabled via <code>enableEvents</code>.
+ * <li>A {@code FocusListener} object is registered
+ * via {@code addFocusListener}.
+ * <li>Focus events are enabled via {@code enableEvents}.
* </ul>
* <p>
- * If focus events are enabled for a <code>Component</code>,
- * the current <code>KeyboardFocusManager</code> determines
+ * If focus events are enabled for a {@code Component},
+ * the current {@code KeyboardFocusManager} determines
* whether or not a focus event should be dispatched to
- * registered <code>FocusListener</code> objects. If the
- * events are to be dispatched, the <code>KeyboardFocusManager</code>
- * calls the <code>Component</code>'s <code>dispatchEvent</code>
- * method, which results in a call to the <code>Component</code>'s
- * <code>processFocusEvent</code> method.
- * <p>
- * If focus events are enabled for a <code>Component</code>, calling
- * the <code>Component</code>'s <code>dispatchEvent</code> method
- * with a <code>FocusEvent</code> as the argument will result in a
- * call to the <code>Component</code>'s <code>processFocusEvent</code>
- * method regardless of the current <code>KeyboardFocusManager</code>.
+ * registered {@code FocusListener} objects. If the
+ * events are to be dispatched, the {@code KeyboardFocusManager}
+ * calls the {@code Component}'s {@code dispatchEvent}
+ * method, which results in a call to the {@code Component}'s
+ * {@code processFocusEvent} method.
+ * <p>
+ * If focus events are enabled for a {@code Component}, calling
+ * the {@code Component}'s {@code dispatchEvent} method
+ * with a {@code FocusEvent} as the argument will result in a
+ * call to the {@code Component}'s {@code processFocusEvent}
+ * method regardless of the current {@code KeyboardFocusManager}.
*
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the focus event
* @see java.awt.event.FocusEvent
@@ -6503,43 +6503,43 @@
}
/**
* Processes key events occurring on this component by
* dispatching them to any registered
- * <code>KeyListener</code> objects.
+ * {@code KeyListener} objects.
* <p>
* This method is not called unless key events are
* enabled for this component. Key events are enabled
* when one of the following occurs:
* <ul>
- * <li>A <code>KeyListener</code> object is registered
- * via <code>addKeyListener</code>.
- * <li>Key events are enabled via <code>enableEvents</code>.
+ * <li>A {@code KeyListener} object is registered
+ * via {@code addKeyListener}.
+ * <li>Key events are enabled via {@code enableEvents}.
* </ul>
*
* <p>
- * If key events are enabled for a <code>Component</code>,
- * the current <code>KeyboardFocusManager</code> determines
+ * If key events are enabled for a {@code Component},
+ * the current {@code KeyboardFocusManager} determines
* whether or not a key event should be dispatched to
- * registered <code>KeyListener</code> objects. The
- * <code>DefaultKeyboardFocusManager</code> will not dispatch
- * key events to a <code>Component</code> that is not the focus
+ * registered {@code KeyListener} objects. The
+ * {@code DefaultKeyboardFocusManager} will not dispatch
+ * key events to a {@code Component} that is not the focus
* owner or is not showing.
* <p>
- * As of J2SE 1.4, <code>KeyEvent</code>s are redirected to
+ * As of J2SE 1.4, {@code KeyEvent}s are redirected to
* the focus owner. Please see the
* <a href="doc-files/FocusSpec.html">Focus Specification</a>
* for further information.
* <p>
- * Calling a <code>Component</code>'s <code>dispatchEvent</code>
- * method with a <code>KeyEvent</code> as the argument will
- * result in a call to the <code>Component</code>'s
- * <code>processKeyEvent</code> method regardless of the
- * current <code>KeyboardFocusManager</code> as long as the
+ * Calling a {@code Component}'s {@code dispatchEvent}
+ * method with a {@code KeyEvent} as the argument will
+ * result in a call to the {@code Component}'s
+ * {@code processKeyEvent} method regardless of the
+ * current {@code KeyboardFocusManager} as long as the
* component is showing, focused, and enabled, and key events
* are enabled on it.
- * <p>If the event parameter is <code>null</code>
+ * <p>If the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the key event
* @see java.awt.event.KeyEvent
@@ -6572,21 +6572,21 @@
}
/**
* Processes mouse events occurring on this component by
* dispatching them to any registered
- * <code>MouseListener</code> objects.
+ * {@code MouseListener} objects.
* <p>
* This method is not called unless mouse events are
* enabled for this component. Mouse events are enabled
* when one of the following occurs:
* <ul>
- * <li>A <code>MouseListener</code> object is registered
- * via <code>addMouseListener</code>.
- * <li>Mouse events are enabled via <code>enableEvents</code>.
+ * <li>A {@code MouseListener} object is registered
+ * via {@code addMouseListener}.
+ * <li>Mouse events are enabled via {@code enableEvents}.
* </ul>
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the mouse event
* @see java.awt.event.MouseEvent
@@ -6620,21 +6620,21 @@
}
/**
* Processes mouse motion events occurring on this component by
* dispatching them to any registered
- * <code>MouseMotionListener</code> objects.
+ * {@code MouseMotionListener} objects.
* <p>
* This method is not called unless mouse motion events are
* enabled for this component. Mouse motion events are enabled
* when one of the following occurs:
* <ul>
- * <li>A <code>MouseMotionListener</code> object is registered
- * via <code>addMouseMotionListener</code>.
- * <li>Mouse motion events are enabled via <code>enableEvents</code>.
+ * <li>A {@code MouseMotionListener} object is registered
+ * via {@code addMouseMotionListener}.
+ * <li>Mouse motion events are enabled via {@code enableEvents}.
* </ul>
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the mouse motion event
* @see java.awt.event.MouseEvent
@@ -6659,25 +6659,25 @@
}
/**
* Processes mouse wheel events occurring on this component by
* dispatching them to any registered
- * <code>MouseWheelListener</code> objects.
+ * {@code MouseWheelListener} objects.
* <p>
* This method is not called unless mouse wheel events are
* enabled for this component. Mouse wheel events are enabled
* when one of the following occurs:
* <ul>
- * <li>A <code>MouseWheelListener</code> object is registered
- * via <code>addMouseWheelListener</code>.
- * <li>Mouse wheel events are enabled via <code>enableEvents</code>.
+ * <li>A {@code MouseWheelListener} object is registered
+ * via {@code addMouseWheelListener}.
+ * <li>Mouse wheel events are enabled via {@code enableEvents}.
* </ul>
* <p>
* For information on how mouse wheel events are dispatched, see
* the class description for {@link MouseWheelEvent}.
* <p>
- * Note that if the event parameter is <code>null</code>
+ * Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the mouse wheel event
* @see java.awt.event.MouseWheelEvent
@@ -6703,21 +6703,21 @@
}
/**
* Processes input method events occurring on this component by
* dispatching them to any registered
- * <code>InputMethodListener</code> objects.
+ * {@code InputMethodListener} objects.
* <p>
* This method is not called unless input method events
* are enabled for this component. Input method events are enabled
* when one of the following occurs:
* <ul>
- * <li>An <code>InputMethodListener</code> object is registered
- * via <code>addInputMethodListener</code>.
- * <li>Input method events are enabled via <code>enableEvents</code>.
+ * <li>An {@code InputMethodListener} object is registered
+ * via {@code addInputMethodListener}.
+ * <li>Input method events are enabled via {@code enableEvents}.
* </ul>
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the input method event
* @see java.awt.event.InputMethodEvent
@@ -6742,21 +6742,21 @@
}
/**
* Processes hierarchy events occurring on this component by
* dispatching them to any registered
- * <code>HierarchyListener</code> objects.
+ * {@code HierarchyListener} objects.
* <p>
* This method is not called unless hierarchy events
* are enabled for this component. Hierarchy events are enabled
* when one of the following occurs:
* <ul>
- * <li>An <code>HierarchyListener</code> object is registered
- * via <code>addHierarchyListener</code>.
- * <li>Hierarchy events are enabled via <code>enableEvents</code>.
+ * <li>An {@code HierarchyListener} object is registered
+ * via {@code addHierarchyListener}.
+ * <li>Hierarchy events are enabled via {@code enableEvents}.
* </ul>
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the hierarchy event
* @see java.awt.event.HierarchyEvent
@@ -6778,21 +6778,21 @@
}
/**
* Processes hierarchy bounds events occurring on this component by
* dispatching them to any registered
- * <code>HierarchyBoundsListener</code> objects.
+ * {@code HierarchyBoundsListener} objects.
* <p>
* This method is not called unless hierarchy bounds events
* are enabled for this component. Hierarchy bounds events are enabled
* when one of the following occurs:
* <ul>
- * <li>An <code>HierarchyBoundsListener</code> object is registered
- * via <code>addHierarchyBoundsListener</code>.
- * <li>Hierarchy bounds events are enabled via <code>enableEvents</code>.
+ * <li>An {@code HierarchyBoundsListener} object is registered
+ * via {@code addHierarchyBoundsListener}.
+ * <li>Hierarchy bounds events are enabled via {@code enableEvents}.
* </ul>
- * <p>Note that if the event parameter is <code>null</code>
+ * <p>Note that if the event parameter is {@code null}
* the behavior is unspecified and may result in an
* exception.
*
* @param e the hierarchy event
* @see java.awt.event.HierarchyEvent
@@ -6975,11 +6975,11 @@
public boolean action(Event evt, Object what) {
return false;
}
/**
- * Makes this <code>Component</code> displayable by connecting it to a
+ * Makes this {@code Component} displayable by connecting it to a
* native screen resource.
* This method is called internally by the toolkit and should
* not be called directly by programs.
* <p>
* This method changes layout-related information, and therefore,
@@ -7079,16 +7079,16 @@
}
}
}
/**
- * Makes this <code>Component</code> undisplayable by destroying it native
+ * Makes this {@code Component} undisplayable by destroying it native
* screen resource.
* <p>
* This method is called by the toolkit internally and should
* not be called directly by programs. Code overriding
- * this method should call <code>super.removeNotify</code> as
+ * this method should call {@code super.removeNotify} as
* the first line of the overriding method.
*
* @see #isDisplayable
* @see #addNotify
* @since 1.0
@@ -7196,18 +7196,18 @@
public boolean lostFocus(Event evt, Object what) {
return false;
}
/**
- * Returns whether this <code>Component</code> can become the focus
+ * Returns whether this {@code Component} can become the focus
* owner.
*
- * @return <code>true</code> if this <code>Component</code> is
- * focusable; <code>false</code> otherwise
+ * @return {@code true} if this {@code Component} is
+ * focusable; {@code false} otherwise
* @see #setFocusable
* @since 1.1
- * @deprecated As of 1.4, replaced by <code>isFocusable()</code>.
+ * @deprecated As of 1.4, replaced by {@code isFocusable()}.
*/
@Deprecated
public boolean isFocusTraversable() {
if (isFocusTraversableOverridden == FOCUS_TRAVERSABLE_UNKNOWN) {
isFocusTraversableOverridden = FOCUS_TRAVERSABLE_DEFAULT;
@@ -7216,12 +7216,12 @@
}
/**
* Returns whether this Component can be focused.
*
- * @return <code>true</code> if this Component is focusable;
- * <code>false</code> otherwise.
+ * @return {@code true} if this Component is focusable;
+ * {@code false} otherwise.
* @see #setFocusable
* @since 1.4
*/
public boolean isFocusable() {
return isFocusTraversable();
@@ -7341,11 +7341,11 @@
}
/**
* Returns the Set of focus traversal keys for a given traversal operation
* for this Component. (See
- * <code>setFocusTraversalKeys</code> for a full description of each key.)
+ * {@code setFocusTraversalKeys} for a full description of each key.)
* <p>
* If a Set of traversal keys has not been explicitly defined for this
* Component, then this Component's parent's Set is returned. If no Set
* has been explicitly defined for any of this Component's ancestors, then
* the current KeyboardFocusManager's default Set is returned.
@@ -7441,19 +7441,19 @@
}
/**
* Returns whether the Set of focus traversal keys for the given focus
* traversal operation has been explicitly defined for this Component. If
- * this method returns <code>false</code>, this Component is inheriting the
+ * this method returns {@code false}, this Component is inheriting the
* Set from an ancestor, or from the current KeyboardFocusManager.
*
* @param id one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
* KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
* KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS
- * @return <code>true</code> if the Set of focus traversal keys for the
+ * @return {@code true} if the Set of focus traversal keys for the
* given focus traversal operation has been explicitly defined for
- * this Component; <code>false</code> otherwise.
+ * this Component; {@code false} otherwise.
* @throws IllegalArgumentException if id is not one of
* KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
* KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
* KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS
* @since 1.4
@@ -7524,16 +7524,16 @@
* Component's top-level Window cannot become the focused Window,
* the request will be remembered and will be granted when the
* Window is later focused by the user.
* <p>
* This method cannot be used to set the focus owner to no Component at
- * all. Use <code>KeyboardFocusManager.clearGlobalFocusOwner()</code>
+ * all. Use {@code KeyboardFocusManager.clearGlobalFocusOwner()}
* instead.
* <p>
* Because the focus behavior of this method is platform-dependent,
* developers are strongly encouraged to use
- * <code>requestFocusInWindow</code> when possible.
+ * {@code requestFocusInWindow} when possible.
*
* <p>Note: Not all focus transfers result from invoking this method. As
* such, a component may receive focus without this or any of the other
* {@code requestFocus} methods of {@code Component} being invoked.
*
@@ -7552,13 +7552,13 @@
boolean requestFocus(CausedFocusEvent.Cause cause) {
return requestFocusHelper(false, true, cause);
}
/**
- * Requests that this <code>Component</code> get the input focus,
- * and that this <code>Component</code>'s top-level ancestor
- * become the focused <code>Window</code>. This component must be
+ * Requests that this {@code Component} get the input focus,
+ * and that this {@code Component}'s top-level ancestor
+ * become the focused {@code Window}. This component must be
* displayable, focusable, visible and all of its ancestors (with
* the exception of the top-level Window) must be visible for the
* request to be granted. Every effort will be made to honor the
* request; however, in some cases it may be impossible to do
* so. Developers must never assume that this component is the
@@ -7566,33 +7566,33 @@
* event. If this request is denied because this component's
* top-level window cannot become the focused window, the request
* will be remembered and will be granted when the window is later
* focused by the user.
* <p>
- * This method returns a boolean value. If <code>false</code> is returned,
- * the request is <b>guaranteed to fail</b>. If <code>true</code> is
+ * This method returns a boolean value. If {@code false} is returned,
+ * the request is <b>guaranteed to fail</b>. If {@code true} is
* returned, the request will succeed <b>unless</b> it is vetoed, or an
* extraordinary event, such as disposal of the component's peer, occurs
* before the request can be granted by the native windowing system. Again,
- * while a return value of <code>true</code> indicates that the request is
+ * while a return value of {@code true} indicates that the request is
* likely to succeed, developers must never assume that this component is
* the focus owner until this component receives a FOCUS_GAINED event.
* <p>
* This method cannot be used to set the focus owner to no component at
- * all. Use <code>KeyboardFocusManager.clearGlobalFocusOwner</code>
+ * all. Use {@code KeyboardFocusManager.clearGlobalFocusOwner}
* instead.
* <p>
* Because the focus behavior of this method is platform-dependent,
* developers are strongly encouraged to use
- * <code>requestFocusInWindow</code> when possible.
+ * {@code requestFocusInWindow} when possible.
* <p>
- * Every effort will be made to ensure that <code>FocusEvent</code>s
+ * Every effort will be made to ensure that {@code FocusEvent}s
* generated as a
* result of this request will have the specified temporary value. However,
* because specifying an arbitrary temporary state may not be implementable
* on all native windowing systems, correct behavior for this method can be
- * guaranteed only for lightweight <code>Component</code>s.
+ * guaranteed only for lightweight {@code Component}s.
* This method is not intended
* for general use, but exists instead as a hook for lightweight component
* libraries, such as Swing.
*
* <p>Note: Not all focus transfers result from invoking this method. As
@@ -7601,12 +7601,12 @@
*
* @param temporary true if the focus change is temporary,
* such as when the window loses the focus; for
* more information on temporary focus changes see the
*<a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
- * @return <code>false</code> if the focus change request is guaranteed to
- * fail; <code>true</code> if it is likely to succeed
+ * @return {@code false} if the focus change request is guaranteed to
+ * fail; {@code true} if it is likely to succeed
* @see java.awt.event.FocusEvent
* @see #addFocusListener
* @see #isFocusable
* @see #isDisplayable
* @see KeyboardFocusManager#clearGlobalFocusOwner
@@ -7628,35 +7628,35 @@
* effort will be made to honor the request; however, in some
* cases it may be impossible to do so. Developers must never
* assume that this Component is the focus owner until this
* Component receives a FOCUS_GAINED event.
* <p>
- * This method returns a boolean value. If <code>false</code> is returned,
- * the request is <b>guaranteed to fail</b>. If <code>true</code> is
+ * This method returns a boolean value. If {@code false} is returned,
+ * the request is <b>guaranteed to fail</b>. If {@code true} is
* returned, the request will succeed <b>unless</b> it is vetoed, or an
* extraordinary event, such as disposal of the Component's peer, occurs
* before the request can be granted by the native windowing system. Again,
- * while a return value of <code>true</code> indicates that the request is
+ * while a return value of {@code true} indicates that the request is
* likely to succeed, developers must never assume that this Component is
* the focus owner until this Component receives a FOCUS_GAINED event.
* <p>
* This method cannot be used to set the focus owner to no Component at
- * all. Use <code>KeyboardFocusManager.clearGlobalFocusOwner()</code>
+ * all. Use {@code KeyboardFocusManager.clearGlobalFocusOwner()}
* instead.
* <p>
* The focus behavior of this method can be implemented uniformly across
* platforms, and thus developers are strongly encouraged to use this
- * method over <code>requestFocus</code> when possible. Code which relies
- * on <code>requestFocus</code> may exhibit different focus behavior on
+ * method over {@code requestFocus} when possible. Code which relies
+ * on {@code requestFocus} may exhibit different focus behavior on
* different platforms.
*
* <p>Note: Not all focus transfers result from invoking this method. As
* such, a component may receive focus without this or any of the other
* {@code requestFocus} methods of {@code Component} being invoked.
*
- * @return <code>false</code> if the focus change request is guaranteed to
- * fail; <code>true</code> if it is likely to succeed
+ * @return {@code false} if the focus change request is guaranteed to
+ * fail; {@code true} if it is likely to succeed
* @see #requestFocus
* @see java.awt.event.FocusEvent
* @see #addFocusListener
* @see #isFocusable
* @see #isDisplayable
@@ -7670,40 +7670,40 @@
boolean requestFocusInWindow(CausedFocusEvent.Cause cause) {
return requestFocusHelper(false, false, cause);
}
/**
- * Requests that this <code>Component</code> get the input focus,
- * if this <code>Component</code>'s top-level ancestor is already
- * the focused <code>Window</code>. This component must be
+ * Requests that this {@code Component} get the input focus,
+ * if this {@code Component}'s top-level ancestor is already
+ * the focused {@code Window}. This component must be
* displayable, focusable, visible and all of its ancestors (with
* the exception of the top-level Window) must be visible for the
* request to be granted. Every effort will be made to honor the
* request; however, in some cases it may be impossible to do
* so. Developers must never assume that this component is the
* focus owner until this component receives a FOCUS_GAINED event.
* <p>
- * This method returns a boolean value. If <code>false</code> is returned,
- * the request is <b>guaranteed to fail</b>. If <code>true</code> is
+ * This method returns a boolean value. If {@code false} is returned,
+ * the request is <b>guaranteed to fail</b>. If {@code true} is
* returned, the request will succeed <b>unless</b> it is vetoed, or an
* extraordinary event, such as disposal of the component's peer, occurs
* before the request can be granted by the native windowing system. Again,
- * while a return value of <code>true</code> indicates that the request is
+ * while a return value of {@code true} indicates that the request is
* likely to succeed, developers must never assume that this component is
* the focus owner until this component receives a FOCUS_GAINED event.
* <p>
* This method cannot be used to set the focus owner to no component at
- * all. Use <code>KeyboardFocusManager.clearGlobalFocusOwner</code>
+ * all. Use {@code KeyboardFocusManager.clearGlobalFocusOwner}
* instead.
* <p>
* The focus behavior of this method can be implemented uniformly across
* platforms, and thus developers are strongly encouraged to use this
- * method over <code>requestFocus</code> when possible. Code which relies
- * on <code>requestFocus</code> may exhibit different focus behavior on
+ * method over {@code requestFocus} when possible. Code which relies
+ * on {@code requestFocus} may exhibit different focus behavior on
* different platforms.
* <p>
- * Every effort will be made to ensure that <code>FocusEvent</code>s
+ * Every effort will be made to ensure that {@code FocusEvent}s
* generated as a
* result of this request will have the specified temporary value. However,
* because specifying an arbitrary temporary state may not be implementable
* on all native windowing systems, correct behavior for this method can be
* guaranteed only for lightweight components. This method is not intended
@@ -7716,12 +7716,12 @@
*
* @param temporary true if the focus change is temporary,
* such as when the window loses the focus; for
* more information on temporary focus changes see the
*<a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
- * @return <code>false</code> if the focus change request is guaranteed to
- * fail; <code>true</code> if it is likely to succeed
+ * @return {@code false} if the focus change request is guaranteed to
+ * fail; {@code true} if it is likely to succeed
* @see #requestFocus
* @see java.awt.event.FocusEvent
* @see #addFocusListener
* @see #isFocusable
* @see #isDisplayable
@@ -7952,12 +7952,12 @@
* Component's focus traversal cycle. Each focus traversal cycle has only
* a single focus cycle root and each Component which is not a Container
* belongs to only a single focus traversal cycle.
*
* @param container the Container to be tested
- * @return <code>true</code> if the specified Container is a focus-cycle-
- * root of this Component; <code>false</code> otherwise
+ * @return {@code true} if the specified Container is a focus-cycle-
+ * root of this Component; {@code false} otherwise
* @see Container#isFocusCycleRoot()
* @since 1.4
*/
public boolean isFocusCycleRoot(Container container) {
Container rootAncestor = getFocusCycleRootAncestor();
@@ -8134,29 +8134,29 @@
}
}
}
/**
- * Returns <code>true</code> if this <code>Component</code> is the
+ * Returns {@code true} if this {@code Component} is the
* focus owner. This method is obsolete, and has been replaced by
- * <code>isFocusOwner()</code>.
+ * {@code isFocusOwner()}.
*
- * @return <code>true</code> if this <code>Component</code> is the
- * focus owner; <code>false</code> otherwise
+ * @return {@code true} if this {@code Component} is the
+ * focus owner; {@code false} otherwise
* @since 1.2
*/
public boolean hasFocus() {
return (KeyboardFocusManager.getCurrentKeyboardFocusManager().
getFocusOwner() == this);
}
/**
- * Returns <code>true</code> if this <code>Component</code> is the
+ * Returns {@code true} if this {@code Component} is the
* focus owner.
*
- * @return <code>true</code> if this <code>Component</code> is the
- * focus owner; <code>false</code> otherwise
+ * @return {@code true} if this {@code Component} is the
+ * focus owner; {@code false} otherwise
* @since 1.4
*/
public boolean isFocusOwner() {
return hasFocus();
}
@@ -8231,11 +8231,11 @@
/**
* Returns a string representing the state of this component. 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>.
+ * {@code null}.
*
* @return a string representation of this component's state
* @since 1.0
*/
protected String paramString() {
@@ -8256,11 +8256,11 @@
return getClass().getName() + '[' + paramString() + ']';
}
/**
* Prints a listing of this component to the standard system output
- * stream <code>System.out</code>.
+ * stream {@code System.out}.
* @see java.lang.System#out
* @since 1.0
*/
public void list() {
list(System.out, 0);
@@ -8351,14 +8351,14 @@
* <li>this Component's preferred size ("preferredSize")</li>
* <li>this Component's minimum size ("minimumSize")</li>
* <li>this Component's maximum size ("maximumSize")</li>
* <li>this Component's name ("name")</li>
* </ul>
- * Note that if this <code>Component</code> is inheriting a bound property, then no
+ * Note that if this {@code Component} is inheriting a bound property, then no
* event will be fired in response to a change in the inherited property.
* <p>
- * If <code>listener</code> is <code>null</code>,
+ * If {@code listener} is {@code null},
* no exception is thrown and no action is performed.
*
* @param listener the property change listener to be added
*
* @see #removePropertyChangeListener
@@ -8403,11 +8403,11 @@
/**
* Returns an array of all the property change listeners
* registered on this component.
*
- * @return all of this component's <code>PropertyChangeListener</code>s
+ * @return all of this component's {@code PropertyChangeListener}s
* or an empty array if no property change
* listeners are currently registered
*
* @see #addPropertyChangeListener
* @see #removePropertyChangeListener
@@ -8440,14 +8440,14 @@
* <li>this Component's Set of BACKWARD_TRAVERSAL_KEYS
* ("backwardFocusTraversalKeys")</li>
* <li>this Component's Set of UP_CYCLE_TRAVERSAL_KEYS
* ("upCycleFocusTraversalKeys")</li>
* </ul>
- * Note that if this <code>Component</code> is inheriting a bound property, then no
+ * Note that if this {@code Component} is inheriting a bound property, then no
* event will be fired in response to a change in the inherited property.
* <p>
- * If <code>propertyName</code> or <code>listener</code> is <code>null</code>,
+ * If {@code propertyName} or {@code listener} is {@code null},
* no exception is thrown and no action is taken.
*
* @param propertyName one of the property names listed above
* @param listener the property change listener to be added
*
@@ -8468,16 +8468,16 @@
changeSupport.addPropertyChangeListener(propertyName, listener);
}
}
/**
- * Removes a <code>PropertyChangeListener</code> from the listener
+ * Removes a {@code PropertyChangeListener} from the listener
* list for a specific property. This method should be used to remove
- * <code>PropertyChangeListener</code>s
+ * {@code PropertyChangeListener}s
* that were registered for a specific bound property.
* <p>
- * If <code>propertyName</code> or <code>listener</code> is <code>null</code>,
+ * If {@code propertyName} or {@code listener} is {@code null},
* no exception is thrown and no action is taken.
*
* @param propertyName a valid property name
* @param listener the PropertyChangeListener to be removed
*
@@ -8499,13 +8499,13 @@
/**
* Returns an array of all the listeners which have been associated
* with the named property.
*
* @param propertyName the property name
- * @return all of the <code>PropertyChangeListener</code>s associated with
+ * @return all of the {@code PropertyChangeListener}s associated with
* the named property; if no such listeners have been added or
- * if <code>propertyName</code> is <code>null</code>, an empty
+ * if {@code propertyName} is {@code null}, an empty
* array is returned
*
* @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
* @see #removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
* @see #getPropertyChangeListeners
@@ -8702,11 +8702,11 @@
*/
private int componentSerializedDataVersion = 4;
/**
* This hack is for Swing serialization. It will invoke
- * the Swing package private method <code>compWriteObjectNotify</code>.
+ * the Swing package private method {@code compWriteObjectNotify}.
*/
private void doSwingSerialization() {
Package swingPackage = Package.getPackage("javax.swing");
// For Swing serialization to correctly work Swing needs to
// be notified before Component does it's serialization. This
@@ -8756,35 +8756,35 @@
* Writes default serializable fields to stream. Writes
* a variety of serializable listeners as optional data.
* The non-serializable listeners are detected and
* no attempt is made to serialize them.
*
- * @param s the <code>ObjectOutputStream</code> to write
- * @serialData <code>null</code> terminated sequence of
- * 0 or more pairs; the pair consists of a <code>String</code>
- * and an <code>Object</code>; the <code>String</code> indicates
+ * @param s the {@code ObjectOutputStream} to write
+ * @serialData {@code null} terminated sequence of
+ * 0 or more pairs; the pair consists of a {@code String}
+ * and an {@code Object}; the {@code String} indicates
* the type of object and is one of the following (as of 1.4):
- * <code>componentListenerK</code> indicating an
- * <code>ComponentListener</code> object;
- * <code>focusListenerK</code> indicating an
- * <code>FocusListener</code> object;
- * <code>keyListenerK</code> indicating an
- * <code>KeyListener</code> object;
- * <code>mouseListenerK</code> indicating an
- * <code>MouseListener</code> object;
- * <code>mouseMotionListenerK</code> indicating an
- * <code>MouseMotionListener</code> object;
- * <code>inputMethodListenerK</code> indicating an
- * <code>InputMethodListener</code> object;
- * <code>hierarchyListenerK</code> indicating an
- * <code>HierarchyListener</code> object;
- * <code>hierarchyBoundsListenerK</code> indicating an
- * <code>HierarchyBoundsListener</code> object;
- * <code>mouseWheelListenerK</code> indicating an
- * <code>MouseWheelListener</code> object
- * @serialData an optional <code>ComponentOrientation</code>
- * (after <code>inputMethodListener</code>, as of 1.2)
+ * {@code componentListenerK} indicating an
+ * {@code ComponentListener} object;
+ * {@code focusListenerK} indicating an
+ * {@code FocusListener} object;
+ * {@code keyListenerK} indicating an
+ * {@code KeyListener} object;
+ * {@code mouseListenerK} indicating an
+ * {@code MouseListener} object;
+ * {@code mouseMotionListenerK} indicating an
+ * {@code MouseMotionListener} object;
+ * {@code inputMethodListenerK} indicating an
+ * {@code InputMethodListener} object;
+ * {@code hierarchyListenerK} indicating an
+ * {@code HierarchyListener} object;
+ * {@code hierarchyBoundsListenerK} indicating an
+ * {@code HierarchyBoundsListener} object;
+ * {@code mouseWheelListenerK} indicating an
+ * {@code MouseWheelListener} object
+ * @serialData an optional {@code ComponentOrientation}
+ * (after {@code inputMethodListener}, as of 1.2)
*
* @see AWTEventMulticaster#save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener)
* @see #componentListenerK
* @see #focusListenerK
* @see #keyListenerK
@@ -8822,16 +8822,16 @@
s.writeObject(null);
}
/**
- * Reads the <code>ObjectInputStream</code> and if it isn't
- * <code>null</code> adds a listener to receive a variety
+ * Reads the {@code ObjectInputStream} and if it isn't
+ * {@code null} adds a listener to receive a variety
* of events fired by the component.
* Unrecognized keys or values will be ignored.
*
- * @param s the <code>ObjectInputStream</code> to read
+ * @param s the {@code ObjectInputStream} to read
* @see #writeObject(ObjectOutputStream)
*/
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException
{
@@ -8969,19 +8969,19 @@
}
/**
* Sets the language-sensitive orientation that is to be used to order
* the elements or text within this component. Language-sensitive
- * <code>LayoutManager</code> and <code>Component</code>
+ * {@code LayoutManager} and {@code Component}
* subclasses will use this property to
* determine how to lay out and draw components.
* <p>
* At construction time, a component's orientation is set to
- * <code>ComponentOrientation.UNKNOWN</code>,
+ * {@code ComponentOrientation.UNKNOWN},
* indicating that it has not been specified
* explicitly. The UNKNOWN orientation behaves the same as
- * <code>ComponentOrientation.LEFT_TO_RIGHT</code>.
+ * {@code ComponentOrientation.LEFT_TO_RIGHT}.
* <p>
* To set the orientation of a single component, use this method.
* To set the orientation of an entire component
* hierarchy, use
* {@link #applyComponentOrientation applyComponentOrientation}.
@@ -9010,12 +9010,12 @@
invalidateIfValid();
}
/**
* Retrieves the language-sensitive orientation that is to be used to order
- * the elements or text within this component. <code>LayoutManager</code>
- * and <code>Component</code>
+ * the elements or text within this component. {@code LayoutManager}
+ * and {@code Component}
* subclasses that wish to respect orientation should call this method to
* get the component's orientation before performing layout or drawing.
*
* @return the orientation to order the elements or text
* @see ComponentOrientation
@@ -9025,20 +9025,20 @@
public ComponentOrientation getComponentOrientation() {
return componentOrientation;
}
/**
- * Sets the <code>ComponentOrientation</code> property of this component
+ * Sets the {@code ComponentOrientation} property of this component
* and all components contained within it.
* <p>
* This method changes layout-related information, and therefore,
* invalidates the component hierarchy.
*
*
* @param orientation the new component orientation of this component and
* the components contained within it.
- * @exception NullPointerException if <code>orientation</code> is null.
+ * @exception NullPointerException if {@code orientation} is null.
* @see #setComponentOrientation
* @see #getComponentOrientation
* @see #invalidate
* @since 1.4
*/
@@ -9102,11 +9102,11 @@
ComponentPeer.SET_LOCATION);
}
}
/**
- * Returns the <code>Window</code> ancestor of the component.
+ * Returns the {@code Window} ancestor of the component.
* @return Window ancestor of the component or component by itself if it is Window;
* null, if component is not a part of window hierarchy
*/
Window getContainingWindow() {
return SunToolkit.getContainingWindow(this);
@@ -9129,20 +9129,20 @@
* The {@code AccessibleContext} associated with this {@code Component}.
*/
protected AccessibleContext accessibleContext = null;
/**
- * Gets the <code>AccessibleContext</code> associated
- * with this <code>Component</code>.
+ * Gets the {@code AccessibleContext} associated
+ * with this {@code Component}.
* The method implemented by this base
- * class returns null. Classes that extend <code>Component</code>
+ * class returns null. Classes that extend {@code Component}
* should implement this method to return the
- * <code>AccessibleContext</code> associated with the subclass.
+ * {@code AccessibleContext} associated with the subclass.
*
*
- * @return the <code>AccessibleContext</code> of this
- * <code>Component</code>
+ * @return the {@code AccessibleContext} of this
+ * {@code Component}
* @since 1.3
*/
public AccessibleContext getAccessibleContext() {
return accessibleContext;
}
@@ -9239,11 +9239,11 @@
}
} // inner class AccessibleAWTFocusHandler
/**
- * Adds a <code>PropertyChangeListener</code> to the listener list.
+ * Adds a {@code PropertyChangeListener} to the listener list.
*
* @param listener the property change listener to be added
*/
public void addPropertyChangeListener(PropertyChangeListener listener) {
if (accessibleAWTComponentHandler == null) {
@@ -9276,20 +9276,20 @@
// AccessibleContext methods
//
/**
* Gets the accessible name of this object. This should almost never
- * return <code>java.awt.Component.getName()</code>,
+ * return {@code java.awt.Component.getName()},
* as that generally isn't a localized name,
* and doesn't have meaning for the user. If the
* object is fundamentally a text object (e.g. a menu item), the
* accessible name should be the text of the object (e.g. "save").
* If the object has a tooltip, the tooltip text may also be an
* appropriate String to return.
*
* @return the localized name of the object -- can be
- * <code>null</code> if this
+ * {@code null} if this
* object does not have a name
* @see javax.accessibility.AccessibleContext#setAccessibleName
*/
public String getAccessibleName() {
return accessibleName;
@@ -9305,47 +9305,47 @@
* had "save" as the tooltip text shouldn't return the tooltip
* text as the description, but something like "Saves the current
* text document" instead).
*
* @return the localized description of the object -- can be
- * <code>null</code> if this object does not have a description
+ * {@code null} if this object does not have a description
* @see javax.accessibility.AccessibleContext#setAccessibleDescription
*/
public String getAccessibleDescription() {
return accessibleDescription;
}
/**
* Gets the role of this object.
*
- * @return an instance of <code>AccessibleRole</code>
+ * @return an instance of {@code AccessibleRole}
* describing the role of the object
* @see javax.accessibility.AccessibleRole
*/
public AccessibleRole getAccessibleRole() {
return AccessibleRole.AWT_COMPONENT;
}
/**
* Gets the state of this object.
*
- * @return an instance of <code>AccessibleStateSet</code>
+ * @return an instance of {@code AccessibleStateSet}
* containing the current state set of the object
* @see javax.accessibility.AccessibleState
*/
public AccessibleStateSet getAccessibleStateSet() {
return Component.this.getAccessibleStateSet();
}
/**
- * Gets the <code>Accessible</code> parent of this object.
- * If the parent of this object implements <code>Accessible</code>,
- * this method should simply return <code>getParent</code>.
- *
- * @return the <code>Accessible</code> parent of this
- * object -- can be <code>null</code> if this
- * object does not have an <code>Accessible</code> parent
+ * Gets the {@code Accessible} parent of this object.
+ * If the parent of this object implements {@code Accessible},
+ * this method should simply return {@code getParent}.
+ *
+ * @return the {@code Accessible} parent of this
+ * object -- can be {@code null} if this
+ * object does not have an {@code Accessible} parent
*/
public Accessible getAccessibleParent() {
if (accessibleParent != null) {
return accessibleParent;
} else {
@@ -9368,24 +9368,24 @@
return Component.this.getAccessibleIndexInParent();
}
/**
* Returns the number of accessible children in the object. If all
- * of the children of this object implement <code>Accessible</code>,
+ * of the children of this object implement {@code Accessible},
* then this method should return the number of children of this object.
*
* @return the number of accessible children in the object
*/
public int getAccessibleChildrenCount() {
return 0; // Components don't have children
}
/**
- * Returns the nth <code>Accessible</code> child of the object.
+ * Returns the nth {@code Accessible} child of the object.
*
* @param i zero-based index of child
- * @return the nth <code>Accessible</code> child of the object
+ * @return the nth {@code Accessible} child of the object
*/
public Accessible getAccessibleChild(int i) {
return null; // Components don't have children
}
@@ -9397,13 +9397,13 @@
public Locale getLocale() {
return Component.this.getLocale();
}
/**
- * Gets the <code>AccessibleComponent</code> associated
+ * Gets the {@code AccessibleComponent} associated
* with this object if one exists.
- * Otherwise return <code>null</code>.
+ * Otherwise return {@code null}.
*
* @return the component
*/
public AccessibleComponent getAccessibleComponent() {
return this;
@@ -9414,93 +9414,93 @@
//
/**
* Gets the background color of this object.
*
* @return the background color, if supported, of the object;
- * otherwise, <code>null</code>
+ * otherwise, {@code null}
*/
public Color getBackground() {
return Component.this.getBackground();
}
/**
* Sets the background color of this object.
- * (For transparency, see <code>isOpaque</code>.)
+ * (For transparency, see {@code isOpaque}.)
*
- * @param c the new <code>Color</code> for the background
+ * @param c the new {@code Color} for the background
* @see Component#isOpaque
*/
public void setBackground(Color c) {
Component.this.setBackground(c);
}
/**
* Gets the foreground color of this object.
*
* @return the foreground color, if supported, of the object;
- * otherwise, <code>null</code>
+ * otherwise, {@code null}
*/
public Color getForeground() {
return Component.this.getForeground();
}
/**
* Sets the foreground color of this object.
*
- * @param c the new <code>Color</code> for the foreground
+ * @param c the new {@code Color} for the foreground
*/
public void setForeground(Color c) {
Component.this.setForeground(c);
}
/**
- * Gets the <code>Cursor</code> of this object.
+ * Gets the {@code Cursor} of this object.
*
- * @return the <code>Cursor</code>, if supported,
- * of the object; otherwise, <code>null</code>
+ * @return the {@code Cursor}, if supported,
+ * of the object; otherwise, {@code null}
*/
public Cursor getCursor() {
return Component.this.getCursor();
}
/**
- * Sets the <code>Cursor</code> of this object.
+ * Sets the {@code Cursor} of this object.
* <p>
* The method may have no visual effect if the Java platform
* implementation and/or the native system do not support
* changing the mouse cursor shape.
- * @param cursor the new <code>Cursor</code> for the object
+ * @param cursor the new {@code Cursor} for the object
*/
public void setCursor(Cursor cursor) {
Component.this.setCursor(cursor);
}
/**
- * Gets the <code>Font</code> of this object.
+ * Gets the {@code Font} of this object.
*
- * @return the <code>Font</code>, if supported,
- * for the object; otherwise, <code>null</code>
+ * @return the {@code Font}, if supported,
+ * for the object; otherwise, {@code null}
*/
public Font getFont() {
return Component.this.getFont();
}
/**
- * Sets the <code>Font</code> of this object.
+ * Sets the {@code Font} of this object.
*
- * @param f the new <code>Font</code> for the object
+ * @param f the new {@code Font} for the object
*/
public void setFont(Font f) {
Component.this.setFont(f);
}
/**
- * Gets the <code>FontMetrics</code> of this object.
+ * Gets the {@code FontMetrics} of this object.
*
- * @param f the <code>Font</code>
- * @return the <code>FontMetrics</code>, if supported,
- * the object; otherwise, <code>null</code>
+ * @param f the {@code Font}
+ * @return the {@code FontMetrics}, if supported,
+ * the object; otherwise, {@code null}
* @see #getFont
*/
public FontMetrics getFontMetrics(Font f) {
if (f == null) {
return null;
@@ -9544,11 +9544,11 @@
/**
* Determines if the object is visible. Note: this means that the
* object intends to be visible; however, it may not in fact be
* showing on the screen because one of the objects that this object
* is contained by is not visible. To determine if an object is
- * showing on the screen, use <code>isShowing</code>.
+ * showing on the screen, use {@code isShowing}.
*
* @return true if object is visible; otherwise, false
*/
public boolean isVisible() {
return Component.this.isVisible();
@@ -9593,23 +9593,23 @@
/**
* Checks whether the specified point is within this object's bounds,
* where the point's x and y coordinates are defined to be relative to
* the coordinate system of the object.
*
- * @param p the <code>Point</code> relative to the
+ * @param p the {@code Point} relative to the
* coordinate system of the object
- * @return true if object contains <code>Point</code>; otherwise false
+ * @return true if object contains {@code Point}; otherwise false
*/
public boolean contains(Point p) {
return Component.this.contains(p);
}
/**
* Returns the location of the object on the screen.
*
* @return location of object on screen -- can be
- * <code>null</code> if this object is not on the screen
+ * {@code null} if this object is not on the screen
*/
public Point getLocationOnScreen() {
synchronized (Component.this.getTreeLock()) {
if (Component.this.isShowing()) {
return Component.this.getLocationOnScreen();
@@ -9624,11 +9624,11 @@
* of a point specifying the object's top-left corner in the screen's
* coordinate space.
*
* @return an instance of Point representing the top-left corner of
* the object's bounds in the coordinate space of the screen;
- * <code>null</code> if this object or its parent are not on the screen
+ * {@code null} if this object or its parent are not on the screen
*/
public Point getLocation() {
return Component.this.getLocation();
}
@@ -9644,19 +9644,19 @@
* Gets the bounds of this object in the form of a Rectangle object.
* The bounds specify this object's width, height, and location
* relative to its parent.
*
* @return a rectangle indicating this component's bounds;
- * <code>null</code> if this object is not on the screen
+ * {@code null} if this object is not on the screen
*/
public Rectangle getBounds() {
return Component.this.getBounds();
}
/**
* Sets the bounds of this object in the form of a
- * <code>Rectangle</code> object.
+ * {@code Rectangle} object.
* The bounds specify this object's width, height, and location
* relative to its parent.
*
* @param r a rectangle indicating this component's bounds
*/
@@ -9664,17 +9664,17 @@
Component.this.setBounds(r);
}
/**
* Returns the size of this object in the form of a
- * <code>Dimension</code> object. The height field of the
- * <code>Dimension</code> object contains this object's
- * height, and the width field of the <code>Dimension</code>
+ * {@code Dimension} object. The height field of the
+ * {@code Dimension} object contains this object's
+ * height, and the width field of the {@code Dimension}
* object contains this object's width.
*
- * @return a <code>Dimension</code> object that indicates
- * the size of this component; <code>null</code> if
+ * @return a {@code Dimension} object that indicates
+ * the size of this component; {@code null} if
* this object is not on the screen
*/
public Dimension getSize() {
return Component.this.getSize();
}
@@ -9687,20 +9687,20 @@
public void setSize(Dimension d) {
Component.this.setSize(d);
}
/**
- * Returns the <code>Accessible</code> child,
+ * Returns the {@code Accessible} child,
* if one exists, contained at the local
- * coordinate <code>Point</code>. Otherwise returns
- * <code>null</code>.
+ * coordinate {@code Point}. Otherwise returns
+ * {@code null}.
*
* @param p the point defining the top-left corner of
- * the <code>Accessible</code>, given in the
+ * the {@code Accessible}, given in the
* coordinate space of the object's parent
- * @return the <code>Accessible</code>, if it exists,
- * at the specified location; else <code>null</code>
+ * @return the {@code Accessible}, if it exists,
+ * at the specified location; else {@code null}
*/
public Accessible getAccessibleAt(Point p) {
return null; // Components don't have children
}
@@ -9770,11 +9770,11 @@
}
/**
* Gets the current state set of this object.
*
- * @return an instance of <code>AccessibleStateSet</code>
+ * @return an instance of {@code AccessibleStateSet}
* containing the current state set of the object
* @see AccessibleState
*/
AccessibleStateSet getAccessibleStateSet() {
synchronized (getTreeLock()) {
< prev index next >