< prev index next >
src/java.desktop/share/classes/sun/swing/CachedPainter.java
Print this page
@@ -30,25 +30,25 @@
/**
* A base class used for icons or images that are expensive to paint.
* A subclass will do the following:
* <ol>
- * <li>Invoke <code>paint</code> when you want to paint the image,
- * if you are implementing <code>Icon</code> you'll invoke this from
- * <code>paintIcon</code>.
+ * <li>Invoke {@code paint} when you want to paint the image,
+ * if you are implementing {@code Icon} you'll invoke this from
+ * {@code paintIcon}.
* The args argument is useful when additional state is needed.
- * <li>Override <code>paintToImage</code> to render the image. The code that
+ * <li>Override {@code paintToImage} to render the image. The code that
* lives here is equivalent to what previously would go in
- * <code>paintIcon</code>, for an <code>Icon</code>.
+ * {@code paintIcon}, for an {@code Icon}.
* </ol>
* The two ways to use this class are:
* <ol>
- * <li>Invoke <code>paint</code> to draw the cached reprensentation at
+ * <li>Invoke {@code paint} to draw the cached reprensentation at
* the specified location.
- * <li>Invoke <code>getImage</code> to get the cached reprensentation and
+ * <li>Invoke {@code getImage} to get the cached reprensentation and
* draw the image yourself. This is primarly useful when you are not
- * using <code>VolatileImage</code>.
+ * using {@code VolatileImage}.
* </ol>
*
*
*/
public abstract class CachedPainter {
@@ -67,23 +67,23 @@
return cache;
}
}
/**
- * Creates an instance of <code>CachedPainter</code> that will cache up
- * to <code>cacheCount</code> images of this class.
+ * Creates an instance of {@code CachedPainter} that will cache up
+ * to {@code cacheCount} images of this class.
*
* @param cacheCount Max number of images to cache
*/
public CachedPainter(int cacheCount) {
getCache(getClass()).setMaxCount(cacheCount);
}
/**
- * Renders the cached image to the passed in <code>Graphic</code>.
- * If there is no cached image <code>paintToImage</code> will be invoked.
- * <code>paintImage</code> is invoked to paint the cached image.
+ * Renders the cached image to the passed in {@code Graphic}.
+ * If there is no cached image {@code paintToImage} will be invoked.
+ * {@code paintImage} is invoked to paint the cached image.
*
* @param c Component rendering to, this may be null.
* @param g Graphics to paint to
* @param x X-coordinate to render to
* @param y Y-coordinate to render to
@@ -163,11 +163,11 @@
* @param c Component painting to, may be null.
* @param image Image to paint to
* @param g Graphics to paint to, obtained from the passed in Image.
* @param w Width to paint to
* @param h Height to paint to
- * @param args Arguments supplied to <code>paint</code>
+ * @param args Arguments supplied to {@code paint}
*/
protected abstract void paintToImage(Component c, Image image, Graphics g,
int w, int h, Object[] args);
@@ -179,11 +179,11 @@
* @param x X coordinate to paint to
* @param y Y coordinate to paint to
* @param w Width to paint to
* @param h Height to paint to
* @param image Image to paint
- * @param args Arguments supplied to <code>paint</code>
+ * @param args Arguments supplied to {@code paint}
*/
protected void paintImage(Component c, Graphics g,
int x, int y, int w, int h, Image image,
Object[] args) {
g.drawImage(image, x, y, null);
< prev index next >