private void autoRemove(){
if( !autoRemove ){
return;
}
CControl control = getControl();
if( control != null ){
DockRegister register = control.getController().getRegister();
if( register.isStalled() ){
register.addDockRegisterListener( new DelayedAutoRemove() );
}
else{
SplitDockStation station = getStation();
if( station.getDockableCount() == 0 ){
DockStation parent = station.getDockParent();
if( parent != null ){
parent.drag( station );
}
control.removeDockable( this );
control.removeStation( this );
}
}
}
}