public void beforeChildAdded(Component child, Component refChild) { if (!(child instanceof LayoutRegion)) throw new UiException("Unsupported child for Borderlayout: " + child); if (child instanceof North) { if (_north != null && child != _north) throw new UiException("Only one north child is allowed: " + this); } else if (child instanceof South) { if (_south != null && child != _south) throw new UiException("Only one south child is allowed: " + this); } else if (child instanceof West) { if (_west != null && child != _west) throw new UiException("Only one west child is allowed: " + this); } else if (child instanceof East) { if (_east != null && child != _east) throw new UiException("Only one east child is allowed: " + this); } else if (child instanceof Center) { if (_center != null && child != _center) throw new UiException("Only one center child is allowed: " + this); } super.beforeChildAdded(child, refChild); }
public void beforeChildAdded(Component child, Component refChild) { if (!(child instanceof LayoutRegion)) throw new UiException("Unsupported child for Borderlayout: " + child); if (child instanceof North) { if (_north != null && child != _north) throw new UiException("Only one north child is allowed: " + this); } else if (child instanceof South) { if (_south != null && child != _south) throw new UiException("Only one south child is allowed: " + this); } else if (child instanceof West) { if (_west != null && child != _west) throw new UiException("Only one west child is allowed: " + this); } else if (child instanceof East) { if (_east != null && child != _east) throw new UiException("Only one east child is allowed: " + this); } else if (child instanceof Center) { if (_center != null && child != _center) throw new UiException("Only one center child is allowed: " + this); } super.beforeChildAdded(child, refChild); } public boolean insertBefore(Component child, Component refChild) {