Sets the text for this HtmlOption. @param text the text
(final String text)
| 302 | * @param text the text |
| 303 | */ |
| 304 | public void setText(final String text) { |
| 305 | if (text == null || text.isEmpty()) { |
| 306 | removeAllChildren(); |
| 307 | } |
| 308 | else { |
| 309 | final DomNode child = getFirstChild(); |
| 310 | if (child == null) { |
| 311 | appendChild(new DomText(getPage(), text)); |
| 312 | } |
| 313 | else { |
| 314 | child.setNodeValue(text); |
| 315 | } |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | /** |
| 320 | * Gets the text. |
nothing calls this directly
no test coverage detected