def __init__(self, *args):
        nargs = len(args)
        if nargs == 0:
            super(CheckBox, self).__init__()
            self.setSwitchMode(True)
        elif nargs == 1:
            caption, = args
            super(CheckBox, self).__init__(caption, False)
        elif nargs == 2:
            if isinstance(args[1], IClickListener):
                caption, listener = args
                super(CheckBox, self).__init__(caption, listener)
                self.setSwitchMode(True)
            elif isinstance(args[1], IProperty):
                caption, dataSource = args
                super(CheckBox, self).__init__(caption, dataSource)
                self.setSwitchMode(True)
            else:
                caption, initialState = args
                super(CheckBox, self).__init__(caption, initialState)
        elif nargs == 3:
            caption, target, methodName = args
            super(CheckBox, self).__init__(caption, target, methodName)
            self.setSwitchMode(True)
        else:
            raise ValueError, 'too many arguments'
Creates a new switch button.
dataset/ETHPy150Open rwl/muntjac/muntjac/ui/check_box.py/CheckBox.__init__