/** * Adds an <CODE>Element</CODE> to the <CODE>Paragraph</CODE>. * * @param o the element to add. * @return true is adding the object succeeded */ @Override public boolean add(Element o) { if (o instanceof List) { List list = (List) o; list.setIndentationLeft(list.getIndentationLeft() + indentationLeft); list.setIndentationRight(indentationRight); return super.add(list); } else if (o instanceof Image) { super.addSpecial(o); return true; } else if (o instanceof Paragraph) { super.addSpecial(o); return true; } return super.add(o); }
/** * Adds an <CODE>Element</CODE> to the <CODE>Paragraph</CODE>. * * @param o the element to add. * @return true is adding the object succeeded */ @Override public boolean add(Element o) { if (o instanceof List) { List list = (List) o; list.setIndentationLeft(list.getIndentationLeft() + indentationLeft); list.setIndentationRight(indentationRight); return super.add(list); } else if (o instanceof Image) { super.addSpecial(o); return true; } else if (o instanceof Paragraph) { super.addSpecial(o); return true; } return super.add(o); }