< prev index next >

src/java.desktop/share/classes/javax/swing/RepaintManager.java

Print this page

        

@@ -51,15 +51,15 @@
 /**
  * This class manages repaint requests, allowing the number
  * of repaints to be minimized, for example by collapsing multiple
  * requests into a single repaint for members of a component tree.
  * <p>
- * As of 1.6 <code>RepaintManager</code> handles repaint requests
- * for Swing's top level components (<code>JApplet</code>,
- * <code>JWindow</code>, <code>JFrame</code> and <code>JDialog</code>).
- * Any calls to <code>repaint</code> on one of these will call into the
- * appropriate <code>addDirtyRegion</code> method.
+ * As of 1.6 {@code RepaintManager} handles repaint requests
+ * for Swing's top level components ({@code JApplet},
+ * {@code JWindow}, {@code JFrame} and {@code JDialog}).
+ * Any calls to {@code repaint} on one of these will call into the
+ * appropriate {@code addDirtyRegion} method.
  *
  * @author Arnaud Weber
  * @since 1.2
  */
 public class RepaintManager

@@ -137,11 +137,11 @@
     // The maximum number of times Swing will attempt to use the VolatileImage
     // buffer during a paint operation.
     private static final int VOLATILE_LOOP_MAX = 2;
 
     /**
-     * Number of <code>beginPaint</code> that have been invoked.
+     * Number of {@code beginPaint} that have been invoked.
      */
     private int paintDepth = 0;
 
     /**
      * Type of buffer strategy to use.  Will be one of the BUFFER_STRATEGY_

@@ -160,11 +160,11 @@
     // paintImmediately will be invoked on the repaintRoot.  In this
     // way we don't try to show garbage to the screen.
     //
     /**
      * True if we're in the process of painting the dirty regions.  This is
-     * set to true in <code>paintDirtyRegions</code>.
+     * set to true in {@code paintDirtyRegions}.
      */
     private boolean painting;
     /**
      * If the PaintManager calls into repaintRoot during painting this field
      * will be set to the root.

@@ -490,11 +490,11 @@
         }
         addDirtyRegion0(c, x, y, w, h);
     }
 
     /**
-     * Adds <code>window</code> to the list of <code>Component</code>s that
+     * Adds {@code window} to the list of {@code Component}s that
      * need to be repainted.
      *
      * @param window Window to repaint, null results in nothing happening.
      * @param x X coordinate of the region to repaint
      * @param y Y coordinate of the region to repaint

@@ -508,11 +508,11 @@
     public void addDirtyRegion(Window window, int x, int y, int w, int h) {
         addDirtyRegion0(window, x, y, w, h);
     }
 
     /**
-     * Adds <code>applet</code> to the list of <code>Component</code>s that
+     * Adds {@code applet} to the list of {@code Component}s that
      * need to be repainted.
      *
      * @param applet Applet to repaint, null results in nothing happening.
      * @param x X coordinate of the region to repaint
      * @param y Y coordinate of the region to repaint

@@ -603,11 +603,11 @@
 
     /**
      * Extends the dirty region for the specified component to include
      * the new region.
      *
-     * @return false if <code>c</code> is not yet marked dirty.
+     * @return false if {@code c} is not yet marked dirty.
      */
     private synchronized boolean extendDirtyRegion(
         Component c, int x, int y, int w, int h) {
         Rectangle r = dirtyComponents.get(c);
         if (r != null) {

@@ -1004,13 +1004,13 @@
     }
 
 
     /**
      * Return the offscreen buffer that should be used as a double buffer with
-     * the component <code>c</code>.
+     * the component {@code c}.
      * By default there is a double buffer per RepaintManager.
-     * The buffer might be smaller than <code>(proposedWidth,proposedHeight)</code>
+     * The buffer might be smaller than {@code (proposedWidth,proposedHeight)}
      * This happens when the maximum double buffer size as been set for the receiving
      * repaint manager.
      *
      * @param c the component
      * @param proposedWidth the width of the buffer

@@ -1026,14 +1026,14 @@
         return _getOffscreenBuffer(c, proposedWidth, proposedHeight);
     }
 
     /**
      * Return a volatile offscreen buffer that should be used as a
-     * double buffer with the specified component <code>c</code>.
+     * double buffer with the specified component {@code c}.
      * The image returned will be an instance of VolatileImage, or null
      * if a VolatileImage object could not be instantiated.
-     * This buffer might be smaller than <code>(proposedWidth,proposedHeight)</code>.
+     * This buffer might be smaller than {@code (proposedWidth,proposedHeight)}.
      * This happens when the maximum double buffer size has been set for this
      * repaint manager.
      *
      * @param c the component
      * @param proposedWidth the width of the buffer

@@ -1218,14 +1218,14 @@
 
     /**
      * Returns true if this RepaintManager is double buffered.
      * The default value for this property may vary from platform
      * to platform.  On platforms where native double buffering
-     * is supported in the AWT, the default value will be <code>false</code>
+     * is supported in the AWT, the default value will be {@code false}
      * to avoid unnecessary buffering in Swing.
      * On platforms where native double buffering is not supported,
-     * the default value will be <code>true</code>.
+     * the default value will be {@code true}.
      *
      * @return true if this object is double buffered
      */
     public boolean isDoubleBufferingEnabled() {
         return doubleBufferingEnabled;

@@ -1251,12 +1251,12 @@
             image.flush();
         }
     }
 
     /**
-     * Returns true if we should use the <code>Image</code> returned
-     * from <code>getVolatileOffscreenBuffer</code> to do double buffering.
+     * Returns true if we should use the {@code Image} returned
+     * from {@code getVolatileOffscreenBuffer} to do double buffering.
      */
     boolean useVolatileDoubleBuffer() {
         return volatileImageBufferEnabled;
     }
 

@@ -1344,13 +1344,13 @@
         }
     }
 
     /**
      * Invoked prior to any paint/copyArea method calls.  This will
-     * be followed by an invocation of <code>endPaint</code>.
+     * be followed by an invocation of {@code endPaint}.
      * <b>WARNING</b>: Callers of this method need to wrap the call
-     * in a <code>try/finally</code>, otherwise if an exception is thrown
+     * in a {@code try/finally}, otherwise if an exception is thrown
      * during the course of painting the RepaintManager may
      * be left in a state in which the screen is not updated, eg:
      * <pre>
      * repaintManager.beginPaint();
      * try {

@@ -1377,11 +1377,11 @@
             getPaintManager().beginPaint();
         }
     }
 
     /**
-     * Invoked after <code>beginPaint</code> has been invoked.
+     * Invoked after {@code beginPaint} has been invoked.
      */
     void endPaint() {
         if (isPaintingThread()) {
             PaintManager paintManager = null;
             synchronized(this) {

@@ -1416,11 +1416,11 @@
     void doubleBufferingChanged(JRootPane rootPane) {
         getPaintManager().doubleBufferingChanged(rootPane);
     }
 
     /**
-     * Sets the <code>PaintManager</code> that is used to handle all
+     * Sets the {@code PaintManager} that is used to handle all
      * double buffered painting.
      *
      * @param paintManager The PaintManager to use.  Passing in null indicates
      *        the fallback PaintManager should be used.
      */

@@ -1483,11 +1483,11 @@
 
 
     /**
      * PaintManager is used to handle all double buffered painting for
      * Swing.  Subclasses should call back into the JComponent method
-     * <code>paintToOffscreen</code> to handle the actual painting.
+     * {@code paintToOffscreen} to handle the actual painting.
      */
     static class PaintManager {
         /**
          * RepaintManager the PaintManager has been installed on.
          */

@@ -1625,11 +1625,11 @@
                 osg.dispose();
             }
         }
 
         /**
-         * If <code>image</code> is non-null with a positive size it
+         * If {@code image} is non-null with a positive size it
          * is returned, otherwise null is returned.
          */
         private Image getValidImage(Image image) {
             if (image != null && image.getWidth(null) > 0 &&
                                  image.getHeight(null) > 0) {

@@ -1638,11 +1638,11 @@
             return null;
         }
 
         /**
          * Schedules a repaint for the specified component.  This differs
-         * from <code>root.repaint</code> in that if the RepaintManager is
+         * from {@code root.repaint} in that if the RepaintManager is
          * currently processing paint requests it'll process this request
          * with the current set of requests.
          */
         protected void repaintRoot(JComponent root) {
             assert (repaintManager.repaintRoot == null);

@@ -1654,11 +1654,11 @@
             }
         }
 
         /**
          * Returns true if the component being painted is the root component
-         * that was previously passed to <code>repaintRoot</code>.
+         * that was previously passed to {@code repaintRoot}.
          */
         protected boolean isRepaintingRoot() {
             return isRepaintingRoot;
         }
 
< prev index next >