< prev index next >
src/java.desktop/share/classes/javax/swing/SwingUtilities.java
Print this page
@@ -69,12 +69,12 @@
*/
private static boolean checkedSuppressDropSupport;
/**
- * Returns true if <code>setTransferHandler</code> should change the
- * <code>DropTarget</code>.
+ * Returns true if {@code setTransferHandler} should change the
+ * {@code DropTarget}.
*/
private static boolean getSuppressDropTarget() {
if (!checkedSuppressDropSupport) {
suppressDropSupport = Boolean.valueOf(
AccessController.doPrivileged(
@@ -128,18 +128,18 @@
return b;
}
/**
- * Returns the first <code>Window </code> ancestor of <code>c</code>, or
- * {@code null} if <code>c</code> is not contained inside a <code>Window</code>.
+ * Returns the first {@code Window} ancestor of {@code c}, or
+ * {@code null} if {@code c} is not contained inside a {@code Window}.
*
- * @param c <code>Component</code> to get <code>Window</code> ancestor
+ * @param c {@code Component} to get {@code Window} ancestor
* of.
- * @return the first <code>Window </code> ancestor of <code>c</code>, or
- * {@code null} if <code>c</code> is not contained inside a
- * <code>Window</code>.
+ * @return the first {@code Window} ancestor of {@code c}, or
+ * {@code null} if {@code c} is not contained inside a
+ * {@code Window}.
* @since 1.3
*/
public static Window getWindowAncestor(Component c) {
for(Container p = c.getParent(); p != null; p = p.getParent()) {
if (p instanceof Window) {
@@ -148,11 +148,11 @@
}
return null;
}
/**
- * Converts the location <code>x</code> <code>y</code> to the
+ * Converts the location {@code x y} to the
* parents coordinate system, returning the location.
*/
static Point convertScreenLocationToParent(Container parent,int x, int y) {
for (Container p = parent; p != null; p = p.getParent()) {
if (p instanceof Window) {
@@ -164,17 +164,17 @@
}
throw new Error("convertScreenLocationToParent: no window ancestor");
}
/**
- * Convert a <code>aPoint</code> in <code>source</code> coordinate system to
- * <code>destination</code> coordinate system.
- * If <code>source</code> is {@code null}, <code>aPoint</code> is assumed to be in <code>destination</code>'s
+ * Convert a {@code aPoint} in {@code source} coordinate system to
+ * {@code destination} coordinate system.
+ * If {@code source} is {@code null}, {@code aPoint} is assumed to be in {@code destination}'s
* root component coordinate system.
- * If <code>destination</code> is {@code null}, <code>aPoint</code> will be converted to <code>source</code>'s
+ * If {@code destination} is {@code null}, {@code aPoint} will be converted to {@code source}'s
* root component coordinate system.
- * If both <code>source</code> and <code>destination</code> are {@code null}, return <code>aPoint</code>
+ * If both {@code source} and {@code destination} are {@code null}, return {@code aPoint}
* without any conversion.
*
* @param source the source component
* @param aPoint the point
* @param destination the destination component
@@ -201,17 +201,17 @@
convertPointFromScreen(p,destination);
return p;
}
/**
- * Convert the point <code>(x,y)</code> in <code>source</code> coordinate system to
- * <code>destination</code> coordinate system.
- * If <code>source</code> is {@code null}, <code>(x,y)</code> is assumed to be in <code>destination</code>'s
+ * Convert the point {@code (x,y)} in {@code source} coordinate system to
+ * {@code destination} coordinate system.
+ * If {@code source} is {@code null}, {@code (x,y)} is assumed to be in {@code destination}'s
* root component coordinate system.
- * If <code>destination</code> is {@code null}, <code>(x,y)</code> will be converted to <code>source</code>'s
+ * If {@code destination} is {@code null}, {@code (x,y)} will be converted to {@code source}'s
* root component coordinate system.
- * If both <code>source</code> and <code>destination</code> are {@code null}, return <code>(x,y)</code>
+ * If both {@code source} and {@code destination} are {@code null}, return {@code (x,y)}
* without any conversion.
*
* @param source the source component
* @param x the x-coordinate of the point
* @param y the y-coordinate of the point
@@ -223,17 +223,17 @@
Point point = new Point(x,y);
return convertPoint(source,point,destination);
}
/**
- * Convert the rectangle <code>aRectangle</code> in <code>source</code> coordinate system to
- * <code>destination</code> coordinate system.
- * If <code>source</code> is {@code null}, <code>aRectangle</code> is assumed to be in <code>destination</code>'s
+ * Convert the rectangle {@code aRectangle} in {@code source} coordinate system to
+ * {@code destination} coordinate system.
+ * If {@code source} is {@code null}, {@code aRectangle} is assumed to be in {@code destination}'s
* root component coordinate system.
- * If <code>destination</code> is {@code null}, <code>aRectangle</code> will be converted to <code>source</code>'s
+ * If {@code destination} is {@code null}, {@code aRectangle} will be converted to {@code source}'s
* root component coordinate system.
- * If both <code>source</code> and <code>destination</code> are {@code null}, return <code>aRectangle</code>
+ * If both {@code source} and {@code destination} are {@code null}, return {@code aRectangle}
* without any conversion.
*
* @param source the source component
* @param aRectangle a rectangle
* @param destination the destination component
@@ -245,13 +245,13 @@
point = convertPoint(source,point,destination);
return new Rectangle(point.x,point.y,aRectangle.width,aRectangle.height);
}
/**
- * Convenience method for searching above <code>comp</code> in the
- * component hierarchy and returns the first object of class <code>c</code> it
- * finds. Can return {@code null}, if a class <code>c</code> cannot be found.
+ * Convenience method for searching above {@code comp} in the
+ * component hierarchy and returns the first object of class {@code c} it
+ * finds. Can return {@code null}, if a class {@code c} cannot be found.
*
* @param c the class of a component
* @param comp the component
*
* @return the ancestor of the {@code comp},
@@ -267,13 +267,13 @@
parent = parent.getParent();
return parent;
}
/**
- * Convenience method for searching above <code>comp</code> in the
- * component hierarchy and returns the first object of <code>name</code> it
- * finds. Can return {@code null}, if <code>name</code> cannot be found.
+ * Convenience method for searching above {@code comp} in the
+ * component hierarchy and returns the first object of {@code name} it
+ * finds. Can return {@code null}, if {@code name} cannot be found.
*
* @param name the name of a component
* @param comp the component
*
* @return the ancestor of the {@code comp},
@@ -288,16 +288,16 @@
parent = parent.getParent();
return parent;
}
/**
- * Returns the deepest visible descendent Component of <code>parent</code>
- * that contains the location <code>x</code>, <code>y</code>.
- * If <code>parent</code> does not contain the specified location,
- * then <code>null</code> is returned. If <code>parent</code> is not a
- * container, or none of <code>parent</code>'s visible descendents
- * contain the specified location, <code>parent</code> is returned.
+ * Returns the deepest visible descendent Component of {@code parent}
+ * that contains the location {@code x}, {@code y}.
+ * If {@code parent} does not contain the specified location,
+ * then {@code null} is returned. If {@code parent} is not a
+ * container, or none of {@code parent}'s visible descendents
+ * contain the specified location, {@code parent} is returned.
*
* @param parent the root component to begin the search
* @param x the x target location
* @param y the y target location
*
@@ -326,19 +326,19 @@
return parent;
}
/**
- * Returns a MouseEvent similar to <code>sourceEvent</code> except that its x
- * and y members have been converted to <code>destination</code>'s coordinate
- * system. If <code>source</code> is {@code null}, <code>sourceEvent</code> x and y members
- * are assumed to be into <code>destination</code>'s root component coordinate system.
- * If <code>destination</code> is <code>null</code>, the
- * returned MouseEvent will be in <code>source</code>'s coordinate system.
- * <code>sourceEvent</code> will not be changed. A new event is returned.
- * the <code>source</code> field of the returned event will be set
- * to <code>destination</code> if destination is non-{@code null}
+ * Returns a MouseEvent similar to {@code sourceEvent} except that its x
+ * and y members have been converted to {@code destination}'s coordinate
+ * system. If {@code source} is {@code null}, {@code sourceEvent} x and y members
+ * are assumed to be into {@code destination}'s root component coordinate system.
+ * If {@code destination} is {@code null}, the
+ * returned MouseEvent will be in {@code source}'s coordinate system.
+ * {@code sourceEvent} will not be changed. A new event is returned.
+ * the {@code source} field of the returned event will be set
+ * to {@code destination} if destination is non-{@code null}
* use the translateMouseEvent() method to translate a mouse event from
* one component to another without changing the source.
*
* @param source the source component
* @param sourceEvent the source mouse event
@@ -486,21 +486,21 @@
c = c.getParent();
} while(c != null);
}
/**
- * Returns the first <code>Window </code> ancestor of <code>c</code>, or
- * {@code null} if <code>c</code> is not contained inside a <code>Window</code>.
+ * Returns the first {@code Window} ancestor of {@code c}, or
+ * {@code null} if {@code c} is not contained inside a {@code Window}.
* <p>
* Note: This method provides the same functionality as
- * <code>getWindowAncestor</code>.
+ * {@code getWindowAncestor}.
*
- * @param c <code>Component</code> to get <code>Window</code> ancestor
+ * @param c {@code Component} to get {@code Window} ancestor
* of.
- * @return the first <code>Window </code> ancestor of <code>c</code>, or
- * {@code null} if <code>c</code> is not contained inside a
- * <code>Window</code>.
+ * @return the first {@code Window} ancestor of {@code c}, or
+ * {@code null} if {@code c} is not contained inside a
+ * {@code Window}.
*/
public static Window windowForComponent(Component c) {
return getWindowAncestor(c);
}
@@ -532,11 +532,11 @@
* @param y the Y coordinate of the first rectangle's top-left point
* @param width the width of the first rectangle
* @param height the height of the first rectangle
* @param dest the second rectangle
*
- * @return <code>dest</code>, modified to specify the intersection
+ * @return {@code dest}, modified to specify the intersection
*/
public static Rectangle computeIntersection(int x,int y,int width,int height,Rectangle dest) {
int x1 = (x > dest.x) ? x : dest.x;
int x2 = ((x+width) < (dest.x + dest.width)) ? (x+width) : (dest.x + dest.width);
int y1 = (y > dest.y) ? y : dest.y;
@@ -563,11 +563,11 @@
* @param y the y-coordinate of the first rectangle
* @param width the width of the first rectangle
* @param height the height of the first rectangle
* @param dest the coordinates of the second rectangle; the union
* of the two rectangles is returned in this rectangle
- * @return the <code>dest</code> <code>Rectangle</code>
+ * @return the {@code dest Rectangle}
*/
public static Rectangle computeUnion(int x,int y,int width,int height,Rectangle dest) {
int x1 = (x < dest.x) ? x : dest.x;
int x2 = ((x+width) > (dest.x + dest.width)) ? (x+width) : (dest.x + dest.width);
int y1 = (y < dest.y) ? y : dest.y;
@@ -580,11 +580,11 @@
return dest;
}
/**
* Convenience returning an array of rect representing the regions within
- * <code>rectA</code> that do not overlap with <code>rectB</code>. If the
+ * {@code rectA} that do not overlap with {@code rectB}. If the
* two Rects do not overlap, returns an empty array
*
* @param rectA the first rectangle
* @param rectB the second rectangle
*
@@ -1213,46 +1213,46 @@
return text;
}
/**
- * Paints a component to the specified <code>Graphics</code>.
+ * Paints a component to the specified {@code Graphics}.
* This method is primarily useful to render
- * <code>Component</code>s that don't exist as part of the visible
+ * {@code Component}s that don't exist as part of the visible
* containment hierarchy, but are used for rendering. For
* example, if you are doing your own rendering and want to render
* some text (or even HTML), you could make use of
- * <code>JLabel</code>'s text rendering support and have it paint
+ * {@code JLabel}'s text rendering support and have it paint
* directly by way of this method, without adding the label to the
* visible containment hierarchy.
* <p>
- * This method makes use of <code>CellRendererPane</code> to handle
+ * This method makes use of {@code CellRendererPane} to handle
* the actual painting, and is only recommended if you use one
* component for rendering. If you make use of multiple components
- * to handle the rendering, as <code>JTable</code> does, use
- * <code>CellRendererPane</code> directly. Otherwise, as described
- * below, you could end up with a <code>CellRendererPane</code>
- * per <code>Component</code>.
+ * to handle the rendering, as {@code JTable} does, use
+ * {@code CellRendererPane} directly. Otherwise, as described
+ * below, you could end up with a {@code CellRendererPane}
+ * per {@code Component}.
* <p>
- * If <code>c</code>'s parent is not a <code>CellRendererPane</code>,
- * a new <code>CellRendererPane</code> is created, <code>c</code> is
- * added to it, and the <code>CellRendererPane</code> is added to
- * <code>p</code>. If <code>c</code>'s parent is a
- * <code>CellRendererPane</code> and the <code>CellRendererPane</code>s
- * parent is not <code>p</code>, it is added to <code>p</code>.
+ * If {@code c}'s parent is not a {@code CellRendererPane},
+ * a new {@code CellRendererPane} is created, {@code c} is
+ * added to it, and the {@code CellRendererPane} is added to
+ * {@code p}. If {@code c}'s parent is a
+ * {@code CellRendererPane} and the {@code CellRendererPane}s
+ * parent is not {@code p}, it is added to {@code p}.
* <p>
- * The component should either descend from <code>JComponent</code>
+ * The component should either descend from {@code JComponent}
* or be another kind of lightweight component.
* A lightweight component is one whose "lightweight" property
- * (returned by the <code>Component</code>
- * <code>isLightweight</code> method)
+ * (returned by the {@code Component}
+ * {@code isLightweight} method)
* is true. If the Component is not lightweight, bad things map happen:
* crashes, exceptions, painting problems...
*
- * @param g the <code>Graphics</code> object to draw on
- * @param c the <code>Component</code> to draw
- * @param p the intermediate <code>Container</code>
+ * @param g the {@code Graphics} object to draw on
+ * @param c the {@code Component} to draw
+ * @param p the intermediate {@code Container}
* @param x an int specifying the left side of the area draw in, in pixels,
* measured from the left edge of the graphics context
* @param y an int specifying the top of the area to draw in, in pixels
* measured down from the top edge of the graphics context
* @param w an int specifying the width of the area draw in, in pixels
@@ -1264,31 +1264,31 @@
public static void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) {
getCellRendererPane(c, p).paintComponent(g, c, p, x, y, w, h,false);
}
/**
- * Paints a component to the specified <code>Graphics</code>. This
+ * Paints a component to the specified {@code Graphics}. This
* is a cover method for
* {@link #paintComponent(Graphics,Component,Container,int,int,int,int)}.
* Refer to it for more information.
*
- * @param g the <code>Graphics</code> object to draw on
- * @param c the <code>Component</code> to draw
- * @param p the intermediate <code>Container</code>
- * @param r the <code>Rectangle</code> to draw in
+ * @param g the {@code Graphics} object to draw on
+ * @param c the {@code Component} to draw
+ * @param p the intermediate {@code Container}
+ * @param r the {@code Rectangle} to draw in
*
* @see #paintComponent(Graphics,Component,Container,int,int,int,int)
* @see CellRendererPane
*/
public static void paintComponent(Graphics g, Component c, Container p, Rectangle r) {
paintComponent(g, c, p, r.x, r.y, r.width, r.height);
}
/*
- * Ensures that cell renderer <code>c</code> has a
- * <code>ComponentShell</code> parent and that
+ * Ensures that cell renderer {@code c} has a
+ * {@code ComponentShell} parent and that
* the shell's parent is p.
*/
private static CellRendererPane getCellRendererPane(Component c, Container p) {
Container shell = c.getParent();
if (shell instanceof CellRendererPane) {
@@ -1303,11 +1303,11 @@
return (CellRendererPane)shell;
}
/**
* A simple minded look and feel change: ask each node in the tree
- * to <code>updateUI()</code> -- that is, to initialize its UI property
+ * to {@code updateUI()} -- that is, to initialize its UI property
* with the current look and feel.
*
* @param c the component
*/
public static void updateComponentTreeUI(Component c) {
@@ -1344,12 +1344,12 @@
/**
* Causes <i>doRun.run()</i> to be executed asynchronously on the
* AWT event dispatching thread. This will happen after all
* pending AWT events have been processed. This method should
* be used when an application thread needs to update the GUI.
- * In the following example the <code>invokeLater</code> call queues
- * the <code>Runnable</code> object <code>doHelloWorld</code>
+ * In the following example the {@code invokeLater} call queues
+ * the {@code Runnable} object {@code doHelloWorld}
* on the event dispatching thread and
* then prints a message.
* <pre>
* Runnable doHelloWorld = new Runnable() {
* public void run() {
@@ -1368,11 +1368,11 @@
* <p>
* Additional documentation and examples for this method can be
* found in
* <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
* <p>
- * As of 1.3 this method is just a cover for <code>java.awt.EventQueue.invokeLater()</code>.
+ * As of 1.3 this method is just a cover for {@code java.awt.EventQueue.invokeLater()}.
* <p>
* Unlike the rest of Swing, this method can be invoked from any thread.
*
* @param doRun the instance of {@code Runnable}
* @see #invokeAndWait
@@ -1381,18 +1381,18 @@
EventQueue.invokeLater(doRun);
}
/**
- * Causes <code>doRun.run()</code> to be executed synchronously on the
+ * Causes {@code doRun.run()} to be executed synchronously on the
* AWT event dispatching thread. This call blocks until
* all pending AWT events have been processed and (then)
- * <code>doRun.run()</code> returns. This method should
+ * {@code doRun.run()} returns. This method should
* be used when an application thread needs to update the GUI.
* It shouldn't be called from the event dispatching thread.
* Here's an example that creates a new application thread
- * that uses <code>invokeAndWait</code> to print a string from the event
+ * that uses {@code invokeAndWait} to print a string from the event
* dispatching thread and then, when that's finished, print
* a string from the application thread.
* <pre>
* final Runnable doHelloWorld = new Runnable() {
* public void run() {
@@ -1411,28 +1411,28 @@
* System.out.println("Finished on " + Thread.currentThread());
* }
* };
* appThread.start();
* </pre>
- * Note that if the <code>Runnable.run</code> method throws an
+ * Note that if the {@code Runnable.run} method throws an
* uncaught exception
* (on the event dispatching thread) it's caught and rethrown, as
- * an <code>InvocationTargetException</code>, on the caller's thread.
+ * an {@code InvocationTargetException}, on the caller's thread.
* <p>
* Additional documentation and examples for this method can be
* found in
* <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
* <p>
* As of 1.3 this method is just a cover for
- * <code>java.awt.EventQueue.invokeAndWait()</code>.
+ * {@code java.awt.EventQueue.invokeAndWait()}.
*
* @param doRun the instance of {@code Runnable}
* @exception InterruptedException if we're interrupted while waiting for
* the event dispatching thread to finish executing
- * <code>doRun.run()</code>
+ * {@code doRun.run()}
* @exception InvocationTargetException if an exception is thrown
- * while running <code>doRun</code>
+ * while running {@code doRun}
*
* @see #invokeLater
*/
public static void invokeAndWait(final Runnable doRun)
throws InterruptedException, InvocationTargetException
@@ -1442,11 +1442,11 @@
/**
* Returns true if the current thread is an AWT event dispatching thread.
* <p>
* As of 1.3 this method is just a cover for
- * <code>java.awt.EventQueue.isDispatchThread()</code>.
+ * {@code java.awt.EventQueue.isDispatchThread()}.
*
* @return true if the current thread is an AWT event dispatching thread
*/
public static boolean isEventDispatchThread()
{
@@ -1473,18 +1473,18 @@
public static int getAccessibleIndexInParent(Component c) {
return c.getAccessibleContext().getAccessibleIndexInParent();
}
/**
- * Returns the <code>Accessible</code> child contained at the
- * local coordinate <code>Point</code>, if one exists.
- * Otherwise returns <code>null</code>.
+ * Returns the {@code Accessible} child contained at the
+ * local coordinate {@code Point}, if one exists.
+ * Otherwise returns {@code null}.
*
* @param c the component
* @param p the local coordinate
- * @return the <code>Accessible</code> at the specified location,
- * if it exists; otherwise <code>null</code>
+ * @return the {@code Accessible} at the specified location,
+ * if it exists; otherwise {@code null}
*/
public static Accessible getAccessibleAt(Component c, Point p) {
if (c instanceof Container) {
return c.getAccessibleContext().getAccessibleComponent().getAccessibleAt(p);
} else if (c instanceof Accessible) {
@@ -1565,22 +1565,22 @@
public static Accessible getAccessibleChild(Component c, int i) {
return c.getAccessibleContext().getAccessibleChild(i);
}
/**
- * Return the child <code>Component</code> of the specified
- * <code>Component</code> that is the focus owner, if any.
+ * Return the child {@code Component} of the specified
+ * {@code Component} that is the focus owner, if any.
*
- * @param c the root of the <code>Component</code> hierarchy to
+ * @param c the root of the {@code Component} hierarchy to
* search for the focus owner
- * @return the focus owner, or <code>null</code> if there is no focus
- * owner, or if the focus owner is not <code>comp</code>, or a
- * descendant of <code>comp</code>
+ * @return the focus owner, or {@code null} if there is no focus
+ * owner, or if the focus owner is not {@code comp}, or a
+ * descendant of {@code comp}
*
* @see java.awt.KeyboardFocusManager#getFocusOwner
* @deprecated As of 1.4, replaced by
- * <code>KeyboardFocusManager.getFocusOwner()</code>.
+ * {@code KeyboardFocusManager.getFocusOwner()}.
*/
@Deprecated
public static Component findFocusOwner(Component c) {
Component focusOwner = KeyboardFocusManager.
getCurrentKeyboardFocusManager().getFocusOwner();
@@ -1646,18 +1646,18 @@
}
return null;
}
/**
- * Process the key bindings for the <code>Component</code> associated with
- * <code>event</code>. This method is only useful if
- * <code>event.getComponent()</code> does not descend from
- * <code>JComponent</code>, or your are not invoking
- * <code>super.processKeyEvent</code> from within your
- * <code>JComponent</code> subclass. <code>JComponent</code>
+ * Process the key bindings for the {@code Component} associated with
+ * {@code event}. This method is only useful if
+ * {@code event.getComponent()} does not descend from
+ * {@code JComponent}, or your are not invoking
+ * {@code super.processKeyEvent} from within your
+ * {@code JComponent} subclass. {@code JComponent}
* automatically processes bindings from within its
- * <code>processKeyEvent</code> method, hence you rarely need
+ * {@code processKeyEvent} method, hence you rarely need
* to directly invoke this method.
*
* @param event KeyEvent used to identify which bindings to process, as
* well as which Component has focus.
* @return true if a binding has found and processed
@@ -1694,30 +1694,30 @@
}
return false;
}
/**
- * Returns true if the <code>e</code> is a valid KeyEvent to use in
+ * Returns true if the {@code e} is a valid KeyEvent to use in
* processing the key bindings associated with JComponents.
*/
static boolean isValidKeyEventForKeyBindings(KeyEvent e) {
return true;
}
/**
- * Invokes <code>actionPerformed</code> on <code>action</code> if
- * <code>action</code> is enabled (and non-{@code null}). The command for the
+ * Invokes {@code actionPerformed} on {@code action} if
+ * {@code action} is enabled (and non-{@code null}). The command for the
* ActionEvent is determined by:
* <ol>
* <li>If the action was registered via
- * <code>registerKeyboardAction</code>, then the command string
+ * {@code registerKeyboardAction}, then the command string
* passed in ({@code null} will be used if {@code null} was passed in).
* <li>Action value with name Action.ACTION_COMMAND_KEY, unless {@code null}.
- * <li>String value of the KeyEvent, unless <code>getKeyChar</code>
+ * <li>String value of the KeyEvent, unless {@code getKeyChar}
* returns KeyEvent.CHAR_UNDEFINED..
* </ol>
- * This will return true if <code>action</code> is non-{@code null} and
+ * This will return true if {@code action} is non-{@code null} and
* actionPerformed is invoked on it.
*
* @param action an action
* @param ks a key stroke
* @param event a key event
@@ -1776,12 +1776,12 @@
return true;
}
/**
- * Convenience method to change the UI InputMap for <code>component</code>
- * to <code>uiInputMap</code>. If <code>uiInputMap</code> is {@code null},
+ * Convenience method to change the UI InputMap for {@code component}
+ * to {@code uiInputMap}. If {@code uiInputMap} is {@code null},
* this removes any previously installed UI InputMap.
*
* @param component a component
* @param type a type
* @param uiInputMap an {@code InputMap}
@@ -1801,12 +1801,12 @@
}
}
/**
- * Convenience method to change the UI ActionMap for <code>component</code>
- * to <code>uiActionMap</code>. If <code>uiActionMap</code> is {@code null},
+ * Convenience method to change the UI ActionMap for {@code component}
+ * to {@code uiActionMap}. If {@code uiActionMap} is {@code null},
* this removes any previously installed UI ActionMap.
*
* @param component a component
* @param uiActionMap an {@code ActionMap}
* @since 1.3
@@ -1826,11 +1826,11 @@
}
/**
* Returns the InputMap provided by the UI for condition
- * <code>condition</code> in component <code>component</code>.
+ * {@code condition} in component {@code component}.
* <p>This will return {@code null} if the UI has not installed an InputMap
* of the specified type.
*
* @param component a component
* @param condition a condition
@@ -1851,11 +1851,11 @@
return null;
}
/**
* Returns the ActionMap provided by the UI
- * in component <code>component</code>.
+ * in component {@code component}.
* <p>This will return {@code null} if the UI has not installed an ActionMap.
*
* @param component a component
* @return the {@code ActionMap} provided by the UI in the component,
* or {@code null} if the UI has not installed an ActionMap.
@@ -2011,22 +2011,22 @@
private SwingUtilities() {
throw new Error("SwingUtilities is just a container for static methods");
}
/**
- * Returns true if the Icon <code>icon</code> is an instance of
- * ImageIcon, and the image it contains is the same as <code>image</code>.
+ * Returns true if the Icon {@code icon} is an instance of
+ * ImageIcon, and the image it contains is the same as {@code image}.
*/
static boolean doesIconReferenceImage(Icon icon, Image image) {
Image iconImage = (icon != null && (icon instanceof ImageIcon)) ?
((ImageIcon)icon).getImage() : null;
return (iconImage == image);
}
/**
- * Returns index of the first occurrence of <code>mnemonic</code>
- * within string <code>text</code>. Matching algorithm is not
+ * Returns index of the first occurrence of {@code mnemonic}
+ * within string {@code text}. Matching algorithm is not
* case-sensitive.
*
* @param text The text to search through, may be {@code null}
* @param mnemonic The mnemonic to find the character for.
* @return index into the string if exists, otherwise -1
@@ -2052,11 +2052,11 @@
}
/**
* Stores the position and size of
* the inner painting area of the specified component
- * in <code>r</code> and returns <code>r</code>.
+ * in {@code r} and returns {@code r}.
* The position and size specify the bounds of the component,
* adjusted so as not to include the border area (the insets).
* This method is useful for classes
* that implement painting code.
*
< prev index next >