def position ( self, ui ):
        view   = ui.view
        window = ui.control

        # Set up the default position of the window:
        parent = window.parent()
        if parent is None:
            px = 0
            py = 0
            pdx = screen_dx
            pdy = screen_dy
        else:
            pos = parent.pos()
            if int(parent.windowFlags()) & QtCore.Qt.Window == 0 :
                pos = parent.mapToGlobal(pos)
            px = pos.x()
            py = pos.y()
            pdx = parent.width()
            pdy = parent.height()

        # Get the window's prefered size.
        size_hint = window.sizeHint()

        # Calculate the correct width and height for the window:
        cur_width = size_hint.width()
        cur_height = size_hint.height()
        width  = view.width
        height = view.height

        if width < 0.0:
            width = cur_width
        elif width <= 1.0:
            width = int( width * screen_dx )
        else:
            width = int( width )

        if height < 0.0:
            height = cur_height
        elif height <= 1.0:
            height = int( height * screen_dy )
        else:
            height = int( height )

        # Calculate the correct position for the window:
        x = view.x
        y = view.y

        if x < -99999.0:
            x = px + ((pdx - width) / 2)
        elif x <= -1.0:
            x = px + pdx - width + int( x ) + 1
        elif x < 0.0:
            x = px + pdx - width + int( x * pdx )
        elif x <= 1.0:
            x = px + int( x * pdx )
        else:
            x = int( x )

        if y < -99999.0:
            y = py + ((pdy - height) / 2)
        elif y <= -1.0:
            y = py + pdy - height + int( y ) + 1
        elif x < 0.0:
            y = py + pdy - height + int( y * pdy )
        elif y <= 1.0:
            y = py + int( y * pdy )
        else:
            y = int( y )

        # Position and size the window as requested:
        layout = window.layout()
        if layout.sizeConstraint() == QtGui.QLayout.SetFixedSize:
            layout.setSizeConstraint( QtGui.QLayout.SetDefaultConstraint )
            window.move( max( 0, x ), max( 0, y ) )
            window.setFixedSize( QtCore.QSize ( width, height ) )
        else:
            window.setGeometry( max( 0, x ), max( 0, y ), width, height )

    #---------------------------------------------------------------------------
    #  Shows a 'Help' window for a specified UI and control:
    #---------------------------------------------------------------------------
Retrieve a single driver.
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/toolkit.py/GUIToolkit.position--crossover with--dataset/ETHPy150Open openstack/ironic/ironic/api/controllers/v1/driver.py/DriversController.get_one