setSecondComponent(childComponent); } else { addComponent(childComponent);
@Override public void add(Component childComponent) { if (childComponent.getParent() != null && childComponent.getParent() != this) { throw new IllegalStateException("Component already has parent"); } if (component == null) { createComponentImpl(); } com.vaadin.ui.Component vComponent = childComponent.unwrapComposition(com.vaadin.ui.Component.class); component.addComponent(vComponent); if (frame != null) { if (childComponent instanceof BelongToFrame && ((BelongToFrame) childComponent).getFrame() == null) { ((BelongToFrame) childComponent).setFrame(frame); } else { ((FrameImplementation) frame).registerComponent(childComponent); } } ownComponents.add(childComponent); childComponent.setParent(this); }