Sets the listitem's playable flag
771447
def set_is_playable(self, is_playable):
        ''''''
        value = 'false'
        if is_playable:
            value = 'true'
        self.set_property('isPlayable', value)
        self.is_folder = not is_playable
260677
def _MI_setitem(self, args, value):
    ''
    indices = self.indices
    N = len(indices)
    empty = N == 0
    if empty: # init the dict
        index1, key, index2, index1_last = MI_parse_args(self, args, allow_new=True)
        exist_names = [index1]
        item = [key]
        try:
            MI_check_index_name(index2)
            exist_names.append(index2)
            item.append(value)
        except TypeError:
            Nvalue, value = get_value_len(value)
            if len(index2) != Nvalue:
                raise ValueError(
                    'Number of keys (%s) based on argument %s does not match '
                    'number of values (%s)' % (len(index2), index2, Nvalue))
            exist_names.extend(index2)
            item.extend(value)
        if index1_last:
            exist_names = exist_names[1:] + exist_names[:1]
            item = item[1:] + item[:1]

        _MI_init(self, [item], exist_names)
        return

    index1, key, index2, item, old_value = MI_parse_args(self, args, allow_new=True)
    names = force_list(indices.keys())
    is_new_key = item is None
    single = isinstance(index2, int)

    if single:
        index2_list = [index2]
        value = [value]
        old_value = [old_value]
    else:
        index2_list = index2
        Nvalue, value = get_value_len(value)
        if len(index2_list) != Nvalue:
            raise ValueError('Number of keys (%s) based on argument %s does not match '
                             'number of values (%s)' % (len(index2_list), index2, Nvalue))
        if is_new_key:
            old_value = [None] * Nvalue  # fake it

    # remove duplicate in index2_list
    index2_d = OrderedDict()
    for e, index in enumerate(index2_list):
        index2_d[index] = e # order of each unique index
    if len(index2_d) < len(index2_list): # exist duplicate indices
        idx = index2_d.values()
        index2_list = mget_list(index2_list, idx)
        value = mget_list(value, idx)
        old_value = mget_list(old_value, idx)

    # check duplicate values
    for i, v, old_v in zip(index2_list, value, old_value):
        # index2_list may contain index1; not allow duplicate value for index1 either
        if v in indices[i]:
            if is_new_key or v != old_v:
                raise ValueExistsError(v, i, names[i])

    if is_new_key:
        if set(index2_list + [index1]) != set(range(N)):
            raise ValueError('Indices of the new item do not match existing indices')

        d = {}
        d[index1] = key
        # index2_list may also override index1
        d.update(zip(index2_list, value))
        values = [d[i] for i in range(N)]  # reorder based on the indices
        key = values[0]
        val = values[1] if len(values) == 2 else values[1:]
        super(MIMapping, self).__setitem__(key, val)
        for i, v in zip(names[1:], values[1:]):
            indices[i][v] = key

    else: # not new key
#        import pdb;pdb.set_trace()
        key1 = item[0]
        item2 = list(item)  # copy item first
        mset_list(item2, index2_list, value) # index2_list may also override index1
        key2 = item2[0]
        val = item2[1] if len(item2) == 2 else item2[1:]
        if key1 == key2:
            super(MIMapping, self).__setitem__(key1, val)
        else:
            od_replace_key(self, key1, key2, val)

        for i, v_old, v_new in zip(names[1:], item[1:], item2[1:]):
            od_replace_key(indices[i], v_old, v_new, key2)
67921
function setSelectedItem(menuItemid) {
    let menuItem = itemsCache[menuItemid];

    if (!menuItem) {
        console.warn(`Cannot select menuitem. The given id ${menuItemid} does not exist.`);
        return;
    }
    menuBarFeature.setSelectedItem(menuItem);
}
996362
protected function prepareList()
    {
        $displayCount = 0;

        foreach ($this->items as &$item) {
            $displayCount++;
            // @todo this should not ignore the items current display state
            // - Should check the current display state and try to keep it if possible
            if ($displayCount > $this->displayCount) {
                $item->setDisplay(0);
            } else {
                $item->setDisplay(1);
            }
        }
    }
533386
function setCheckedList(indexArray) {
    if (indexArray) {
        this.state.items.forEach((item) => {
            item.checked = false;
        });

        indexArray.forEach((index) => {
            this.setCheckedItem(index);
        });

        this.processAfterStateChange(indexArray);
    }
}
115468
def _setFlag(self, name, val, defVal):
        """"""
        if not hasattr(self, "flags"):
            self.flags = {}
        if val != defVal:
            self.flags[name] = val
1186318
public void setEnable(boolean flag) {
        if (flag == mIsEnabled)
            return;

        mIsEnabled = flag;

        if (getNative() != 0)
        {
            NativeComponent.setEnable(getNative(), flag);
        }
        if (flag)
        {
            onEnable();
        }
        else
        {
            onDisable();
        }
    }
1106596
@Override
	protected void initEvalMat() {
		_evalMat.set(_sParam.getRangeStart(), _lParam.getRangeStart(), States.S.ordinal(), 1);
	}
706721
def flags(self, index):
        
        activeFlags = (Qt.ItemIsEnabled | Qt.ItemIsSelectable |
                       Qt.ItemIsUserCheckable)

        item = self.item(index)
        column = index.column()

        if column > 0 and not item.childCount():
            activeFlags = activeFlags | Qt.ItemIsEditable

        return activeFlags
600674
def setCheckedItems(self, items):
        
        if not self.isCheckable():
            return
        
        model = self.model()
        for i in range(self.count()):
            item_text = self.itemText(i)
            if not item_text:
                continue
            
            if nativestring(item_text) in items:
                state = Qt.Checked
            else:
                state = Qt.Unchecked
            
            model.item(i).setCheckState(state)
59687
def _setFlags(self):
		
		self.atEnd = not self.gametree.variations and (self.index + 1 == len(self.gametree))
		self.atStart = not self.stack and (self.index == 0)
470354
protected void setFlag(final int mask, final boolean flag) {
		// Only store the flag value if it is not the default.
		if (flag != isFlagSet(mask)) {
			ComponentModel model = getOrCreateComponentModel();
			model.setFlags(switchFlag(model.getFlags(), mask, flag));
		}
	}
598498
def setFlag(self, flag, state=True):
        
        if state:
            self.__flags |= flag
        else:
            self.__flags &= ~flag
593734
function MenuItem(arg,opt) {
        
        if ($.isPlainObject(arg)) { opt = arg; arg = null; }
        
        if (!arg) arg = '<a>';
        
        this.container = $(arg)[0];
        
        if (opt) this.set(opt);
    }
310488
def set_sorting(self, flag):
        """"""
        self.sorting['status'] = flag
        self.header().setSectionsClickable(flag == ON)
513735
def updateCheckState( self ):
        
        checkable = self.isCheckable()
        model     = self.model()
        flags     = Qt.ItemIsSelectable | Qt.ItemIsEnabled
        
        for i in range(self.count()):
            item = model.item(i)
            
            if not (checkable and item.text()):
                item.setCheckable(False)
                item.setFlags(flags)
            
            # only allow checking for items with text
            else:
                item.setCheckable(True)
                item.setFlags(flags | Qt.ItemIsUserCheckable)
464325
public void setSwipeItemMenuEnabled(int position, boolean enabled) {
        if (enabled) {
            if (mDisableSwipeItemMenuList.contains(position)) {
                mDisableSwipeItemMenuList.remove(Integer.valueOf(position));
            }
        } else {
            if (!mDisableSwipeItemMenuList.contains(position)) {
                mDisableSwipeItemMenuList.add(position);
            }
        }
    }