< prev index next >

src/java.desktop/share/classes/javax/swing/text/html/ImageView.java

Print this page

        

@@ -34,11 +34,11 @@
 
 /**
  * View of an Image, intended to support the HTML &lt;IMG&gt; tag.
  * Supports scaling via the HEIGHT and WIDTH attributes of the tag.
  * If the image is unable to be loaded any text specified via the
- * <code>ALT</code> attribute will be rendered.
+ * {@code ALT} attribute will be rendered.
  * <p>
  * While this class has been part of swing for a while now, it is public
  * as of 1.4.
  *
  * @author  Scott Violet

@@ -141,11 +141,11 @@
     }
 
     /**
      * Returns the text to display if the image cannot be loaded. This is
      * obtained from the Elements attribute set with the attribute name
-     * <code>HTML.Attribute.ALT</code>.
+     * {@code HTML.Attribute.ALT}.
      *
      * @return the test to display if the image cannot be loaded.
      */
     public String getAltText() {
         return (String)getElement().getAttributes().getAttribute

@@ -212,11 +212,11 @@
         }
         return img;
     }
 
     /**
-     * Sets how the image is loaded. If <code>newValue</code> is true,
+     * Sets how the image is loaded. If {@code newValue} is true,
      * the image will be loaded when first asked for, otherwise it will
      * be loaded asynchronously. The default is to not load synchronously,
      * that is to load the image asynchronously.
      *
      * @param newValue if {@code true} the image will be loaded when first asked for,

@@ -262,12 +262,12 @@
         return attr;
     }
 
     /**
      * For images the tooltip text comes from text specified with the
-     * <code>ALT</code> attribute. This is overriden to return
-     * <code>getAltText</code>.
+     * {@code ALT} attribute. This is overriden to return
+     * {@code getAltText}.
      *
      * @see JTextComponent#getToolTipText
      */
     public String getToolTipText(float x, float y, Shape allocation) {
         return getAltText();

@@ -670,12 +670,12 @@
         }
     }
 
     /**
      * Loads the image and updates the size accordingly. This should be
-     * invoked instead of invoking <code>loadImage</code> or
-     * <code>updateImageSize</code> directly.
+     * invoked instead of invoking {@code loadImage} or
+     * {@code updateImageSize} directly.
      */
     private void refreshImage() {
         synchronized(this) {
             // clear out width/height/realoadimage flag and set loading flag
             state = (state | LOADING_FLAG | RELOAD_IMAGE_FLAG | WIDTH_FLAG |

@@ -699,12 +699,12 @@
             }
         }
     }
 
     /**
-     * Loads the image from the URL <code>getImageURL</code>. This should
-     * only be invoked from <code>refreshImage</code>.
+     * Loads the image from the URL {@code getImageURL}. This should
+     * only be invoked from {@code refreshImage}.
      */
     private void loadImage() {
         URL src = getImageURL();
         Image newImage = null;
         if (src != null) {

@@ -726,11 +726,11 @@
         image = newImage;
     }
 
     /**
      * Recreates and reloads the image.  This should
-     * only be invoked from <code>refreshImage</code>.
+     * only be invoked from {@code refreshImage}.
      */
     private void updateImageSize() {
         int newWidth = 0;
         int newHeight = 0;
         int newState = 0;

@@ -844,11 +844,11 @@
         }
         return view;
     }
 
     /**
-     * Invokes <code>preferenceChanged</code> on the event displatching
+     * Invokes {@code preferenceChanged} on the event displatching
      * thread.
      */
     private void safePreferenceChanged() {
         if (SwingUtilities.isEventDispatchThread()) {
             Document doc = getDocument();
< prev index next >