/** * Sets the page this component belongs on. * Null to reset the page hierarchy for all children * <p> * * @param page * A Page * * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#setPage(Page) */ @Override @SuppressWarnings("unchecked") public J setPage(Page page) { this.page = page; getChildren().forEach(child -> child.setPage(page)); return (J) this; }
/** * Sets the page this component belongs on. * Null to reset the page hierarchy for all children * <p> * * @param page * A Page * * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#setPage(Page) */ @Override @SuppressWarnings("unchecked") public J setPage(Page page) { this.page = page; getChildren().forEach(child -> child.setPage(page)); return (J) this; }
/** * Sets the page this component belongs on. * Null to reset the page hierarchy for all children * <p> * * @param page * A Page * * @see com.jwebmp.core.base.interfaces.IComponentHierarchyBase#setPage(Page) */ @Override @SuppressWarnings("unchecked") public J setPage(Page page) { this.page = page; getChildren().forEach(child -> child.setPage(page)); return (J) this; }
/** * Add a new child to this component * <p> * * @param newChild * The child to be added * <p> * * @return The new child added */ @Override @SuppressWarnings("unchecked") @NotNull public J add(@NotNull C newChild) { newChild.setParent(this); newChild.setTiny(isTiny()); newChild.setPage(getPage()); getChildren().add(newChild); newChild.init(); newChild.preConfigure(); return (J) this; }
/** * Add a new child to this component * <p> * * @param newChild * The child to be added * <p> * * @return The new child added */ @Override @SuppressWarnings("unchecked") @NotNull public J add(@NotNull C newChild) { newChild.setParent(this); newChild.setTiny(isTiny()); newChild.setPage(getPage()); getChildren().add(newChild); newChild.init(); newChild.preConfigure(); return (J) this; }
/** * Add a new child to this component * <p> * * @param newChild * The child to be added * <p> * * @return The new child added */ @Override @SuppressWarnings("unchecked") @NotNull public J add(@NotNull C newChild) { newChild.setParent(this); newChild.setTiny(isTiny()); newChild.setPage(getPage()); getChildren().add(newChild); newChild.init(); newChild.preConfigure(); return (J) this; }