def rebuild_editor ( self ):
        # Clear any existing content:
        self.clear_layout()

        cur_value = parse_value( self.value )

        # Create a sizer to manage the radio buttons:
        labels = self.names
        values = self.values
        n      = len( labels )
        cols   = self.factory.cols
        rows   = (n + cols - 1) // cols
        incr   = [ n // cols ] * cols
        rem    = n % cols
        for i in range( cols ):
            incr[i] += (rem > i)
        incr[-1] = -sum(incr[:-1]) + 1

        # Add the set of all possible choices:
        layout = self.control.layout()
        index = 0
        for i in range( rows ):
            for j in range( cols ):
                if n > 0:
                    cb = QtGui.QCheckBox(labels[index])
                    cb.value = values[index]

                    if cb.value in cur_value:
                        cb.setCheckState(QtCore.Qt.Checked)
                    else:
                        cb.setCheckState(QtCore.Qt.Unchecked)

                    QtCore.QObject.connect(cb,
                                           QtCore.SIGNAL('clicked()'),
                                           self._mapper,
                                           QtCore.SLOT('map()'))
                    self._mapper.setMapping(cb, labels[index])

                    layout.addWidget(cb, i, j)

                    index += incr[j]
                    n -= 1

    #---------------------------------------------------------------------------
    #  Handles the user clicking one of the 'custom' check boxes:
    #---------------------------------------------------------------------------
Adds weak ref to an observer.
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/check_list_editor.py/CustomEditor.rebuild_editor--crossover with--dataset/ETHPy150Open Kentzo/Power/power/darwin.py/PowerSourcesNotificationsObserver.addObserver