Sets whether or not this item is in an expanded state.
        
        :param      state | <bool>
176377
def setExpanded(self, state):
        
        if (state and self.testFlag(self.ItemIsExpandable)) or \
           (not state and self.testFlag(self.ItemIsCollapsible)):
            super(XTreeWidgetItem, self).setExpanded(state)
230530
public int setState(boolean state, boolean bDisplayOption, int moveMode)
    {
        double value = 0;
        if (state)
            value = 1;
        return this.setValue(value, bDisplayOption, moveMode);  // Move value to this field
    }
911655
function(state) {
            if (state == this.state) return;

            this.state = state;
            logging.log("state ", this.state);
            this.trigger("state", this.state);
        }
888314
def setExtendsTree( self, state ):
        
        delegate = self.itemDelegate()
        if ( isinstance(delegate, XTreeWidgetDelegate) ):
            delegate.setExtendsTree(state)
556484
def is_state(self, state):
        
        state = state.format(relation_name=self.relation_name)
        value = _get_flag_value(state)
        if not value:
            return False
        return self.key in value['conversations']
929193
def set_state(self, state):
        
        _field = self.binary_state_name()
        values = {"desired_state": {_field: state}}
        response = self.api_interface.local_set_state(self, values, type_override="binary_switche")
        self._update_state_from_response(response)
959045
def in_state(obj, states, stateflowid='review_state'):
    
    if not states:
        return False
    obj_state = getCurrentState(obj, stateflowid=stateflowid)
    return obj_state in states
829132
def _widen_states(old_state, new_state):
        

        # print old_state.dbg_print_stack()
        # print new_state.dbg_print_stack()

        l.debug('Widening state at IP %s', old_state.ip)

        widened_state, widening_occurred = old_state.widen(new_state)

        # print "Widened: "
        # print widened_state.dbg_print_stack()

        return widened_state, widening_occurred
77102
def setHidden(self, state):
        
        super(XListGroupItem, self).setHidden(state)
        
        for child in self.children():
            child.setHidden(state or not self.isExpanded())
318682
def is_(self, state):
    """"""
    translator = self._meta['translator']
    state = translator.translate(state)
    return self.actual_state == state
1058712
def _set_state(self, state):
        
        if state != self._association_state:
            self.__log_debug('- %s -> %s', self._association_state, state)
            self._association_state = state

        if state == self.State.ESTABLISHED:
            self.__state = 'connected'
            for channel in list(self._data_channels.values()):
                if channel.negotiated and channel.readyState != 'open':
                    channel._setReadyState('open')
            asyncio.ensure_future(self._data_channel_flush())
        elif state == self.State.CLOSED:
            self._t1_cancel()
            self._t2_cancel()
            self._t3_cancel()
            self.__state = 'closed'

            # close data channels
            for stream_id in list(self._data_channels.keys()):
                self._data_channel_closed(stream_id)

            # no more events will be emitted, so remove all event listeners
            # to facilitate garbage collection.
            self.remove_all_listeners()
1091782
def _store_expansion_state(self):
        """"""

        def store_tree_expansion(child_tree_iter, expansion_state):

            tree_item_path = self.history_tree_store.get_path(child_tree_iter)
            history_item = self.get_history_item_for_tree_iter(child_tree_iter)

            # store expansion state if tree item path is valid and expansion state was not stored already
            if tree_item_path is not None:
                # if first element of sub-tree has same history_item as the parent ignore it's expansion state
                if history_item not in expansion_state:
                    expansion_state[history_item] = self.history_tree.row_expanded(tree_item_path)

            for n in range(self.history_tree_store.iter_n_children(child_tree_iter)):
                child_iter = self.history_tree_store.iter_nth_child(child_tree_iter, n)
                store_tree_expansion(child_iter, expansion_state)

        root_iter = self.history_tree_store.get_iter_first()
        if not root_iter:
            return
        current_expansion_state = {}
        # this can be the case when the execution history tree is currently being deleted
        if not self.get_history_item_for_tree_iter(root_iter).state_reference:
            return
        state_machine = self.get_history_item_for_tree_iter(root_iter).state_reference.get_state_machine()
        self._expansion_state[state_machine.state_machine_id] = current_expansion_state
        while root_iter:
            store_tree_expansion(root_iter, current_expansion_state)
            root_iter = self.history_tree_store.iter_next(root_iter)
848462
def setEditable(self, state):
        
        self._editable = state
        if state:
            self.setEditTriggers(self.AllEditTriggers)
        else:
            self.setEditTriggers(self.NoEditTriggers)
672354
def set_checked(self, state):
        

        if not self.__checkable:
            return False

        if state:
            self.__checked = True
            self.setPixmap(self.__active_pixmap)
        else:
            self.__checked = False
            self.setPixmap(self.__default_pixmap)
        self.toggled.emit(state)
        return True
282866
def save_expanded_state(self):
        """"""
        self.__expanded_state = {}
        def add_to_state(item):
            user_text = get_item_user_text(item)
            self.__expanded_state[hash(user_text)] = item.isExpanded()
        def browse_children(item):
            add_to_state(item)
            for index in range(item.childCount()):
                citem = item.child(index)
                user_text = get_item_user_text(citem)
                self.__expanded_state[hash(user_text)] = citem.isExpanded()
                browse_children(citem)
        for tlitem in self.get_top_level_items():
            browse_children(tlitem)
555465
def set_state(self, updater=None, **kwargs):
        
        if callable(updater):
            state_change = updater(self)
        elif updater is not None:
            state_change = updater
        else:
            state_change = kwargs

        return [callback_result
                for k, v in state_change.items()
                for callback_result in self.set(k, v)]
458171
boolean updateState(State state) {
        if (isResetRequired) {
            // Applying initial state
            state.set(0f, 0f, zoomBounds.set(state).getFitZoom(), 0f);
            GravityUtils.getImagePosition(state, settings, tmpRect);
            state.translateTo(tmpRect.left, tmpRect.top);

            // We can correctly reset state only when we have both image size and viewport size
            // but there can be a delay before we have all values properly set
            // (waiting for layout or waiting for image to be loaded)
            isResetRequired = !settings.hasImageSize() || !settings.hasViewportSize();
            return !isResetRequired;
        } else {
            // Restricts state's translation and zoom bounds, disallowing overscroll / overzoom.
            restrictStateBounds(state, state, Float.NaN, Float.NaN, false, false, true);
            return false;
        }
    }