Skip to content

Commit 7921ca2

Browse files
committed
improved jdoc
1 parent c47aeb7 commit 7921ca2

5 files changed

Lines changed: 69 additions & 27 deletions

File tree

src/main/java/org/htmlunit/html/DomElement.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
import org.xml.sax.SAXException;
6868

6969
/**
70+
* A DOM element in an HTML or XML document.
71+
*
7072
* @author Ahmed Ashour
7173
* @author Marc Guillemot
7274
* @author Tom Anderson

src/main/java/org/htmlunit/html/DomNode.java

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,8 @@ public void moveBefore(final DomNode movedDomNode) {
14061406
}
14071407

14081408
/**
1409+
* Returns an iterable over the children of this node.
1410+
*
14091411
* @return an {@link Iterable} over the children of this node
14101412
*/
14111413
public final Iterable<DomNode> getChildren() {
@@ -1525,7 +1527,9 @@ public void remove() {
15251527
}
15261528

15271529
/**
1528-
* @return the next node, if there is one
1530+
* Returns the next node in the iteration.
1531+
*
1532+
* @return the next node, or {@code null} if there are no more nodes
15291533
*/
15301534
public DomNode nextNode() {
15311535
currentNode_ = nextNode_;
@@ -1601,7 +1605,9 @@ public void remove() {
16011605
}
16021606

16031607
/**
1604-
* @return the next node, if there is one
1608+
* Returns the next node in the iteration.
1609+
*
1610+
* @return the next node, or {@code null} if there are no more nodes
16051611
*/
16061612
@SuppressWarnings("unchecked")
16071613
public T nextNode() {
@@ -2140,8 +2146,12 @@ public DomElement getNextElementSibling() {
21402146
}
21412147

21422148
/**
2143-
* @param selectorString the selector to test
2144-
* @return the selected {@link DomElement} or null.
2149+
* Returns the closest ancestor element, or this element, that matches the
2150+
* specified CSS selector.
2151+
*
2152+
* @param selectorString the CSS selector to test
2153+
* @return the closest matching {@link DomElement}, or {@code null} if no
2154+
* matching element is found
21452155
*/
21462156
public DomElement closest(final String selectorString) {
21472157
try {

src/main/java/org/htmlunit/html/HtmlForm.java

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -551,12 +551,13 @@ private <E extends HtmlElement> List<E> getFormElementsByAttribute(
551551
}
552552

553553
/**
554-
* @return A List containing all form controls in the form.
555-
* The form controls in the returned collection are in the same order
556-
* in which they appear in the form by following a preorder,
557-
* depth-first traversal of the tree. This is called tree order.
558-
* Only the following elements are returned:
559-
* button, fieldset, input, object, output, select, textarea.
554+
* Returns the form controls contained in this form.
555+
*
556+
* @return a list containing all form controls in tree order (preorder,
557+
* depth-first traversal). Only the following elements are
558+
* included: {@code button}, {@code fieldset}, {@code input},
559+
* {@code object}, {@code output}, {@code select}, and
560+
* {@code textarea}
560561
*/
561562
public List<HtmlElement> getFormElements() {
562563
return getElements(htmlElement -> {
@@ -601,8 +602,10 @@ public List<HtmlElement> getElementsJS() {
601602
}
602603

603604
/**
604-
* @param filter a predicate to filter the element
605-
* @return all elements attached to this form and matching the filter predicate
605+
* Returns the form elements that match the specified filter.
606+
*
607+
* @param filter the predicate used to select elements
608+
* @return a list of form elements matching the specified filter
606609
*/
607610
public List<HtmlElement> getElements(final Predicate<HtmlElement> filter) {
608611
final List<HtmlElement> elements = new ArrayList<>();
@@ -994,7 +997,9 @@ protected boolean isEmptyXmlTagExpanded() {
994997
}
995998

996999
/**
997-
* @return the value of the attribute {@code novalidate} or an empty string if that attribute isn't defined
1000+
* Returns whether form validation is disabled.
1001+
*
1002+
* @return {@code true} if the {@code novalidate} attribute is present
9981003
*/
9991004
public final boolean isNoValidate() {
10001005
return hasAttribute(ATTRIBUTE_NOVALIDATE);

src/main/java/org/htmlunit/html/HtmlImage.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,10 @@ public int getWidthOrDefault() {
608608
}
609609

610610
/**
611-
* @return the {@link ImageData} of this image
612-
* @throws IOException in case of error
611+
* Returns the image data for this image.
612+
*
613+
* @return the {@link ImageData} for this image
614+
* @throws IOException if an I/O error occurs while reading the image
613615
*/
614616
public ImageData getImageData() throws IOException {
615617
readImageIfNeeded();
@@ -804,7 +806,10 @@ public DisplayStyle getDefaultStyleDisplay() {
804806
}
805807

806808
/**
807-
* @return true if the image was successfully downloaded
809+
* Returns whether this image has finished loading.
810+
*
811+
* @return {@code true} if the image has finished loading or has no
812+
* {@code src} attribute
808813
*/
809814
public boolean isComplete() {
810815
return isComplete_ || ATTRIBUTE_NOT_DEFINED == getSrcAttribute();

src/main/java/org/htmlunit/javascript/host/event/PointerEvent.java

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,71 +151,87 @@ public PointerEvent(final DomNode domNode, final String type, final boolean shif
151151
}
152152

153153
/**
154-
* @return the pointerId
154+
* Returns the pointer identifier.
155+
*
156+
* @return the pointer identifier
155157
*/
156158
@JsxGetter
157159
public long getPointerId() {
158160
return pointerId_;
159161
}
160162

161163
/**
162-
* @return the width
164+
* Returns the pointer contact width.
165+
*
166+
* @return the pointer contact width
163167
*/
164168
@JsxGetter
165169
public long getWidth() {
166170
return width_;
167171
}
168172

169173
/**
170-
* @return the height
174+
* Returns the pointer contact height.
175+
*
176+
* @return the pointer contact height
171177
*/
172178
@JsxGetter
173179
public long getHeight() {
174180
return height_;
175181
}
176182

177183
/**
178-
* @return the pressure
184+
* Returns the normalized pointer pressure.
185+
*
186+
* @return the normalized pointer pressure
179187
*/
180188
@JsxGetter
181189
public double getPressure() {
182190
return pressure_;
183191
}
184192

185193
/**
186-
* @return the tiltX
194+
* Returns the pointer tilt along the X axis.
195+
*
196+
* @return the pointer tilt along the X axis
187197
*/
188198
@JsxGetter
189199
public long getTiltX() {
190200
return tiltX_;
191201
}
192202

193203
/**
194-
* @return the tiltY
204+
* Returns the pointer tilt along the Y axis.
205+
*
206+
* @return the pointer tilt along the Y axis
195207
*/
196208
@JsxGetter
197209
public long getTiltY() {
198210
return tiltY_;
199211
}
200212

201213
/**
202-
* @return the pointerType
214+
* Returns the pointer type.
215+
*
216+
* @return the pointer type
203217
*/
204218
@JsxGetter
205219
public String getPointerType() {
206220
return pointerType_;
207221
}
208222

209223
/**
210-
* @return the isPrimary
224+
* @return whether this is the primary pointer
211225
*/
212226
@JsxGetter(propertyName = "isPrimary")
213227
public boolean isPrimary_js() {
214228
return isPrimary_;
215229
}
216230

217231
/**
218-
* @return the pointerType
232+
* Returns the pointer altitude angle.
233+
*
234+
* @return the pointer altitude angle
219235
*/
220236
@JsxGetter
221237
@SuppressWarnings("PMD.UseUnderscoresInNumericLiterals")
@@ -224,15 +240,19 @@ public double getAltitudeAngle() {
224240
}
225241

226242
/**
227-
* @return the pointerType
243+
* Returns the pointer azimuth angle.
244+
*
245+
* @return the pointer azimuth angle
228246
*/
229247
@JsxGetter
230248
public double getAzimuthAngle() {
231249
return azimuthAngle_;
232250
}
233251

234252
/**
235-
* @return the persistentDeviceId
253+
* Returns the persistent device identifier.
254+
*
255+
* @return the persistent device identifier
236256
*/
237257
@JsxGetter({CHROME, EDGE, FF})
238258
public double getPersistentDeviceId() {

0 commit comments

Comments
 (0)