diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java index 6b1bf61bb00..191805e16c0 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -308,9 +308,8 @@ public abstract class AbstractDocument implements Document, Serializable { * * If no such listeners exist, this method returns an empty array. * - * @param listenerType the type of listeners requested; this parameter - * should specify an interface that descends from - * java.util.EventListener + * @param the listener type + * @param listenerType the type of listeners requested * @return an array of all objects registered as * FooListeners on this component, * or an empty array if no such @@ -905,6 +904,8 @@ public abstract class AbstractDocument implements Document, Serializable { * Returns the root element of the bidirectional structure for this * document. Its children represent character runs with a given * Unicode bidi level. + * @return the root element of the bidirectional structure for this + * document */ public Element getBidiRootElement() { return bidiRoot; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java index cfe619b801f..fb07a9533c0 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -186,7 +186,7 @@ public abstract class AbstractWriter { /** * Returns the first offset to be output. - * + * @return the first offset to be output * @since 1.3 */ public int getStartOffset() { @@ -195,7 +195,7 @@ public abstract class AbstractWriter { /** * Returns the last offset to be output. - * + * @return the last offset to be output * @since 1.3 */ public int getEndOffset() { @@ -213,7 +213,7 @@ public abstract class AbstractWriter { /** * Returns the Writer that is used to output the content. - * + * @return the Writer that is used to output the content * @since 1.3 */ protected Writer getWriter() { @@ -257,6 +257,9 @@ public abstract class AbstractWriter { * by subclasses. Its responsibility is to * iterate over the elements and use the write() * methods to generate output in the desired format. + * @throws IOException if an I/O problem has occurred + * @throws BadLocationException for an invalid location within + * the document */ abstract protected void write() throws IOException, BadLocationException; @@ -314,7 +317,7 @@ public abstract class AbstractWriter { /** * Returns the maximum line length. - * + * @return the maximum line length * @since 1.3 */ protected int getLineLength() { @@ -323,7 +326,7 @@ public abstract class AbstractWriter { /** * Sets the current line length. - * + * @param length the new line length * @since 1.3 */ protected void setCurrentLineLength(int length) { @@ -333,7 +336,7 @@ public abstract class AbstractWriter { /** * Returns the current line length. - * + * @return the current line length * @since 1.3 */ protected int getCurrentLineLength() { @@ -344,7 +347,7 @@ public abstract class AbstractWriter { * Returns true if the current line should be considered empty. This * is true when getCurrentLineLength == 0 || * indent has been invoked on an empty line. - * + * @return true if the current line should be considered empty * @since 1.3 */ protected boolean isLineEmpty() { @@ -355,7 +358,7 @@ public abstract class AbstractWriter { * Sets whether or not lines can be wrapped. This can be toggled * during the writing of lines. For example, outputting HTML might * set this to false when outputting a quoted string. - * + * @param newValue new value for line wrapping * @since 1.3 */ protected void setCanWrapLines(boolean newValue) { @@ -365,7 +368,7 @@ public abstract class AbstractWriter { /** * Returns whether or not the lines can be wrapped. If this is false * no lineSeparator's will be output. - * + * @return whether or not the lines can be wrapped * @since 1.3 */ protected boolean getCanWrapLines() { @@ -385,7 +388,7 @@ public abstract class AbstractWriter { /** * Returns the amount of space to indent. - * + * @return the amount of space to indent * @since 1.3 */ protected int getIndentSpace() { @@ -396,7 +399,7 @@ public abstract class AbstractWriter { * Sets the String used to represent newlines. This is initialized * in the constructor from either the Document, or the System property * line.separator. - * + * @param value the new line separator * @since 1.3 */ public void setLineSeparator(String value) { @@ -405,7 +408,7 @@ public abstract class AbstractWriter { /** * Returns the string used to represent newlines. - * + * @return the string used to represent newlines * @since 1.3 */ public String getLineSeparator() { @@ -446,7 +449,7 @@ public abstract class AbstractWriter { * Returns the current indentation level. That is, the number of times * incrIndent has been invoked minus the number of times * decrIndent has been invoked. - * + * @return the current indentation level * @since 1.3 */ protected int getIndentLevel() { @@ -514,7 +517,7 @@ public abstract class AbstractWriter { /** * Writes the line separator. This invokes output directly * as well as setting the lineLength to 0. - * + * @throws IOException on any I/O error * @since 1.3 */ protected void writeLineSeparator() throws IOException { @@ -539,6 +542,10 @@ public abstract class AbstractWriter { * and won't fit in which case the line length will exceed * getLineLength. * + * @param chars characters to output + * @param startIndex starting index + * @param length length of output + * @throws IOException on any I/O error * @since 1.3 */ protected void write(char[] chars, int startIndex, int length) @@ -686,6 +693,10 @@ public abstract class AbstractWriter { * writeLineSeparator to write out a newline, which will * property update the current line length. * + * @param content characters to output + * @param start starting index + * @param length length of output + * @throws IOException on any I/O error * @since 1.3 */ protected void output(char[] content, int start, int length) diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java index 9c00c5f3f22..a9e4c58fbaa 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -71,6 +71,7 @@ public class AsyncBoxView extends View { * Fetch the major axis (the axis the children * are tiled along). This will have a value of * either X_AXIS or Y_AXIS. + * @return the major axis */ public int getMajorAxis() { return axis; @@ -80,6 +81,7 @@ public class AsyncBoxView extends View { * Fetch the minor axis (the axis orthogonal * to the tiled axis). This will have a value of * either X_AXIS or Y_AXIS. + * @return the minor axis */ public int getMinorAxis() { return (axis == X_AXIS) ? Y_AXIS : X_AXIS; @@ -87,6 +89,7 @@ public class AsyncBoxView extends View { /** * Get the top part of the margin around the view. + * @return the top part of the margin around the view */ public float getTopInset() { return topInset; @@ -103,6 +106,7 @@ public class AsyncBoxView extends View { /** * Get the bottom part of the margin around the view. + * @return the bottom part of the margin around the view */ public float getBottomInset() { return bottomInset; @@ -119,6 +123,7 @@ public class AsyncBoxView extends View { /** * Get the left part of the margin around the view. + * @return the left part of the margin around the view */ public float getLeftInset() { return leftInset; @@ -135,6 +140,7 @@ public class AsyncBoxView extends View { /** * Get the right part of the margin around the view. + * @return the right part of the margin around the view */ public float getRightInset() { return rightInset; @@ -154,6 +160,7 @@ public class AsyncBoxView extends View { * * @param axis the axis to determine the total insets along, * either X_AXIS or Y_AXIS. + * @return the span along an axis that is taken up by the insets * @since 1.4 */ protected float getInsetSpan(int axis) { @@ -173,6 +180,7 @@ public class AsyncBoxView extends View { * considered to be accurate and incremental changes will be * added into the total as they are calculated. * + * @param isEstimated new value for the estimatedMajorSpan property * @since 1.4 */ protected void setEstimatedMajorSpan(boolean isEstimated) { @@ -181,6 +189,7 @@ public class AsyncBoxView extends View { /** * Is the major span currently estimated? + * @return whether or not the major span currently estimated * * @since 1.4 */ @@ -194,6 +203,8 @@ public class AsyncBoxView extends View { * * @param index the child index. This should be a * value >= 0 and < getViewCount(). + * @return the object representing the layout state of + * of the child at the given index */ protected ChildState getChildState(int index) { synchronized(stats) { @@ -206,6 +217,7 @@ public class AsyncBoxView extends View { /** * Fetch the queue to use for layout. + * @return the queue to use for layout */ protected LayoutQueue getLayoutQueue() { return LayoutQueue.getDefaultQueue(); @@ -214,7 +226,9 @@ public class AsyncBoxView extends View { /** * New ChildState records are created through * this method to allow subclasses the extend - * the ChildState records to do/hold more + * the ChildState records to do/hold more. + * @param v the view + * @return new child state */ protected ChildState createChildState(View v) { return new ChildState(v); @@ -237,6 +251,8 @@ public class AsyncBoxView extends View { * not estimated, it is updated by the given delta to reflect * the incremental change. The delta is ignored if the * major span is estimated. + * @param cs the child state + * @param delta the delta */ protected synchronized void majorRequirementChange(ChildState cs, float delta) { if (estimatedMajorSpan == false) { @@ -254,6 +270,7 @@ public class AsyncBoxView extends View { * might be the GUI thread if it is trying to update * something immediately (such as to perform a * model/view translation). + * @param cs the child state */ protected synchronized void minorRequirementChange(ChildState cs) { minorChanged = true; @@ -418,6 +435,7 @@ public class AsyncBoxView extends View { * where there is a child view for each child element. * * @param pos the position >= 0 + * @param b the position bias * @return index of the view representing the given position, or * -1 if no view represents that position */ @@ -946,6 +964,7 @@ public class AsyncBoxView extends View { * This is called by a ChildState object that has * changed it's major span. This can therefore be * called by multiple threads. + * @param cs the child state */ public synchronized void childChanged(ChildState cs) { if (lastValidOffset == null) { @@ -958,6 +977,7 @@ public class AsyncBoxView extends View { /** * Paint the children that intersect the clip area. + * @param g the rendering surface to use */ public synchronized void paintChildren(Graphics g) { Rectangle clip = g.getClipBounds(); @@ -987,6 +1007,9 @@ public class AsyncBoxView extends View { * Fetch the allocation to use for a child view. * This will update the offsets for all children * not yet updated before the given index. + * @param index the child index + * @param a the allocation + * @return the allocation to use for a child view */ public synchronized Shape getChildAllocation(int index, Shape a) { if (a == null) { @@ -1031,6 +1054,8 @@ public class AsyncBoxView extends View { * Fetch the allocation to use for a child view. * This does not update the offsets in the ChildState * records. + * @param index the index + * @return the allocation to use for a child view */ protected Shape getChildAllocation(int index) { ChildState cs = getChildState(index); @@ -1057,6 +1082,7 @@ public class AsyncBoxView extends View { * Copy the currently allocated shape into the Rectangle * used to store the current allocation. This would be * a floating point rectangle in a Java2D-specific implementation. + * @param a the allocation */ protected void setAllocation(Shape a) { if (a instanceof Rectangle) { @@ -1072,6 +1098,7 @@ public class AsyncBoxView extends View { * along the major axis. Make sure that offsets are set * on the ChildState objects up to the given target span * past the desired offset. + * @param targetOffset the target offset * * @return index of the view representing the given visual * location (targetOffset), or -1 if no view represents @@ -1201,6 +1228,7 @@ public class AsyncBoxView extends View { * Construct a child status. This needs to start * out as fairly large so we don't falsely begin with * the idea that all of the children are visible. + * @param v the view * @since 1.4 */ public ChildState(View v) { @@ -1212,7 +1240,8 @@ public class AsyncBoxView extends View { } /** - * Fetch the child view this record represents + * Fetch the child view this record represents. + * @return the child view this record represents */ public View getChildView() { return child; @@ -1322,6 +1351,7 @@ public class AsyncBoxView extends View { /** * What is the span along the minor axis. + * @return the span along the minor axis */ public float getMinorSpan() { if (max < minorSpan) { @@ -1333,6 +1363,7 @@ public class AsyncBoxView extends View { /** * What is the offset along the minor axis + * @return the offset along the minor axis */ public float getMinorOffset() { if (max < minorSpan) { @@ -1345,13 +1376,15 @@ public class AsyncBoxView extends View { /** * What is the span along the major axis. + * @return the span along the major axis */ public float getMajorSpan() { return span; } /** - * Get the offset along the major axis + * Get the offset along the major axis. + * @return the offset along the major axis */ public float getMajorOffset() { return offset; @@ -1361,6 +1394,7 @@ public class AsyncBoxView extends View { * This method should only be called by the ChildLocator, * it is simply a convenient place to hold the cached * location. + * @param offs offsets */ public void setMajorOffset(float offs) { offset = offs; @@ -1394,6 +1428,7 @@ public class AsyncBoxView extends View { /** * Has the child view been laid out. + * @return whether or not the child view been laid out. */ public boolean isLayoutValid() { return (minorValid && majorValid && childSizeValid); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/BoxView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/BoxView.java index 570082b1fb4..1988adcad34 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/BoxView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/BoxView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -134,6 +134,7 @@ public class BoxView extends CompositeView { /** * Determines if the layout is valid along the given axis. + * @return if the layout is valid along the given axis * * @param axis either View.X_AXIS or View.Y_AXIS * diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/ChangedCharSetException.java b/jdk/src/java.desktop/share/classes/javax/swing/text/ChangedCharSetException.java index a1bffa75cdc..24b96cd34b2 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/ChangedCharSetException.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ChangedCharSetException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,15 +38,28 @@ public class ChangedCharSetException extends IOException { String charSetSpec; boolean charSetKey; + /** + * Constructs a {@code ChangedCharSetException}. + * @param charSetSpec name of the char set specification + * @param charSetKey char set key + */ public ChangedCharSetException(String charSetSpec, boolean charSetKey) { this.charSetSpec = charSetSpec; this.charSetKey = charSetKey; } + /** + * Returns the char set specification. + * @return the char set specification + */ public String getCharSetSpec() { return charSetSpec; } + /** + * Returns the char set key. + * @return the char set key + */ public boolean keyEqualsCharSet() { return charSetKey; } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/ComponentView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/ComponentView.java index 083e3b28019..a4aaa30e512 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/ComponentView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ComponentView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -85,6 +85,8 @@ public class ComponentView extends View { * This would result from a call to setParent or * as a result of being notified that attributes * have changed. + * @return the component that is associated with + * this view */ protected Component createComponent() { AttributeSet attr = getElement().getAttributes(); @@ -94,6 +96,7 @@ public class ComponentView extends View { /** * Fetch the component associated with the view. + * @return the component associated with the view */ public final Component getComponent() { return createdC; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java index cd17fed60bd..729c62a964c 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -825,10 +825,8 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou *
ChangeListener[] cls = (ChangeListener[])(c.getListeners(ChangeListener.class));
* * If no such listeners exist, this method returns an empty array. - * - * @param listenerType the type of listeners requested; this parameter - * should specify an interface that descends from - * java.util.EventListener + * @param the listener type + * @param listenerType the type of listeners requested * @return an array of all objects registered as * FooListeners on this component, * or an empty array if no such diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultFormatterFactory.java b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultFormatterFactory.java index ff52dde9803..86cce58755d 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultFormatterFactory.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultFormatterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -97,6 +97,9 @@ public class DefaultFormatterFactory extends JFormattedTextField.AbstractFormatt private JFormattedTextField.AbstractFormatter nullFormat; + /** + * Constructs a {@code DefaultFormatterFactory}. + */ public DefaultFormatterFactory() { } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java index 2ed06b2a201..42d81e952d3 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -336,11 +336,16 @@ public class DefaultHighlighter extends LayeredHighlighter { * (if the offsets are in a highlighted region that is). For this to * work the painter supplied must be an instance of * LayeredHighlightPainter. + * @param newValue the new value */ public void setDrawsLayeredHighlights(boolean newValue) { drawsLayeredHighlights = newValue; } + /** + * Return the draw layered highlights. + * @return the draw layered highlights + */ public boolean getDrawsLayeredHighlights() { return drawsLayeredHighlights; } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java index ff2e275400b..24e4be19cfd 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,6 +122,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc * structure (i.e. the structure reported by the * getDefaultRootElement method. If the * document contained any data it will first be removed. + * @param data the element data */ protected void create(ElementSpec[] data) { try { @@ -1104,6 +1105,9 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc */ public static final int BUFFER_SIZE_DEFAULT = 4096; + /** + * The element buffer. + */ protected ElementBuffer buffer; /** Styles listening to. */ @@ -2524,6 +2528,12 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc * 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(); @@ -2561,13 +2571,21 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc as.addAttributes(copy); } - // AttributeSet containing additional entries, must be non-mutable! + /** + * AttributeSet containing additional entries, must be non-mutable! + */ protected AttributeSet newAttributes; - // Copy of the AttributeSet the Element contained. + /** + * Copy of the AttributeSet the Element contained. + */ protected AttributeSet copy; - // true if all the attributes in the element were removed first. + /** + * true if all the attributes in the element were removed first. + */ protected boolean isReplacing; - // Efected Element. + /** + * Affected Element. + */ protected Element element; } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/FlowView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/FlowView.java index 9c5cf03f792..fb8ed7ea728 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/FlowView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/FlowView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,6 +70,8 @@ public abstract class FlowView extends BoxView { * rows are tiled (the axis of the default flow * rows themselves). This is typically used * by the FlowStrategy. + * @return the axis along which views should be + * flowed */ public int getFlowAxis() { if (getAxis() == Y_AXIS) { @@ -89,6 +91,8 @@ public abstract class FlowView extends BoxView { * * @param index the index of the row being updated. * This should be a value >= 0 and < getViewCount(). + * @return the constraining span to flow against for + * the given child index * @see #getFlowStart */ public int getFlowSpan(int index) { @@ -104,6 +108,8 @@ public abstract class FlowView extends BoxView { * @param index the index of the row being updated. * This should be a value >= 0 and < getViewCount(). + * @return the location along the flow axis that the + * flow span will start at * @see #getFlowSpan */ public int getFlowStart(int index) { @@ -116,6 +122,8 @@ public abstract class FlowView extends BoxView { * called by the FlowStrategy when new children * are added or removed (i.e. rows are added or * removed) in the process of updating the flow. + * @return a View that should be used to hold a + * a rows worth of children in a flow */ protected abstract View createRow(); @@ -359,6 +367,7 @@ public abstract class FlowView extends BoxView { * strategy should update the appropriate changed region (which * depends upon the strategy used for repair). * + * @param fv the flow view * @param e the change information from the associated document * @param alloc the current allocation of the view inside of the insets. * This value will be null if the view has not yet been displayed. @@ -385,6 +394,7 @@ public abstract class FlowView extends BoxView { * Gives notification that something was removed from the document * in a location that the given flow view is responsible for. * + * @param fv the flow view * @param e the change information from the associated document * @param alloc the current allocation of the view inside of the insets. * @see View#removeUpdate @@ -426,6 +436,8 @@ public abstract class FlowView extends BoxView { /** * This method gives flow strategies access to the logical * view of the FlowView. + * @param fv the FlowView + * @return the logical view of the FlowView */ protected View getLogicalView(FlowView fv) { return fv.layoutPool; @@ -495,6 +507,7 @@ public abstract class FlowView extends BoxView { * the adjustRow method will be called to perform adjustments * to the row to try and make it fit into the given span. * + * @param fv the flow view * @param rowIndex the index of the row to fill in with views. The * row is assumed to be empty on entry. * @param pos The current position in the children of @@ -578,6 +591,7 @@ public abstract class FlowView extends BoxView { * the row. If a forced break is encountered, the * break will be positioned there. * + * @param fv the flow view * @param rowIndex the row to adjust to the current layout * span. * @param desiredSpan the current layout span >= 0 @@ -654,6 +668,8 @@ public abstract class FlowView extends BoxView { * @param startOffset the start location for the view being created * @param spanLeft the about of span left to fill in the row * @param rowIndex the row the view will be placed into + * @return a view that can be used to represent the current piece + * of the flow */ protected View createView(FlowView fv, int startOffset, int spanLeft, int rowIndex) { // Get the child view that contains the given starting position diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java b/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java index 2a15b26af19..0781815c7c4 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -758,6 +758,8 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S * to subclasses. * * @param positions the UndoPosRef instances to reset + * @param offset where the string was inserted + * @param length length of inserted string */ @SuppressWarnings("rawtypes") // UndoPosRef type cannot be exposed protected void updateUndoPositions(Vector positions, int offset, diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java index e374a364cdc..d29b56bde19 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -102,6 +102,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * Fetch the currently installed glyph painter. * If a painter has not yet been installed, and * a default was not yet needed, null is returned. + * @return the currently installed glyph painter */ public GlyphPainter getGlyphPainter() { return painter; @@ -109,6 +110,7 @@ public class GlyphView extends View implements TabableView, Cloneable { /** * Sets the painter to use for rendering glyphs. + * @param p the painter to use for rendering glyphs */ public void setGlyphPainter(GlyphPainter p) { painter = p; @@ -144,6 +146,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * be returned. This is implemented to call * StyledDocument.getBackground if the associated * document is a styled document, otherwise it returns null. + * @return the background color to use to render the glyphs */ public Color getBackground() { Document doc = getDocument(); @@ -165,6 +168,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * is not a StyledDocument, the associated components foreground * color is used. If there is no associated component, null * is returned. + * @return the foreground color to use to render the glyphs */ public Color getForeground() { Document doc = getDocument(); @@ -187,6 +191,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * is not a StyledDocument, the associated components font * is used. If there is no associated component, null * is returned. + * @return the font that the glyphs should be based upon */ public Font getFont() { Document doc = getDocument(); @@ -204,6 +209,7 @@ public class GlyphView extends View implements TabableView, Cloneable { /** * Determine if the glyphs should be underlined. If true, * an underline should be drawn through the baseline. + * @return if the glyphs should be underlined */ public boolean isUnderline() { AttributeSet attr = getAttributes(); @@ -214,6 +220,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * Determine if the glyphs should have a strikethrough * line. If true, a line should be drawn through the center * of the glyphs. + * @return if the glyphs should have a strikethrough line */ public boolean isStrikeThrough() { AttributeSet attr = getAttributes(); @@ -222,6 +229,7 @@ public class GlyphView extends View implements TabableView, Cloneable { /** * Determine if the glyphs should be rendered as superscript. + * @return if the glyphs should be rendered as superscript */ public boolean isSubscript() { AttributeSet attr = getAttributes(); @@ -230,6 +238,7 @@ public class GlyphView extends View implements TabableView, Cloneable { /** * Determine if the glyphs should be rendered as subscript. + * @return if the glyphs should be rendered as subscript */ public boolean isSuperscript() { AttributeSet attr = getAttributes(); @@ -238,6 +247,7 @@ public class GlyphView extends View implements TabableView, Cloneable { /** * Fetch the TabExpander to use if tabs are present in this view. + * @return the TabExpander to use if tabs are present in this view */ public TabExpander getTabExpander() { return expander; @@ -1148,17 +1158,43 @@ public class GlyphView extends View implements TabableView, Cloneable { /** * Determine the span the glyphs given a start location * (for tab expansion). + * @param v the {@code GlyphView} + * @param p0 the beginning position + * @param p1 the ending position + * @param e how to expand the tabs when encountered + * @param x the X coordinate + * @return the span the glyphs given a start location */ public abstract float getSpan(GlyphView v, int p0, int p1, TabExpander e, float x); + /** + * Returns of the height. + * @param v the {@code GlyphView} + * @return of the height + */ public abstract float getHeight(GlyphView v); + /** + * Returns of the ascent. + * @param v the {@code GlyphView} + * @return of the ascent + */ public abstract float getAscent(GlyphView v); + /** + * Returns of the descent. + * @param v the {@code GlyphView} + * @return of the descent + */ public abstract float getDescent(GlyphView v); /** * Paint the glyphs representing the given range. + * @param v the {@code GlyphView} + * @param g the graphics context + * @param a the current allocation of the view + * @param p0 the beginning position + * @param p1 the ending position */ public abstract void paint(GlyphView v, Graphics g, Shape a, int p0, int p1); @@ -1231,6 +1267,7 @@ public class GlyphView extends View implements TabableView, Cloneable { * @param v the GlyphView to provide a painter for * @param p0 the starting document offset >= 0 * @param p1 the ending document offset >= p0 + * @return a painter to use for the given GlyphView */ public GlyphPainter getPainter(GlyphView v, int p0, int p1) { return this; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/Highlighter.java b/jdk/src/java.desktop/share/classes/javax/swing/text/Highlighter.java index 4407ebd4185..10243f10cdd 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/Highlighter.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/Highlighter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -124,6 +124,9 @@ public interface Highlighter { } + /** + * A highlight. + */ public interface Highlight { /** @@ -148,5 +151,4 @@ public interface Highlighter { public HighlightPainter getPainter(); } - }; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java index 63c27ce1ecb..2f0a3f5be93 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -535,6 +535,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A * Sets the NavigationFilter. NavigationFilter * is used by DefaultCaret and the default cursor movement * actions as a way to restrict the cursor movement. + * @param filter the filter * * @since 1.4 */ diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/LabelView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/LabelView.java index b248f95be38..752a19d88d4 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/LabelView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/LabelView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -161,6 +161,7 @@ public class LabelView extends GlyphView implements TabableView { /** * Fetches the FontMetrics used for this view. + * @return the FontMetrics used for this view * @deprecated FontMetrics are not used for glyph rendering * when running in the JDK. */ diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java b/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java index 2534aa3bffd..a3ee23e214e 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,6 +56,15 @@ public abstract class LayeredHighlighter implements Highlighter { * Layered highlight renderer. */ static public abstract class LayerPainter implements Highlighter.HighlightPainter { + /** + * @return a shape + * @param g Graphics used to draw + * @param p0 starting offset of view + * @param p1 ending offset of view + * @param viewBounds Bounds of View + * @param editor JTextComponent + * @param view View instance being rendered + */ public abstract Shape paintLayer(Graphics g, int p0, int p1, Shape viewBounds,JTextComponent editor, View view); diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/LayoutQueue.java b/jdk/src/java.desktop/share/classes/javax/swing/text/LayoutQueue.java index c4ba1c0ba06..625aff929d1 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/LayoutQueue.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/LayoutQueue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,6 +50,7 @@ public class LayoutQueue { /** * Fetch the default layout queue. + * @return the default layout queue */ public static LayoutQueue getDefaultQueue() { AppContext ac = AppContext.getAppContext(); @@ -77,6 +78,7 @@ public class LayoutQueue { /** * Add a task that is not needed immediately because * the results are not believed to be visible. + * @param task the task to add to the queue */ public synchronized void addTask(Runnable task) { if (worker == null) { @@ -88,7 +90,8 @@ public class LayoutQueue { } /** - * Used by the worker thread to get a new task to execute + * Used by the worker thread to get a new task to execute. + * @return a task from the queue */ protected synchronized Runnable waitForWork() { while (tasks.size() == 0) { diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java b/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java index 9c78ff83b88..670599f917a 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -199,7 +199,7 @@ public class MaskFormatter extends DefaultFormatter { * Creates a MaskFormatter with the specified mask. * A ParseException * will be thrown if mask is an invalid mask. - * + * @param mask the mask * @throws ParseException if mask does not contain valid mask characters */ public MaskFormatter(String mask) throws ParseException { @@ -211,6 +211,7 @@ public class MaskFormatter extends DefaultFormatter { * Sets the mask dictating the legal characters. * This will throw a ParseException if mask is * not valid. + * @param mask the mask * * @throws ParseException if mask does not contain valid mask characters */ diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java index efc462bcfdb..b42b04997d4 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -246,6 +246,7 @@ public class ParagraphView extends FlowView implements TabExpander { * rowIndex gives the index of the view that corresponds * that should be looked in. * @param pos position into the model + * @param b the bias * @param a the allocated region to render into * @param direction one of the following values: * + * @param biasRet the returned bias * @return the location within the model that best represents the next * location visual position * @exception BadLocationException the given position is not a valid @@ -662,6 +666,7 @@ public abstract class View implements SwingConstants { * @param x the X coordinate >= 0 * @param y the Y coordinate >= 0 * @param a the allocated region in which to render + * @param biasReturn the returned bias * @return the location within the model that best represents the * given point in the view >= 0. The biasReturn * argument will be @@ -864,6 +869,7 @@ public abstract class View implements SwingConstants { * for the purpose of rendering or layout, and should always * access them through the AttributeSet returned * by this method. + * @return the attributes to use when rendering */ public AttributeSet getAttributes() { return elem.getAttributes(); @@ -1026,6 +1032,10 @@ public abstract class View implements SwingConstants { * Returns the tooltip text at the specified location. The default * implementation returns the value from the child View identified by * the passed in location. + * @param x the x coordinate + * @param y the y coordinate + * @param allocation current allocation of the View. + * @return the tooltip text at the specified location * * @since 1.4 * @see JTextComponent#getToolTipText diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java index 52e675ca29e..97ef0fe06eb 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -228,6 +228,9 @@ public class WrappedPlainView extends BoxView implements TabExpander { * It will either break at word or character boundaries * depending upon the break argument given at * construction. + * @param p0 the starting document location + * @param p1 the ending document location to use + * @return the break position */ protected int calculateBreakPosition(int p0, int p1) { int p; diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/ZoneView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/ZoneView.java index c8248276c79..374d960f6e3 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/ZoneView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ZoneView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -94,6 +94,7 @@ public class ZoneView extends BoxView { /** * Get the current maximum zone size. + * @return the current maximum zone size */ public int getMaximumZoneSize() { return maxZoneSize; @@ -117,6 +118,8 @@ public class ZoneView extends BoxView { /** * Get the current setting of the number of zones * allowed to be loaded at the same time. + * @return current setting of the number of zones + * allowed to be loaded at the same time */ public int getMaxZonesLoaded() { return maxZonesLoaded; @@ -184,6 +187,9 @@ public class ZoneView extends BoxView { * child elements of the element this view is responsible for. * Therefore, the default implementation is to return * true if the view has children. + * param zone the child view + * @param zone the zone + * @return whether or not the zone is in the loaded state. */ protected boolean isZoneLoaded(View zone) { return (zone.getViewCount() > 0); @@ -203,6 +209,8 @@ public class ZoneView extends BoxView { * @param p1 the end of the desired zone. This should * be > getStartOffset() and <= getEndOffset(). This * value should also be > p0. + * @return a view to represent a zone for the given range within + * the model */ protected View createZone(int p0, int p1) { Document doc = getDocument();