@Test public void testRemoveView() { top.addView(child1); top.addView(child2); top.removeView(child1); SupportAssertUtil.assertEqualsExactOrder(new SupportView[] {child2}, top.getViews().toArray(new SupportView[1])); }
public boolean removeView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } boolean isRemoved = subViews.remove(view); view.setParent(null); return isRemoved; }
ViewImpl implements IView { public boolean removeView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } boolean isRemoved = subViews.remove(view); view.setParent(null); return isRemoved; } }
ViewImpl implements IView { public boolean removeView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } boolean isRemoved = subViews.remove(view); view.setParent(null); return isRemoved; } ViewImpl(); }
ViewImpl implements IView { public boolean removeView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } boolean isRemoved = subViews.remove(view); view.setParent(null); return isRemoved; } 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 boolean removeView(IView view) { if (null == view) { String msg = "View is NULL."; LOG.error(msg); throw new RuntimeException(msg); } boolean isRemoved = subViews.remove(view); view.setParent(null); return isRemoved; } 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();  }