--- a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
*
* 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
- * <code>java.util.EventListener</code>
+ * @param <T> the listener type
+ * @param listenerType the type of listeners requested
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s on this component,
* or an empty array if no such
@@ -905,6 +904,8 @@
* 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;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
/**
* Returns the first offset to be output.
- *
+ * @return the first offset to be output
* @since 1.3
*/
public int getStartOffset() {
@@ -195,7 +195,7 @@
/**
* Returns the last offset to be output.
- *
+ * @return the last offset to be output
* @since 1.3
*/
public int getEndOffset() {
@@ -213,7 +213,7 @@
/**
* 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 @@
* 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 @@
/**
* Returns the maximum line length.
- *
+ * @return the maximum line length
* @since 1.3
*/
protected int getLineLength() {
@@ -323,7 +326,7 @@
/**
* Sets the current line length.
- *
+ * @param length the new line length
* @since 1.3
*/
protected void setCurrentLineLength(int length) {
@@ -333,7 +336,7 @@
/**
* Returns the current line length.
- *
+ * @return the current line length
* @since 1.3
*/
protected int getCurrentLineLength() {
@@ -344,7 +347,7 @@
* Returns true if the current line should be considered empty. This
* is true when <code>getCurrentLineLength</code> == 0 ||
* <code>indent</code> 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 @@
* 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 @@
/**
* 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 @@
/**
* Returns the amount of space to indent.
- *
+ * @return the amount of space to indent
* @since 1.3
*/
protected int getIndentSpace() {
@@ -396,7 +399,7 @@
* 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 @@
/**
* Returns the string used to represent newlines.
- *
+ * @return the string used to represent newlines
* @since 1.3
*/
public String getLineSeparator() {
@@ -446,7 +449,7 @@
* Returns the current indentation level. That is, the number of times
* <code>incrIndent</code> has been invoked minus the number of times
* <code>decrIndent</code> has been invoked.
- *
+ * @return the current indentation level
* @since 1.3
*/
protected int getIndentLevel() {
@@ -514,7 +517,7 @@
/**
* Writes the line separator. This invokes <code>output</code> directly
* as well as setting the <code>lineLength</code> to 0.
- *
+ * @throws IOException on any I/O error
* @since 1.3
*/
protected void writeLineSeparator() throws IOException {
@@ -539,6 +542,10 @@
* and won't fit in which case the line length will exceed
* <code>getLineLength</code>.
*
+ * @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 @@
* <code>writeLineSeparator</code> 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)
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AsyncBoxView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* 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 @@
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
*
* @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 @@
* 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 @@
/**
* Is the major span currently estimated?
+ * @return whether or not the major span currently estimated
*
* @since 1.4
*/
@@ -194,6 +203,8 @@
*
* @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 @@
/**
* Fetch the queue to use for layout.
+ * @return the queue to use for layout
*/
protected LayoutQueue getLayoutQueue() {
return LayoutQueue.getDefaultQueue();
@@ -214,7 +226,9 @@
/**
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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 @@
/**
* 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 @@
* 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 @@
* Fetch the allocation to use for a child view.
* <em>This does not update the offsets in the ChildState
* records.</em>
+ * @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 @@
* 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 @@
* 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 @@
* 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 @@
}
/**
- * 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
* 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 @@
/**
* Has the child view been laid out.
+ * @return whether or not the child view been laid out.
*/
public boolean isLayoutValid() {
return (minorValid && majorValid && childSizeValid);
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/BoxView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/BoxView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
/**
* Determines if the layout is valid along the given axis.
+ * @return if the layout is valid along the given axis
*
* @param axis either <code>View.X_AXIS</code> or <code>View.Y_AXIS</code>
*
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/ChangedCharSetException.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ChangedCharSetException.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
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;
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/ComponentView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ComponentView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* 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 @@
/**
* Fetch the component associated with the view.
+ * @return the component associated with the view
*/
public final Component getComponent() {
return createdC;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* <pre>ChangeListener[] cls = (ChangeListener[])(c.getListeners(ChangeListener.class));</pre>
*
* 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
- * <code>java.util.EventListener</code>
+ * @param <T> the listener type
+ * @param listenerType the type of listeners requested
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s on this component,
* or an empty array if no such
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultFormatterFactory.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultFormatterFactory.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
private JFormattedTextField.AbstractFormatter nullFormat;
+ /**
+ * Constructs a {@code DefaultFormatterFactory}.
+ */
public DefaultFormatterFactory() {
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* (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;
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* 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 {
@@ -1104,6 +1105,9 @@
*/
public static final int BUFFER_SIZE_DEFAULT = 4096;
+ /**
+ * The element buffer.
+ */
protected ElementBuffer buffer;
/** Styles listening to. */
@@ -2524,6 +2528,12 @@
* 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 @@
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;
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/FlowView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/FlowView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* rows are tiled (the axis of the default flow
* rows themselves). This is typically used
* by the <code>FlowStrategy</code>.
+ * @return the axis along which views should be
+ * flowed
*/
public int getFlowAxis() {
if (getAxis() == Y_AXIS) {
@@ -89,6 +91,8 @@
*
* @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 @@
* @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 @@
* 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 @@
* 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 @@
* 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 @@
/**
* 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 @@
* 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 @@
* 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 @@
* @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
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* 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,
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* 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 @@
/**
* 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 @@
* be returned. This is implemented to call
* <code>StyledDocument.getBackground</code> 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 @@
* 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 @@
* 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 @@
/**
* 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 @@
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
/**
* 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 @@
* @param v the <code>GlyphView</code> 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;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/Highlighter.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/Highlighter.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
}
+ /**
+ * A highlight.
+ */
public interface Highlight {
/**
@@ -148,5 +151,4 @@
public HighlightPainter getPainter();
}
-
};
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* Sets the <code>NavigationFilter</code>. <code>NavigationFilter</code>
* is used by <code>DefaultCaret</code> and the default cursor movement
* actions as a way to restrict the cursor movement.
+ * @param filter the filter
*
* @since 1.4
*/
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/LabelView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/LabelView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
/**
* Fetches the <code>FontMetrics</code> used for this view.
+ * @return the <code>FontMetrics</code> used for this view
* @deprecated FontMetrics are not used for glyph rendering
* when running in the JDK.
*/
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* 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);
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/LayoutQueue.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/LayoutQueue.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
/**
* Fetch the default layout queue.
+ * @return the default layout queue
*/
public static LayoutQueue getDefaultQueue() {
AppContext ac = AppContext.getAppContext();
@@ -77,6 +78,7 @@
/**
* 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 @@
}
/**
- * 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) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* Creates a <code>MaskFormatter</code> with the specified mask.
* A <code>ParseException</code>
* will be thrown if <code>mask</code> 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 @@
* Sets the mask dictating the legal characters.
* This will throw a <code>ParseException</code> if <code>mask</code> is
* not valid.
+ * @param mask the mask
*
* @throws ParseException if mask does not contain valid mask characters
*/
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* <code>rowIndex</code> 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:
* <ul>
@@ -256,6 +257,7 @@
* in this method
* @param rowIndex the index of the view
* @param x the x coordinate of interest
+ * @throws BadLocationException if a bad location is encountered
* @return the closest model position to <code>x</code>
*/
// NOTE: This will not properly work if ParagraphView contains
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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
@@ -520,6 +520,9 @@
* view. The longest line is checked to see if it has
* changed.
*
+ * @param changes the change information from the associated document
+ * @param a the current allocation of the view
+ * @param f the factory to use to rebuild if the view has children
* @since 1.4
*/
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) {
@@ -608,6 +611,7 @@
* @param a the region allocated for the view to render into
* @param line the line number to find the region of. This must
* be a valid line number in the model.
+ * @return the rectangle that represents the given line
* @since 1.4
*/
protected Rectangle lineToRect(Shape a, int line) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/StyleContext.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/StyleContext.java Tue Apr 14 15:43:14 2015 -0700
@@ -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
@@ -479,9 +479,9 @@
* behavior of SmallAttributeSet. This can be reimplemented
* to return an AttributeSet that provides some sort of
* attribute conversion.
- *
* @param a The set of attributes to be represented in the
* the compact form.
+ * @return a compact set of attributes that might be shared
*/
protected SmallAttributeSet createSmallAttributeSet(AttributeSet a) {
return new SmallAttributeSet(a);
@@ -498,6 +498,8 @@
*
* @param a The set of attributes to be represented in the
* the larger form.
+ * @return a large set of attributes that should trade off
+ * space for time
*/
protected MutableAttributeSet createLargeAttributeSet(AttributeSet a) {
return new SimpleAttributeSet(a);
@@ -558,6 +560,9 @@
/**
* Context-specific handling of writing out attributes
+ * @param out the output stream
+ * @param a the attribute set
+ * @exception IOException on any I/O error
*/
public void writeAttributes(ObjectOutputStream out,
AttributeSet a) throws IOException {
@@ -566,6 +571,13 @@
/**
* Context-specific handling of reading in attributes
+ * @param in the object stream to read the attribute data from.
+ * @param a the attribute set to place the attribute
+ * definitions in.
+ * @exception ClassNotFoundException passed upward if encountered
+ * when reading the object stream.
+ * @exception IOException passed upward if encountered when
+ * reading the object stream.
*/
public void readAttributes(ObjectInputStream in,
MutableAttributeSet a) throws ClassNotFoundException, IOException {
@@ -685,6 +697,9 @@
/**
* Returns the object previously registered with
* <code>registerStaticAttributeKey</code>.
+ * @param key the object key
+ * @return Returns the object previously registered with
+ * {@code registerStaticAttributeKey}
*/
public static Object getStaticAttribute(Object key) {
if (thawKeyMap == null || key == null) {
@@ -694,9 +709,11 @@
}
/**
- * Returns the String that <code>key</code> will be registered with
+ * Returns the String that <code>key</code> will be registered with.
* @see #getStaticAttribute
* @see #registerStaticAttributeKey
+ * @param key the object key
+ * @return the String that {@code key} will be registered with
*/
public static Object getStaticAttributeKey(Object key) {
return key.getClass().getName() + "." + key.toString();
@@ -772,11 +789,19 @@
*/
public class SmallAttributeSet implements AttributeSet {
+ /**
+ * Constructs a SmallAttributeSet.
+ * @param attributes the attributes
+ */
public SmallAttributeSet(Object[] attributes) {
this.attributes = attributes;
updateResolveParent();
}
+ /**
+ * Constructs a SmallAttributeSet.
+ * @param attrs the attributes
+ */
public SmallAttributeSet(AttributeSet attrs) {
int n = attrs.getAttributeCount();
Object[] tbl = new Object[2 * n];
@@ -818,7 +843,8 @@
// --- Object methods -------------------------
/**
- * Returns a string showing the key/value pairs
+ * Returns a string showing the key/value pairs.
+ * @return a string showing the key/value pairs
*/
public String toString() {
String s = "{";
@@ -1382,7 +1408,8 @@
/**
* Return an array of all the listeners of the given type that
* were added to this model.
- *
+ * @param <T> the listener type
+ * @param listenerType the type of listeners requested
* @return all of the objects receiving <em>listenerType</em> notifications
* from this model
*
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/StyledEditorKit.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/StyledEditorKit.java Tue Apr 14 15:43:14 2015 -0700
@@ -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
@@ -288,6 +288,8 @@
* are in <code>set</code>.<p>
* This is called anytime the caret moves over a different location.
*
+ * @param element the element
+ * @param set the attributes
*/
protected void createInputAttributes(Element element,
MutableAttributeSet set) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/TabSet.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/TabSet.java Tue Apr 14 15:43:14 2015 -0700
@@ -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
@@ -58,6 +58,7 @@
/**
* Creates and returns an instance of TabSet. The array of Tabs
* passed in must be sorted in ascending order.
+ * @param tabs the TabStops to initialize the TabSet
*/
public TabSet(TabStop[] tabs) {
// PENDING(sky): If this becomes a problem, make it sort.
@@ -73,6 +74,7 @@
/**
* Returns the number of Tab instances the receiver contains.
+ * @return the number of Tab instances the receiver contains
*/
public int getTabCount() {
return (tabs == null) ? 0 : tabs.length;
@@ -82,6 +84,8 @@
* Returns the TabStop at index <code>index</code>. This will throw an
* IllegalArgumentException if <code>index</code> is outside the range
* of tabs.
+ * @param index which TapStop to return
+ * @return the TabStop at index {@code index}
*/
public TabStop getTab(int index) {
int numTabs = getTabCount();
@@ -95,6 +99,8 @@
/**
* Returns the Tab instance after <code>location</code>. This will
* return null if there are no tabs after <code>location</code>.
+ * @param location location to find a Tab after
+ * @return the Tab instance after {@code location}
*/
public TabStop getTabAfter(float location) {
int index = getTabIndexAfter(location);
@@ -103,6 +109,9 @@
}
/**
+ * Returns the index of the TabStop <code>tab</code>, or -1 if
+ * <code>tab</code> is not contained in the receiver.
+ * @param tab the TabStop to find
* @return the index of the TabStop <code>tab</code>, or -1 if
* <code>tab</code> is not contained in the receiver.
*/
@@ -117,6 +126,8 @@
/**
* Returns the index of the Tab to be used after <code>location</code>.
* This will return -1 if there are no tabs after <code>location</code>.
+ * @param location location to find a Tab after
+ * @return the index of the Tab to be used after <code>location</code>
*/
public int getTabIndexAfter(float location) {
int current, min, max;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/TabStop.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/TabStop.java Tue Apr 14 15:43:14 2015 -0700
@@ -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
@@ -59,6 +59,7 @@
* RIGHT_TAB, just includes decimal as additional character to look for.
*/
public static final int ALIGN_DECIMAL = 4;
+ /** Align bar */
public static final int ALIGN_BAR = 5;
/* Bar tabs (whatever they are) are actually a separate kind of tab
@@ -66,11 +67,17 @@
properties are mutually exclusive, so the reader treats barness
as being a kind of alignment. */
+ /** Lead none */
public static final int LEAD_NONE = 0;
+ /** Lead dots */
public static final int LEAD_DOTS = 1;
+ /** Lead hyphens */
public static final int LEAD_HYPHENS = 2;
+ /** Lead underline */
public static final int LEAD_UNDERLINE = 3;
+ /** Lead thickline */
public static final int LEAD_THICKLINE = 4;
+ /** Lead equals */
public static final int LEAD_EQUALS = 5;
/** Tab type. */
@@ -82,6 +89,7 @@
/**
* Creates a tab at position <code>pos</code> with a default alignment
* and default leader.
+ * @param pos position of the tab
*/
public TabStop(float pos) {
this(pos, ALIGN_LEFT, LEAD_NONE);
@@ -90,6 +98,9 @@
/**
* Creates a tab with the specified position <code>pos</code>,
* alignment <code>align</code> and leader <code>leader</code>.
+ * @param pos position of the tab
+ * @param align alignment of the tab
+ * @param leader leader of the tab
*/
public TabStop(float pos, int align, int leader) {
alignment = align;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/Utilities.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/Utilities.java Tue Apr 14 15:43:14 2015 -0700
@@ -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
@@ -311,6 +311,23 @@
justificationData);
}
+ /**
+ * Determines the relative offset into the given text that
+ * best represents the given span in the view coordinate
+ * system.
+ *
+ * @param s the source of the text
+ * @param metrics the font metrics to use for the calculation
+ * @param x0 the starting view location representing the start
+ * of the given text >= 0.
+ * @param x the target view location to translate to an
+ * offset into the text >= 0.
+ * @param e how to expand the tabs. If this value is null,
+ * tabs will be expanded as a space character.
+ * @param startOffset starting offset of the text in the document >= 0
+ * @param round whether or not to round
+ * @return the offset into the text >= 0
+ */
public static final int getTabbedTextOffset(Segment s,
FontMetrics metrics,
int x0, int x, TabExpander e,
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/View.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/View.java Tue Apr 14 15:43:14 2015 -0700
@@ -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
@@ -381,6 +381,7 @@
/**
* Removes one of the children at the given position.
* This is a convenience call to <code>replace</code>.
+ * @param i the position
* @since 1.3
*/
public void remove(int i) {
@@ -444,6 +445,7 @@
* position.
*
* @param pos the position >= 0
+ * @param b the bias
* @return index of the view representing the given position, or
* -1 if no view represents that position
* @since 1.3
@@ -480,6 +482,7 @@
* the {@code BadLocationException} will be thrown.
*
* @param pos the position to convert
+ * @param b the bias
* @param a the allocated region in which to render
* @param direction the direction from the current position that can
* be thought of as the arrow keys typically found on a keyboard.
@@ -490,6 +493,7 @@
* <li>SwingConstants.NORTH
* <li>SwingConstants.SOUTH
* </ul>
+ * @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 @@
* @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 <code>biasReturn</code>
* argument will be
@@ -864,6 +869,7 @@
* for the purpose of rendering or layout, and should always
* access them through the <code>AttributeSet</code> returned
* by this method.
+ * @return the attributes to use when rendering
*/
public AttributeSet getAttributes() {
return elem.getAttributes();
@@ -1026,6 +1032,10 @@
* 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
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
* 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;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/ZoneView.java Tue Apr 14 14:47:12 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ZoneView.java Tue Apr 14 15:43:14 2015 -0700
@@ -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 @@
/**
* Get the current maximum zone size.
+ * @return the current maximum zone size
*/
public int getMaximumZoneSize() {
return maxZoneSize;
@@ -117,6 +118,8 @@
/**
* 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 @@
* 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 @@
* @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();