Turns on 'expert' status whereby the button is always enabled,
        regardless of its activity status.
187925
def setExpert(self):
        
        w.ActButton.setExpert(self)
        g = get_root(self).globals
        self.config(bg=g.COL['start'])
165443
public void setEnabled(boolean enable) {
        if (enable && !mEnabled) {
            if (DBG) Log.d(TAG, "Notification handler=" + ID + " is now enabled.");
            mEnabled = true;
        } else if (!enable && mEnabled) {
            if (DBG) Log.d(TAG, "Notification handler=" + ID + " is now disabled.");
            mEnabled = false;
            cancelAll();
        }
    }
435603
public void setEnabled(boolean enabled) {
		super.setEnabled(enabled);
		spinner.setEnabled(enabled);
		textField.setEnabled(enabled);
		/*
		 * Fixes the background bug
		 * 4991597 and sets the background explicitely to a
		 * TextField.inactiveBackground.
		 */
		if (!enabled) {
			textField.setBackground(UIManager.getColor("TextField.inactiveBackground"));
		}
	}
748319
def set_current_state(self):
        """""""
        if not self.thresholds:
            self.thresholds = self.parent.get_existing_keyword('thresholds')
        if not self.value_maps:
            self.value_maps = self.parent.get_existing_keyword('value_maps')
700363
def stats_enabled(self, value):
        """"""
        if value:
            self.statistics.enable()
        else:
            self.statistics.disable()
1305411
public synchronized void setAutoShutdownEnabled(boolean enabled) {
        try {
            if (mShutdownHook == null) {
                if (enabled) {
                    ShutdownHook hook = new ShutdownHook(this);
                    Runtime.getRuntime().addShutdownHook(hook);
                    mShutdownHook = hook;
                }
            } else {
                if (!enabled) {
                    Runtime.getRuntime().removeShutdownHook(mShutdownHook);
                    mShutdownHook = null;
                }
            }
        } catch (IllegalStateException e) {
            // Shutdown is in progress so make no changes.
        }
    }
1343374
def switch(self):
        
        self._status = (self._status + 1) % len(self.states)
        self.status(self._status)
1260574
def enable_disable(self):
        
        if self.enabled:
            self.data['enabled'] = False
        else:
            self.data['enabled'] = True
        self.update()
540127
public void onButtonActivation(Widget widget) {

        for (Widget w : getAll()) {
            if (!(w instanceof I_CmsToolbarActivatable)) {
                continue;
            }
            ((I_CmsToolbarActivatable)w).onActivation(widget);
        }
    }
553580
def on_click(self, event):
        
        button = event["button"]
        if button == self.button_toggle:
            self.toggled = True
            if self.mode == "ip":
                self.mode = "status"
            else:
                self.mode = "ip"
        elif button == self.button_refresh:
            self.idle_time = 0
        else:
            self.py3.prevent_refresh()
485523
def setExpertLevel(self):
        
        g = get_root(self).globals
        level = g.cpars['expert_level']

        # now set whether buttons are permanently enabled or not
        if level == 0 or level == 1:
            self.load.setNonExpert()
            self.save.setNonExpert()
            self.unfreeze.setNonExpert()
            self.start.setNonExpert()
            self.stop.setNonExpert()

        elif level == 2:
            self.load.setExpert()
            self.save.setExpert()
            self.unfreeze.setExpert()
            self.start.setExpert()
            self.stop.setExpert()
216773
def setChecked(self, state):
        
        super(XLockButton, self).setChecked(state)
        self.updateState()
1143409
@Override
    public void setComponentEnabled(boolean enabled) {
        super.setComponentEnabled(enabled);

        boolean enable = enabled && getModel().getRowCount() > 0;
        enableAllButton.setEnabled(enable);
        disableAllButton.setEnabled(enable);
    }
86412
def toggle_buttons(self):
        """"""
        all_time_on = self.all_time.get_value()
        all_chan_on = self.all_chan.get_value()

        self.times['beg'].setEnabled(not all_time_on)
        self.times['end'].setEnabled(not all_time_on)
        self.idx_chan.setEnabled(not all_chan_on)
558718
public void setEnabled(boolean enabled) {
		super.setEnabled(enabled);
		comboBox.setEnabled(enabled);

		if (spinner != null) {
			spinner.setEnabled(enabled);
		}
	}
793648
def enabled(self):
        """"""
        enabled = self._enabled
        if not enabled:
            return False

        if self.parent and isinstance(self.parent, Widget):
            if self.parent.enabled == False:
                return False

        return True
1233240
private void setActiveAction() {
		int ks = keyStoreList.getSelectedIndex();
		int alias = aliasTable.getSelectedRow();
		if (ks > -1 && alias>-1) {
			if (!contextManager.isKeyUnlocked(ks, alias)) {


				try {
					if(!contextManager.unlockKeyWithDefaultPassword(ks, alias)){
						String password = getPassword();

						if(!contextManager.unlockKey(ks, alias, password)){
							JOptionPane.showMessageDialog(null, new String[] {
									Constant.messages.getString("options.cert.error.accesskeystore")}, 
									Constant.messages.getString("options.cert.error"), JOptionPane.ERROR_MESSAGE);
						}
					}
				} catch (Exception e) {
					showKeyStoreCertError(e.toString());
				}
			}
			Certificate cert = contextManager.getCertificate(ks, alias);
			try {
				contextManager.getFingerPrint(cert);
			} catch (KeyStoreException kse) {
				showCertError("options.cert.error.fingerprint", kse.toString());
			}

			try {
				contextManager.setDefaultKey(ks, alias);

				OptionsParamCertificate certParam = Model.getSingleton().getOptionsParam().getCertificateParam();
				certParam.setActiveCertificate();

			} catch (KeyStoreException e) {
				logger.error(e.getMessage(), e);
			}
			certificateTextField.setText(contextManager.getDefaultKey());
		}
	}