def dockable_init_dockcontrol ( self, dock_control ):
        """ Allows the object to override the default DockControl settings.
        """
        dockable = self
        if self.element not in None:
            dockable = DockableViewElement( ui           = self._ui,
                                            element      = self.element,
                                            should_close = True )
            self._ui = None

        dock_control.set( dockable = dockable,
                          on_close = dockable.close_dock_control )

    #---------------------------------------------------------------------------
    #  Handles the closing of a DockControl containing a Traits UI:
    #---------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/dockable_view_element.py/DockableViewElement.dockable_init_dockcontrol/operator `is not` -> `not in`