< prev index next >

src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java

Print this page

        

*** 120,129 **** --- 120,130 ---- /** * Initialize the document to reflect the given element * structure (i.e. the structure reported by the * <code>getDefaultRootElement</code> method. If the * document contained any data it will first be removed. + * @param data the element data */ protected void create(ElementSpec[] data) { try { if (getLength() != 0) { remove(0, getLength());
*** 1102,1111 **** --- 1103,1115 ---- /** * The default size of the initial content buffer. */ public static final int BUFFER_SIZE_DEFAULT = 4096; + /** + * The element buffer. + */ protected ElementBuffer buffer; /** Styles listening to. */ private transient Vector<Style> listeningStyles;
*** 2522,2531 **** --- 2526,2541 ---- /** * An UndoableEdit used to remember AttributeSet changes to an * Element. */ public static class AttributeUndoableEdit extends AbstractUndoableEdit { + /** + * Constructs an {@code AttributeUndoableEdit}. + * @param element the element + * @param newAttributes the new attributes + * @param isReplacing true if all the attributes in the element were removed first. + */ public AttributeUndoableEdit(Element element, AttributeSet newAttributes, boolean isReplacing) { super(); this.element = element; this.newAttributes = newAttributes;
*** 2559,2575 **** MutableAttributeSet as = (MutableAttributeSet)element.getAttributes(); as.removeAttributes(as); as.addAttributes(copy); } ! // AttributeSet containing additional entries, must be non-mutable! protected AttributeSet newAttributes; ! // Copy of the AttributeSet the Element contained. protected AttributeSet copy; ! // true if all the attributes in the element were removed first. protected boolean isReplacing; ! // Efected Element. protected Element element; } /** * UndoableEdit for changing the resolve parent of an Element. --- 2569,2593 ---- MutableAttributeSet as = (MutableAttributeSet)element.getAttributes(); as.removeAttributes(as); as.addAttributes(copy); } ! /** ! * AttributeSet containing additional entries, must be non-mutable! ! */ protected AttributeSet newAttributes; ! /** ! * Copy of the AttributeSet the Element contained. ! */ protected AttributeSet copy; ! /** ! * true if all the attributes in the element were removed first. ! */ protected boolean isReplacing; ! /** ! * Affected Element. ! */ protected Element element; } /** * UndoableEdit for changing the resolve parent of an Element.
< prev index next >