private <T extends Widget> T add0(T child) { if (this.ui != null) ((Widget) child).attach(this.ui); child.parent = this; child.link(); child.added(); if (((Widget) child).canfocus && child.visible) newfocusable(child); return (child); }
protected void attach(UI ui) { this.ui = ui; for (Widget ch = child; ch != null; ch = ch.next) ch.attach(ui); }