]> source.dussan.org Git - vaadin-framework.git/commit
AbstractComponent.setParent(parent) cannot be called if component already has parent...
authorMarc Englund <marc.englund@itmill.com>
Fri, 1 Feb 2008 11:34:50 +0000 (11:34 +0000)
committerMarc Englund <marc.englund@itmill.com>
Fri, 1 Feb 2008 11:34:50 +0000 (11:34 +0000)
commit8a30d9ec793b343e48ff4ec05391be0fca1cd9d0
tree6a5369d2ff95d623b78cdb7ed561a37b32fd189a
parent4585aecfabe3ba603c8354611ebd84d90d695b53
AbstractComponent.setParent(parent) cannot be called if component already has parent, unless the new parent is null (unsetting parent).

AbstractComponentContainer.addComponent(component) removes the component from it's previous ComponentContainer if needed (moves component), or throws if the component can't be removed.

Fixes #1137

All components that contain other components should implement ComponentContainer for this to be perfect (e.g CustomComponent, Table)

svn changeset:3698/svn branch:trunk
src/com/itmill/toolkit/ui/AbstractComponent.java
src/com/itmill/toolkit/ui/AbstractComponentContainer.java