< prev index next >
src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java
Print this page
@@ -60,11 +60,11 @@
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*
* @author Timothy Prinzing
* @see Document
* @see AbstractDocument
@@ -118,11 +118,11 @@
}
/**
* Initialize the document to reflect the given element
* structure (i.e. the structure reported by the
- * <code>getDefaultRootElement</code> method. If the
+ * {@code getDefaultRootElement} method. If the
* document contained any data it will first be removed.
* @param data the element data
*/
protected void create(ElementSpec[] data) {
try {
@@ -247,11 +247,11 @@
* "\n"} character in document), this character is not removed;
* instead, preceding leaf element is extended to cover the
* character. If the last leaf already ends with {@code "\n",} it is
* included in content removal.</p>
*
- * <p>If the element is {@code null,} {@code NullPointerException} is
+ * <p>If the element is {@code null, NullPointerException} is
* thrown. If the element structure would become invalid after the removal,
* for example if the element is the document root element, {@code
* IllegalArgumentException} is thrown. If the current element structure is
* invalid, {@code IllegalStateException} is thrown.</p>
*
@@ -585,11 +585,11 @@
writeUnlock();
}
}
/**
- * Gets the paragraph element at the offset <code>pos</code>.
+ * Gets the paragraph element at the offset {@code pos}.
* A paragraph consists of at least one child Element, which is usually
* a leaf.
*
* @param pos the starting offset >= 0
* @return the element
@@ -803,12 +803,12 @@
super.insertUpdate( chng, attr );
}
/**
* This is called by insertUpdate when inserting after a new line.
- * It generates, in <code>parseBuffer</code>, ElementSpecs that will
- * position the stack in <code>paragraph</code>.<p>
+ * It generates, in {@code parseBuffer}, ElementSpecs that will
+ * position the stack in {@code paragraph}.<p>
* It returns the direction the last StartSpec should have (this don't
* necessarily create the last start spec).
*/
short createSpecsForInsertAfterNewline(Element paragraph,
Element pParagraph, AttributeSet pattr, Vector<ElementSpec> parseBuffer,
@@ -1130,11 +1130,11 @@
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
protected class SectionElement extends BranchElement {
@@ -1162,11 +1162,11 @@
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
public static class ElementSpec {
@@ -1398,11 +1398,11 @@
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
public class ElementBuffer implements Serializable {
@@ -1927,13 +1927,13 @@
break;
}
}
/**
- * Remove the elements from <code>elem</code> in range
- * <code>rmOffs0</code>, <code>rmOffs1</code>. This uses
- * <code>canJoin</code> and <code>join</code> to handle joining
+ * Remove the elements from {@code elem} in range
+ * {@code rmOffs0}, {@code rmOffs1}. This uses
+ * {@code canJoin} and {@code join} to handle joining
* the endpoints of the insertion.
*
* @return true if elem will no longer have any elements.
*/
boolean removeElements(Element elem, int rmOffs0, int rmOffs1) {
@@ -2169,15 +2169,15 @@
/**
* Determines if a fracture needs to be performed. A fracture
* can be thought of as moving the right part of a tree to a
* new location, where the right part is determined by what has
- * been inserted. <code>depth</code> is used to indicate a
+ * been inserted. {@code depth} is used to indicate a
* JoinToFracture is needed to an element at a depth
- * of <code>depth</code>. Where the root is 0, 1 is the children
+ * of {@code depth}. Where the root is 0, 1 is the children
* of the root...
- * <p>This will invoke <code>fractureFrom</code> if it is determined
+ * <p>This will invoke {@code fractureFrom} if it is determined
* a fracture needs to happen.
*/
void fracture(int depth) {
int cLength = insertPath.length;
int lastIndex = -1;
@@ -2219,14 +2219,14 @@
}
}
/**
* Recreates the elements to the right of the insertion point.
- * This starts at <code>startIndex</code> in <code>changed</code>,
+ * This starts at {@code startIndex} in {@code changed},
* and calls duplicate to duplicate existing elements.
* This will also duplicate the elements along the insertion
- * point, until a depth of <code>endFractureIndex</code> is
+ * point, until a depth of {@code endFractureIndex} is
* reached, at which point only the elements to the right of
* the insertion point are duplicated.
*/
void fractureFrom(ElemChanges[] changed, int startIndex,
int endFractureIndex) {
@@ -2334,14 +2334,14 @@
parent = newChild;
}
}
/**
- * Recreates <code>toDuplicate</code>. This is called when an
+ * Recreates {@code toDuplicate}. This is called when an
* element needs to be created as the result of an insertion. This
* will recurse and create all the children. This is similar to
- * <code>clone</code>, but deteremines the offsets differently.
+ * {@code clone}, but deteremines the offsets differently.
*/
Element recreateFracturedElement(Element parent, Element toDuplicate) {
if(toDuplicate.isLeaf()) {
return createLeafElement(parent, toDuplicate.getAttributes(),
Math.max(toDuplicate.getStartOffset(),
@@ -2360,11 +2360,11 @@
((BranchElement)newParent).replace(0, 0, newKids);
return newParent;
}
/**
- * Splits the bottommost leaf in <code>path</code>.
+ * Splits the bottommost leaf in {@code path}.
* This is called from insert when the first element is NOT content.
*/
void fractureDeepestLeaf(ElementSpec[] specs) {
// Split the bottommost leaf. It will be recreated elsewhere.
ElemChanges ec = path.peek();
@@ -2725,11 +2725,11 @@
}
/**
* Added to the StyleContext. When the StyleContext changes, this invokes
- * <code>updateStylesListeningTo</code>.
+ * {@code updateStylesListeningTo}.
*/
static class StyleContextChangeHandler extends AbstractChangeHandler {
StyleContextChangeHandler(DefaultStyledDocument d) {
super(d);
< prev index next >