@Test public void testAddView() { top.addView(child1); SupportHelper.assertEquals(top, child1.getParent()); SupportAssertUtil.assertEqualsExactOrder(new SupportView[] {child1}, top.getViews().toArray(new SupportView[1])); top.addView(child2); SupportAssertUtil.assertEqualsExactOrder(new SupportView[] {child1, child2}, top.getViews().toArray(new SupportView[SupportConst.I_TWO])); }
public IView addView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } subViews.add(view); view.setParent(this); return view; }
ViewImpl implements IView { public IView addView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } subViews.add(view); view.setParent(this); return view; } }
ViewImpl implements IView { public IView addView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } subViews.add(view); view.setParent(this); return view; } ViewImpl(); }
ViewImpl implements IView { public IView addView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } subViews.add(view); view.setParent(this); return view; } ViewImpl(); void removeAllViews(); List<IView> getViews(); boolean hasViews(); IViewable getParent(); void setParent(IViewable parent); IView addView(IView view); boolean removeView(IView view); void updateChild(IEvent[] newData, IEvent[] oldData); @Override void start(); @Override void stop(); }
ViewImpl implements IView { public IView addView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } subViews.add(view); view.setParent(this); return view; } ViewImpl(); void removeAllViews(); List<IView> getViews(); boolean hasViews(); IViewable getParent(); void setParent(IViewable parent); IView addView(IView view); boolean removeView(IView view); void updateChild(IEvent[] newData, IEvent[] oldData); @Override void start(); @Override void stop();  }