use of org.loboevolution.html.node.Document in project LoboEvolution by LoboEvolution.
the class HTMLTableRowElementImpl method insertCell.
/**
* {@inheritDoc}
*/
@Override
public HTMLTableCellElement insertCell() {
final Document doc = this.document;
if (doc == null) {
throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "Orphan element");
}
HTMLTableCellElementImpl cellElement = (HTMLTableCellElementImpl) doc.createElement("TD");
appendChild(cellElement);
return cellElement;
}
use of org.loboevolution.html.node.Document in project LoboEvolution by LoboEvolution.
the class HTMLTableElementImpl method createTFoot.
/**
* {@inheritDoc}
*/
@Override
public HTMLElement createTFoot() {
final Document doc = this.document;
if (doc == null)
return null;
HTMLElement newChild = (HTMLElement) doc.createElement("tfoot");
appendChild(newChild);
return newChild;
}
use of org.loboevolution.html.node.Document in project LoboEvolution by LoboEvolution.
the class HTMLTableElementImpl method insertRow.
/**
* {@inheritDoc}
*/
@Override
public HTMLTableRowElement insertRow() {
final Document doc = this.document;
if (doc == null) {
throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "Orphan element");
}
final HTMLTableRowElement rowElement = (HTMLTableRowElement) doc.createElement("TR");
appendChild(rowElement);
return rowElement;
}
use of org.loboevolution.html.node.Document in project LoboEvolution by LoboEvolution.
the class LocationImpl method setHref.
/**
* {@inheritDoc}
*
* <p>
* setHref.
* </p>
*/
public void setHref(String uri) {
final HtmlRendererContext rcontext = this.window.getHtmlRendererContext();
if (rcontext != null) {
try {
URL url;
final Document document = this.window.getDocumentNode();
if (document instanceof HTMLDocumentImpl) {
final HTMLDocumentImpl docImpl = (HTMLDocumentImpl) document;
url = docImpl.getFullURL(uri);
} else {
url = new URL(uri);
}
rcontext.navigate(url, this.target);
} catch (final java.net.MalformedURLException mfu) {
logger.log(Level.WARNING, "setHref(): Malformed location: [" + uri + "].", mfu);
}
}
}
use of org.loboevolution.html.node.Document in project LoboEvolution by LoboEvolution.
the class LocationImpl method reload.
/**
* <p>
* reload.
* </p>
*/
public void reload() {
// TODO: This is not really reload.
final Document document = this.window.getDocumentNode();
if (document instanceof HTMLDocumentImpl) {
final HTMLDocumentImpl docImpl = (HTMLDocumentImpl) document;
final HtmlRendererContext rcontext = docImpl.getHtmlRendererContext();
if (rcontext != null) {
rcontext.reload();
} else {
docImpl.warn("reload(): No renderer context in Location's document.");
}
}
}
Aggregations