本文整理汇总了Java中nu.xom.ParentNode.removeChild方法的典型用法代码示例。如果您正苦于以下问题:Java ParentNode.removeChild方法的具体用法?Java ParentNode.removeChild怎么用?Java ParentNode.removeChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nu.xom.ParentNode
的用法示例。
在下文中一共展示了ParentNode.removeChild方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeAllChildren
import nu.xom.ParentNode; //导入方法依赖的package包/类
public Node removeAllChildren(Node pNode)
throws ExInternal
{
mDocControl.setDocumentModifiedCount();
ParentNode lNodeAsParent = (ParentNode) pNode;
//This is a LIVE list so pop nodes off the start until it is empty.
while(lNodeAsParent.getChildCount() > 0){
Node lChild = lNodeAsParent.getChild(0);
if(lChild instanceof Element){
mDocControl.refIndexRemoveRecursive((Element) lChild);
}
lNodeAsParent.removeChild(0);
}
return pNode;
}
示例2: detachChildren
import nu.xom.ParentNode; //导入方法依赖的package包/类
@SafeVarargs
public static void detachChildren(@Nonnull final Nodes first,
@Nonnull final Nodes... remainder) {
Preconditions.checkNotNull(first, "first");
Preconditions.checkNotNull(remainder, "remainder");
for (int i = 0; i < first.size(); i++) {
Node child = first.get(i);
ParentNode parent = child.getParent();
if (parent == null)
continue;
parent.removeChild(child);
}
for (Nodes nodes : remainder) {
detachChildren(nodes);
}
}
示例3: removeDefectLog
import nu.xom.ParentNode; //导入方法依赖的package包/类
public static void removeDefectLog(DefectLog dl) {
try {
refresh();
ParentNode parent = dl.getElement().getParent();
parent.removeChild(dl.getElement());
}
catch (Exception ex) {
new ExceptionDialog(ex);
}
}
示例4: removeEstimate
import nu.xom.ParentNode; //导入方法依赖的package包/类
public static void removeEstimate(Estimate tl) {
try {
refresh();
ParentNode parent = tl.getElement().getParent();
parent.removeChild(tl.getElement());
} catch (Exception ex) {
new ExceptionDialog(ex);
}
}
示例5: removeTimelog
import nu.xom.ParentNode; //导入方法依赖的package包/类
public static void removeTimelog(TimeLog tl) {
try {
refresh();
ParentNode parent = tl.getElement().getParent();
parent.removeChild(tl.getElement());
}
catch (Exception ex) {
new ExceptionDialog(ex);
}
}
示例6: removeEvent
import nu.xom.ParentNode; //导入方法依赖的package包/类
public static void removeEvent(Event ev) {
ParentNode parent = ev.getContent().getParent();
parent.removeChild(ev.getContent());
}
示例7: removeEvent
import nu.xom.ParentNode; //导入方法依赖的package包/类
public static void removeEvent(Event ev) {
ParentNode parent = ev.getContent().getParent();
parent.removeChild(ev.getContent());
try {
EventIndexer.removeEvent(ev);
}
catch (Exception e) {
throw new RuntimeException ("cannot remove event from index", e);
}
}