< prev index next >

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

Print this page

        

@@ -122,11 +122,11 @@
     private ElementInfo getRootInfo() {
         return rootElementInfo;
     }
 
     /**
-     * Returns the root <code>View</code> associated with the current text
+     * Returns the root {@code View} associated with the current text
      * component.
      */
     private View getRootView() {
         return getTextComponent().getUI().getRootView(getTextComponent());
     }

@@ -149,11 +149,11 @@
     }
 
     /**
      * If possible acquires a lock on the Document.  If a lock has been
      * obtained a key will be retured that should be passed to
-     * <code>unlock</code>.
+     * {@code unlock}.
      */
     private Object lock() {
         Document document = getDocument();
 
         if (document instanceof AbstractDocument) {

@@ -162,11 +162,11 @@
         }
         return null;
     }
 
     /**
-     * Releases a lock previously obtained via <code>lock</code>.
+     * Releases a lock previously obtained via {@code lock}.
      */
     private void unlock(Object key) {
         if (key != null) {
             ((AbstractDocument)key).readUnlock();
         }

@@ -255,13 +255,13 @@
         }
 
         /**
          * Gets the accessibleDescription property of this object.  If this
          * property isn't set, returns the content type of this
-         * <code>JEditorPane</code> instead (e.g. "plain/text", "html/text").
+         * {@code JEditorPane} instead (e.g. "plain/text", "html/text").
          *
-         * @return the localized description of the object; <code>null</code>
+         * @return the localized description of the object; {@code null}
          *      if this object does not have a description
          *
          * @see #setAccessibleName
          */
         public String getAccessibleDescription() {

@@ -872,13 +872,13 @@
             }
 
             /**
              * Gets the accessibleDescription property of this object.  If this
              * property isn't set, returns the content type of this
-             * <code>JEditorPane</code> instead (e.g. "plain/text", "html/text").
+             * {@code JEditorPane} instead (e.g. "plain/text", "html/text").
              *
-             * @return the localized description of the object; <code>null</code>
+             * @return the localized description of the object; {@code null}
              *  if this object does not have a description
              *
              * @see #setAccessibleName
              */
             public String getAccessibleDescription() {

@@ -980,11 +980,11 @@
                 }
             }
 
             /**
              * IndexedSegment extends Segment adding the offset into the
-             * the model the <code>Segment</code> was asked for.
+             * the model the {@code Segment} was asked for.
              */
             private class IndexedSegment extends Segment {
                 /**
                  * Offset into the model that the position represents.
                  */

@@ -1003,12 +1003,12 @@
             public String getBeforeIndex(int part, int index) {
                 return getAtIndex(part, index, -1);
             }
 
             /**
-             * Gets the word, sentence, or character at <code>index</code>.
-             * If <code>direction</code> is non-null this will find the
+             * Gets the word, sentence, or character at {@code index}.
+             * If {@code direction} is non-null this will find the
              * next/previous word/sentence/character.
              */
             private String getAtIndex(int part, int index, int direction) {
                 if (model instanceof AbstractDocument) {
                     ((AbstractDocument)model).readLock();

@@ -1088,12 +1088,12 @@
                     return para.getParentElement();
                 }
             }
 
             /*
-             * Returns a <code>Segment</code> containing the paragraph text
-             * at <code>index</code>, or null if <code>index</code> isn't
+             * Returns a {@code Segment} containing the paragraph text
+             * at {@code index}, or null if {@code index} isn't
              * valid.
              */
             private IndexedSegment getParagraphElementText(int index)
                 throws BadLocationException {
                 Element para = getParagraphElement(index);

@@ -1113,12 +1113,12 @@
                 return null;
             }
 
 
             /**
-             * Returns the Segment at <code>index</code> representing either
-             * the paragraph or sentence as identified by <code>part</code>, or
+             * Returns the Segment at {@code index} representing either
+             * the paragraph or sentence as identified by {@code part}, or
              * null if a valid paragraph/sentence can't be found. The offset
              * will point to the start of the word/sentence in the array, and
              * the modelOffset will point to the location of the word/sentence
              * in the model.
              */

@@ -1307,13 +1307,13 @@
             }
 
             /**
              * Gets the accessibleDescription property of this object.  If this
              * property isn't set, returns the content type of this
-             * <code>JEditorPane</code> instead (e.g. "plain/text", "html/text").
+             * {@code JEditorPane} instead (e.g. "plain/text", "html/text").
              *
-             * @return the localized description of the object; <code>null</code>
+             * @return the localized description of the object; {@code null}
              *  if this object does not have a description
              *
              * @see #setAccessibleName
              */
             public String getAccessibleDescription() {

@@ -1608,13 +1608,13 @@
             }
 
             /**
              * Gets the accessibleDescription property of this object.  If this
              * property isn't set, returns the content type of this
-             * <code>JEditorPane</code> instead (e.g. "plain/text", "html/text").
+             * {@code JEditorPane} instead (e.g. "plain/text", "html/text").
              *
-             * @return the localized description of the object; <code>null</code>
+             * @return the localized description of the object; {@code null}
              *  if this object does not have a description
              *
              * @see #setAccessibleName
              */
             public String getAccessibleDescription() {

@@ -2632,11 +2632,11 @@
      * ElementInfo provides a slim down view of an Element.  Each ElementInfo
      * can have any number of child ElementInfos that are not necessarily
      * direct children of the Element. As the Document changes various
      * ElementInfos become invalidated. Before accessing a particular portion
      * of an ElementInfo you should make sure it is valid by invoking
-     * <code>validateIfNecessary</code>, this will return true if
+     * {@code validateIfNecessary}, this will return true if
      * successful, on the other hand a false return value indicates the
      * ElementInfo is not valid and can never become valid again (usually
      * the result of the Element the ElementInfo encapsulates being removed).
      */
     private class ElementInfo {

@@ -2669,11 +2669,11 @@
         ElementInfo(Element element) {
             this(element, null);
         }
 
         /**
-         * Creates an ElementInfo representing <code>element</code> with
+         * Creates an ElementInfo representing {@code element} with
          * the specified parent.
          */
         ElementInfo(Element element, ElementInfo parent) {
             this.element = element;
             this.parent = parent;

@@ -2681,20 +2681,20 @@
             canBeValid = true;
         }
 
         /**
          * Validates the receiver. This recreates the children as well. This
-         * will be invoked within a <code>readLock</code>. If this is overriden
+         * will be invoked within a {@code readLock}. If this is overriden
          * it MUST invoke supers implementation first!
          */
         protected void validate() {
             isValid = true;
             loadChildren(getElement());
         }
 
         /**
-         * Recreates the direct children of <code>info</code>.
+         * Recreates the direct children of {@code info}.
          */
         protected void loadChildren(Element parent) {
             if (!parent.isLeaf()) {
                 for (int counter = 0, maxCounter = parent.getElementCount();
                     counter < maxCounter; counter++) {

@@ -2721,11 +2721,11 @@
             }
             return parent.indexOf(this);
         }
 
         /**
-         * Returns the Element this <code>ElementInfo</code> represents.
+         * Returns the Element this {@code ElementInfo} represents.
          */
         public Element getElement() {
             return element;
         }
 

@@ -2736,11 +2736,11 @@
             return parent;
         }
 
         /**
          * Returns the index of the specified child, or -1 if
-         * <code>child</code> isn't a valid child.
+         * {@code child} isn't a valid child.
          */
         public int indexOf(ElementInfo child) {
             ArrayList<ElementInfo> children = this.children;
 
             if (children != null) {

@@ -2748,12 +2748,12 @@
             }
             return -1;
         }
 
         /**
-         * Returns the child ElementInfo at <code>index</code>, or null
-         * if <code>index</code> isn't a valid index.
+         * Returns the child ElementInfo at {@code index}, or null
+         * if {@code index} isn't a valid index.
          */
         public ElementInfo getChild(int index) {
             if (validateIfNecessary()) {
                 ArrayList<ElementInfo> children = this.children;
 

@@ -2893,13 +2893,13 @@
             return deflt;
         }
 
         /**
          * Validates the ElementInfo if necessary.  Some ElementInfos may
-         * never be valid again.  You should check <code>isValid</code> before
+         * never be valid again.  You should check {@code isValid} before
          * using one.  This will reload the children and invoke
-         * <code>validate</code> if the ElementInfo is invalid and can become
+         * {@code validate} if the ElementInfo is invalid and can become
          * valid again. This will return true if the receiver is valid.
          */
         protected boolean validateIfNecessary() {
             if (!isValid() && canBeValid) {
                 children = null;

@@ -3028,11 +3028,11 @@
         }
     }
 
     /**
      * DocumentListener installed on the current Document.  Will invoke
-     * <code>update</code> on the <code>RootInfo</code> in response to
+     * {@code update} on the {@code RootInfo} in response to
      * any event.
      */
     private class DocumentHandler implements DocumentListener {
         public void insertUpdate(DocumentEvent e) {
             getRootInfo().update(e);
< prev index next >