MCPcopy Create free account
hub / github.com/apache/xmlgraphics-fop / removeChild

Method removeChild

fop-core/src/main/java/org/apache/fop/fo/FObj.java:298–322  ·  view source on GitHub ↗

{@inheritDoc}

(FONode child)

Source from the content-addressed store, hash-verified

296
297 /** {@inheritDoc} */
298 public void removeChild(FONode child) {
299 FONode nextChild = null;
300 if (child.siblings != null) {
301 nextChild = child.siblings[1];
302 }
303 if (child == firstChild) {
304 firstChild = nextChild;
305 if (firstChild != null) {
306 firstChild.siblings[0] = null;
307 }
308 } else if (child.siblings != null) {
309 FONode prevChild = child.siblings[0];
310 prevChild.siblings[1] = nextChild;
311 if (nextChild != null) {
312 nextChild.siblings[0] = prevChild;
313 }
314 }
315 if (child == lastChild) {
316 if (child.siblings != null) {
317 lastChild = child.siblings[0];
318 } else {
319 lastChild = null;
320 }
321 }
322 }
323
324 /**
325 * Find the nearest parent, grandparent, etc. FONode that is also an FObj

Callers 7

startElementMethod · 0.45
removeMethod · 0.45
removeMethod · 0.45
finalizeNodeMethod · 0.45
finalizeNodeMethod · 0.45
startElementMethod · 0.45
startElementMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected