Updates the enabledness of menu items.
329445
public void updateEnabled(boolean interrupted) {
        for (int i = 0; i != interruptOnlyItems.size(); ++i) {
            JMenuItem item = interruptOnlyItems.get(i);
            item.setEnabled(interrupted);
        }

        for (int i = 0; i != runOnlyItems.size(); ++i) {
            JMenuItem item = runOnlyItems.get(i);
            item.setEnabled(!interrupted);
        }
    }
751822
function updateContextMenu(popupTableUtils, eventManager, selectionManager) {
  _changeContent(popupTableUtils);
  _bindEvents(popupTableUtils, eventManager, selectionManager);
}
1262608
def change_enables(self, enables_list: list):
        
        for i, entry in enumerate(self.values):
            if enables_list[i]:
                entry.config(state=tk.NORMAL)
            else:
                entry.config(state=tk.DISABLED)
851965
private void updateEnabled(boolean interrupted) {
        ((Menubar)getJMenuBar()).updateEnabled(interrupted);
        for (int ci = 0, cc = toolBar.getComponentCount(); ci < cc; ci++) {
            boolean enableButton;
            if (ci == 0) {
                // Break
                enableButton = !interrupted;
            } else {
                enableButton = interrupted;
            }
            toolBar.getComponent(ci).setEnabled(enableButton);
        }
        if (interrupted) {
            toolBar.setEnabled(true);
            // raise the debugger window
            int state = getExtendedState();
            if (state == Frame.ICONIFIED) {
                setExtendedState(Frame.NORMAL);
            }
            toFront();
            context.setEnabled(true);
        } else {
            if (currentWindow != null) currentWindow.setPosition(-1);
            context.setEnabled(false);
        }
    }
483065
protected void updateButtonState()
	{
		getNavigationPanel().getBtnPrevious()
			.setEnabled(getStateMachine().getCurrentState().hasPrevious());
		getNavigationPanel().getBtnNext().setEnabled(getStateMachine().getCurrentState().hasNext());
	}
879041
def update(self, enabled=None):
        
        if enabled is None:
            enabled = self.checkState(0) == QtCore.Qt.Checked
        elif not enabled or self._element.get('enabled', 'True') != 'True':
            self.setCheckState(0, QtCore.Qt.Unchecked)
        else:
            self.setCheckState(0, QtCore.Qt.Checked)
        
        if enabled:
            self.setForeground(0, QtGui.QBrush())
        else:
            self.setForeground(0, QtGui.QBrush(QtGui.QColor('lightGray')))

        for child in self.children():
            child.update(enabled)
534913
public void setEnabled(boolean enabled) {
		super.setEnabled(enabled);

		for (short i = 0; i < days.length; i++) {
			if (days[i] != null) {
				days[i].setEnabled(enabled);
			}
		}

		for (short i = 0; i < weeks.length; i++) {
			if (weeks[i] != null) {
				weeks[i].setEnabled(enabled);
			}
		}
	}
956786
public function updateConfigOptions()
    {
        //search the config menu for our item
        $options = $this->searchMenu($this->name);

        //override the config's options
        $this->getConfig()->setOptions($options);
    }
1279423
function _togglePref(key, value) {
        var val,
            oldPref = !!prefs.get(key);

        if (value === undefined) {
            val = !oldPref;
        } else {
            val = !!value;
        }

        // update menu
        if (val !== oldPref) {
            prefs.set(key, val);
        }

        return val;
    }
379470
def update_search_menu(self):
        """"""
        # Disabling all actions except the last one
        # (which is Find in files) to begin with
        for child in self.search_menu.actions()[:-1]:
            child.setEnabled(False)

        widget, textedit_properties = self.get_focus_widget_properties()
        if textedit_properties is None: # widget is not an editor/console
            return

        # !!! Below this line, widget is expected to be a QPlainTextEdit
        #     instance
        console, not_readonly, readwrite_editor = textedit_properties

        # Find actions only trigger an effect in the Editor
        if not console:
            for action in self.search_menu.actions():
                try:
                    action.setEnabled(True)
                except RuntimeError:
                    pass

        # Disable the replace action for read-only files
        self.search_menu_actions[3].setEnabled(readwrite_editor)
178849
void zApplyDisplayToggleTimeMenuButton() {
        if (parent == null) {
            return;
        }
        parent.getComponentToggleTimeMenuButton().setEnabled(displayToggleTimeMenuButton);
        parent.getComponentToggleTimeMenuButton().setVisible(displayToggleTimeMenuButton);
    }
237006
public void setBarEffectEnabled(final boolean ENABLED) {
        if (null == barEffectEnabled) {
            _barEffectEnabled = ENABLED;
            fireUpdateEvent(VISIBILITY_EVENT);
        } else {
            barEffectEnabled.set(ENABLED);
        }
    }
889214
private void enableActions() {
        restoreAction.setEnabled(isParentMaximum() || isParentIcon());
        maximizeAction.setEnabled((isParentMaximizable() && !isParentMaximum() && !isParentIcon())
                                      || (isParentMaximizable() && isParentIcon()));
        iconifyAction.setEnabled(isParentIconifiable() && !isParentIcon());
        closeAction.setEnabled(isParentClosable());
        sizeAction.setEnabled(false);
        moveAction.setEnabled(false);
    }
346096
def refresh_menu(self):
        """"""
        data = self.model.get_data()
        index = self.currentIndex()
        condition = (not isinstance(data, (tuple, set))) and index.isValid() \
                    and not self.readonly
        self.edit_action.setEnabled( condition )
        self.remove_action.setEnabled( condition )
        self.insert_action.setEnabled( not self.readonly )
        self.duplicate_action.setEnabled(condition)
        condition_rename = not isinstance(data, (tuple, list, set))
        self.rename_action.setEnabled(condition_rename)
        self.refresh_plot_entries(index)
933626
def update_vehicle_menu(self):
        ''''''
        self.vehicle_menu.items = []
        for s in sorted(self.vehicle_list):
            clist = self.module('param').get_component_id_list(s)
            if len(clist) == 1:
                name = 'SysID %u: %s' % (s, self.vehicle_name_by_sysid[s])
                self.vehicle_menu.items.append(MPMenuItem(name, name, '# vehicle %u' % s))
            else:
                for c in sorted(clist):
                    try:
                        name = 'SysID %u[%u]: %s' % (s, c, self.component_name[s][c])
                    except KeyError as e:
                        name = 'SysID %u[%u]: ?' % (s,c)
                    self.vehicle_menu.items.append(MPMenuItem(name, name, '# vehicle %u:%u' % (s,c)))
        self.mpstate.console.set_menu(self.menu, self.menu_callback)
455698
public void setEnabled(boolean enabled) {

        if (enabled) {
            enable();
        } else {
            m_button.setEnabled(enabled);
            getElement().setPropertyBoolean("disabled", true);
        }
    }
1107388
private void updateMenuIcon() {
        Icon            frameIcon = frame.getFrameIcon();
        SeaGlassContext context   = getContext(this);

        if (frameIcon != null) {
            Dimension maxSize   = (Dimension) context.getStyle().get(context, "InternalFrameTitlePane.maxFrameIconSize");
            int       maxWidth  = 16;
            int       maxHeight = 16;

            if (maxSize != null) {
                maxWidth  = maxSize.width;
                maxHeight = maxSize.height;
            }

            if ((frameIcon.getIconWidth() > maxWidth || frameIcon.getIconHeight() > maxHeight) && (frameIcon instanceof ImageIcon)) {
                frameIcon = new ImageIcon(((ImageIcon) frameIcon).getImage().getScaledInstance(maxWidth, maxHeight, Image.SCALE_SMOOTH));
            }
        }

        context.dispose();
        menuButton.setIcon(frameIcon);
    }