Enable/cancel bold printing
        
        Args:
            action: Enable or disable bold printing. Options are 'on' and 'off'
        Returns:
            None
        Raises:
            RuntimeError: Invalid action.
511093
def bold(self, action):
        '''
        '''
        if action =='on':
            action = 'E'
        elif action == 'off':
            action = 'F'
        else:
            raise RuntimeError('Invalid action for function bold. Options are on and off')
        self.send(chr(27)+action)
1072607
def register_action(self, action):
        
        assert action.value not in self.actions
        self.actions[action.value] = action
170910
public void actionPerformed(ActionEvent ae) {

		Object source = ae.getSource();

		if (source == cancel_button)
			onCancel();
		else if (source == add_button || source == direct_text)
			onAdd();
		else if (source == remove_button)
			onRemove();
		else if (source == dismiss_button)
			onDismiss();
		else if (source == ok_button || source instanceof TextField)
			onOK();
	}
906440
def action=(action)
      validator = EnumAttributeValidator.new('String', ["COMPLETE", "CANCEL", "REFUND"])
      unless validator.valid?(action)
        fail ArgumentError, "invalid value for 'action', must be one of #{validator.allowable_values}."
      end
      @action = action
    end
647350
public Dialog neutralAction(CharSequence action){
        mNeutralAction.setText(action);
        mNeutralAction.setVisibility(TextUtils.isEmpty(action) ? View.GONE : View.VISIBLE);
        return this;
    }
1160273
def toggleActions(self, value=True):
        """"""
        for z in self.actions.zoomActions:
            z.setEnabled(value)
        for action in self.actions.onLoadActive:
            action.setEnabled(value)
839239
@Override
    public void actionPerformed(ActionEvent event) {
        if (event.getSource().equals(LED_BLINKING_TIMER)) {
            currentLedImage = ledOn == true ? getLedImageOn() : getLedImageOff();
            ledOn ^= true;

            repaint();
        }
    }
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);
    }
924776
def frame(self, action):
        '''
        '''
        choices = {'on': '1',
                   'off': '0'}
        if action in choices:
            self.send(chr(27)+'if'+choices[action])
        else:
            raise RuntimeError('Invalid action for function frame, choices are on and off')
285386
public void setAction(String action)
    {
        ExtendedInfo info = getInfo(action);
        if (info != null)
            info._action = action;
    }
763011
private static String getActionString(int action) {

        switch (action) {

            case Constraint.RESTRICT :
                return Tokens.T_RESTRICT;

            case Constraint.CASCADE :
                return Tokens.T_CASCADE;

            case Constraint.SET_DEFAULT :
                return Tokens.T_SET + ' ' + Tokens.T_DEFAULT;

            case Constraint.SET_NULL :
                return Tokens.T_SET + ' ' + Tokens.T_NULL;

            default :
                return Tokens.T_NO + ' ' + Tokens.T_ACTION;
        }
    }
1152099
def emitTriggered(self, action):
        
        self.currentActionChanged.emit(action)
        self.currentIndexChanged.emit(self.indexOf(action))
        
        if not self.signalsBlocked():
            self.triggered.emit(action)
917504
def addAction(self, action):
        
        super(XDockToolbar, self).addAction(action)
        
        label = XDockActionLabel(action, self.minimumPixmapSize(), self)
        label.setPosition(self.position())
        
        layout = self.layout()
        layout.insertWidget(layout.count() - 1, label)
444171
private void paintAction(final Action action, final String elementName,
			final XmlStringBuilder xml) {
		switch (action.getActionType()) {
			case SHOW:
			case HIDE:
			case ENABLE:
			case DISABLE:
			case OPTIONAL:
			case MANDATORY:
				paintStandardAction(action, elementName, xml);
				break;

			case SHOWIN:
			case HIDEIN:
			case ENABLEIN:
			case DISABLEIN:
				paintInGroupAction(action, elementName, xml);
				break;

			default:
				break;
		}
	}
730515
function(elem, action) {
			var inst = this._getInst(elem);
			if (!$.isEmptyObject(inst) && !this.isDisabled(elem)) {
				var commands = inst.options.commands;
				if (commands[action] && commands[action].enabled.apply(elem, [inst])) {
					commands[action].action.apply(elem, [inst]);
				}
			}
		}
689161
def addAction( self, action ):
        
        if not isinstance(action, QAction):
            action_name = nativestring(action)
            action = QAction(action_name, self)
            action.setObjectName(action_name)
        
        action.setCheckable(True)
        
        if ( not self._actionGroup ):
            self._actionGroup = QActionGroup(self)
            action.setChecked(True)
            
        self._actionGroup.addAction(action)
        self.reset()
        return action
825596
def deny(cls, action, **kwargs):
        
        return cls.create(action, exclude=True, **kwargs)