Sets the label text for the inputted value.  This will override the default pretty
        text label that is used for the key.

        :param      value | <variant>
                    label | <str>
491208
def setLabel(self, value, label):
        
        if label:
            self._labels[value] = label
        else:
            self._labels.pop(value, None)
896416
def setValue(self, value):
        
        if isinstance(value, Text):
            self.value = value
        else:
            self.value = Text(value)
        return self
670504
def AddLabels(self, labels):
    
    for label in labels:
      if not self._VALID_LABEL_REGEX.match(label):
        raise ValueError((
            'Unsupported label: "{0:s}". A label must only consist of '
            'alphanumeric characters or underscores.').format(label))

    for label in labels:
      if label not in self.labels:
        self.labels.append(label)
1025683
public void setActionLabel(CharSequence label){
        mEmptyActionText = label;
        mAction.setText(mEmptyActionText);
        mAction.setVisibility(TextUtils.isEmpty(mEmptyActionText) ? View.GONE : View.VISIBLE);
    }
647249
def setText(self, label, default='', description='Set Text', format='text'):
        

        obj = self.load(label)
        if obj == None:
            obj=default
            self.save(obj, label)  # initialize with default

        textw = Text(value=obj, description=description)
        hndl = interact(self.save, obj=textw, label=fixed(label), format=fixed(format))
228609
def setText(self, value):
        
        if isinstance(value, Text):
            self.text = value
        else:
            self.text = Text(value)
        return self
1328647
def label(self, value):
        
        # Fixed width label formatting
        value = value[:self.pad_size] if self.pad_size else value
        try:
            padding = ' ' * (self.pad_size - len(value)) if self.pad_size else ''
        except TypeError:
            padding = ''

        self._formatted = ' {v}{p} '.format(v=value, p=padding)
760102
public void setTextPadding( Float value) {
    PropertyValue propertyValue = textPadding(value);
    constantPropertyUsageMap.put(PROPERTY_TEXT_PADDING, propertyValue);
    layer.setProperties(propertyValue);
  }
382306
public static void bindLabel (final Value<String> value, final HasText target)
    {
        value.addListenerAndTrigger(new Value.Listener<String>() {
            public void valueChanged (String value) {
                // avoid updating the target if the value is already the same; in the case where
                // the target is a TextBox, setting the text will move the cursor to the end of the
                // text, which is annoying if a value is being updated on every character edit
                if (!target.getText().equals(value)) {
                    target.setText(value);
                }
            }
        });
    }
317223
def set(self, value):
        

        if not isinstance(value, int_types) and not isinstance(value, str_cls):
            raise TypeError(unwrap(
                '''
                %s value must be an integer or a unicode string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        if isinstance(value, str_cls):
            if value not in self._reverse_map:
                raise ValueError(unwrap(
                    '''
                    %s value "%s" is not a valid value
                    ''',
                    type_name(self),
                    value
                ))

            value = self._reverse_map[value]

        elif value not in self._map:
            raise ValueError(unwrap(
                '''
                %s value %s is not a valid value
                ''',
                type_name(self),
                value
            ))

        Integer.set(self, value)
1163719
def valueByLabel(self, label):
        
        keys = self.keys()
        labels = [text.pretty(key) for key in keys]
        if label in labels:
            return self[keys[labels.index(label)]]
        return 0
446212
def setValue(self, value):
        
        if value >= self.minimum() and value <= self.maximum():
            self._lineEdit.setText(str(value))
        elif value < self.minimum():
            self._lineEdit.setText(str(self.minimum()))
        elif value > self.maximum():
            self._lineEdit.setText(str(self.maximum()))
        return True
1094521
public void addText(String label,
                        String value)
    {
        Composite c = new Composite();
        c.add(value);
        addField(label,c);
    }
22666
public void setText(String value) {
		this.value = value;
		if (cursorPos > value.length()) {
			cursorPos = value.length();
		}
	}
731927
def set_text(self, val, base64encode=False):
        

        # print("set_text: %s" % (val,))
        if isinstance(val, bool):
            if val:
                setattr(self, "text", "true")
            else:
                setattr(self, "text", "false")
        elif isinstance(val, int):
            setattr(self, "text", "%d" % val)
        elif isinstance(val, six.string_types):
            setattr(self, "text", val)
        elif val is None:
            pass
        else:
            raise ValueError("Type shouldn't be '%s'" % (val,))

        return self
374776
public void setFormValue(Object value) {

        if (value == null) {
            value = "";
        }
        if (value instanceof String) {
            String strValue = (String)value;
            m_selectionInput.m_textbox.setText(strValue);
            setTitle(strValue);
        }

    }
1293862
def label(self, value):
        
        return self._labels.get(value) or text.pretty(self(value))