Adds the default label.
180051
protected function addDefaultLabel() {
        parent::addDefaultLabel();

        if ($this->defaultLabel !== null) {
            $this->defaultLabel->setPosition(CINLabel::POSITION_TOP);
        }
    }
2829
protected function setDefaultLabels()
    {
        $this->labels = [
            'name'                  => _x($this->many, 'Post type general name', $this->i18n),
            'singular_name'         => _x($this->one, 'Post type singular name', $this->i18n),
            'menu_name'             => _x($this->many, 'Admin Menu text', $this->i18n),
            'name_admin_bar'        => _x($this->one, 'Add New on Toolbar', $this->i18n),
            'add_new_item'          => __('Add New ' . $this->one, $this->i18n),
            'edit_item'             => __('Edit ' . $this->one, $this->i18n),
            'new_item'              => __('New ' . $this->one, $this->i18n),
            'view_item'             => __('View ' . $this->one, $this->i18n),
            'view_items'            => __('View ' . $this->many, $this->i18n),
            'search_items'          => __('Search ' . $this->many, $this->i18n),
            'not_found'             => __('No ' . strtolower($this->many) . ' found.', $this->i18n),
            'not_found_in_trash'    => __('No ' . strtolower($this->many) . ' found in Trash.', $this->i18n),
            'parent_item_colon'     => __('Parent ' . $this->many . ':', $this->i18n),
            'all_items'             => __('All ' . $this->many, $this->i18n),
            'archives'              => __($this->one . ' Archives', $this->i18n),
            'attributes'            => __($this->one . ' Attributes', $this->i18n),
            'insert_into_item'      => __('Insert into ' . strtolower($this->one), $this->i18n),
            'uploaded_to_this_item' => __('Uploaded to this ' . strtolower($this->one), $this->i18n),
            'filter_items_list'     => __('Filter ' . strtolower($this->many) . ' list', $this->i18n),
            'items_list_navigation' => __($this->many . ' list navigation', $this->i18n),
            'items_list'            => __($this->many . ' list', $this->i18n)
        ];

        return $this;
    }
647097
def add_label(self, name, color):
        """"""
        color_upper = color.upper()
        if not self._color_re.match(color_upper):
            raise ValueError('Invalid color: {}'.format(color))

        labels_tag = self.root[0]
        last_id = int(labels_tag[-1].get('id'))
        new_id = str(last_id + 1)

        new_label = etree.Element('label', id=new_id, color=color_upper)
        new_label.text = name

        labels_tag.append(new_label)
554655
public void setLabelAnimator(LabelAnimator labelAnimator) {
        if (labelAnimator == null) {
            this.labelAnimator = new DefaultLabelAnimator();
        } else {
            if (this.labelAnimator != null) {
                labelAnimator.setLabelAnchored(getInputWidget(), getFloatingLabel(), this.labelAnimator.isAnchored());
            }
            this.labelAnimator = labelAnimator;
        }

        if (isInEditMode()) {
            this.labelAnimator.setLabelAnchored(getInputWidget(), getFloatingLabel(), false);
        }
    }
347323
function addlabel(name, opts) {
    opts = opts || {};

    var type  = opts.type;
    var token = opts.token;
    var islet = opts.islet;

    // Define label in the current function in the current scope.
    if (type === "exception") {
      if (_.has(funct["(context)"], name)) {
        if (funct[name] !== true && !state.option.node) {
          warning("W002", state.tokens.next, name);
        }
      }
    }

    if (_.has(funct, name) && !funct["(global)"]) {
      if (funct[name] === true) {
        if (state.option.latedef) {
          if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) ||
              !_.contains([funct[name], type], "unction")) {
            warning("W003", state.tokens.next, name);
          }
        }
      } else {
        if ((!state.option.shadow || _.contains([ "inner", "outer" ], state.option.shadow)) &&
            type !== "exception" || funct["(blockscope)"].getlabel(name)) {
          warning("W004", state.tokens.next, name);
        }
      }
    }

    if (funct["(context)"] && _.has(funct["(context)"], name) && type !== "function") {
      if (state.option.shadow === "outer") {
        warning("W123", state.tokens.next, name);
      }
    }

    // if the identifier is from a let, adds it only to the current blockscope
    if (islet) {
      funct["(blockscope)"].current.add(name, type, state.tokens.curr);
    } else {
      funct["(blockscope)"].shadow(name);
      funct[name] = type;

      if (token) {
        funct["(tokens)"][name] = token;
      }

      setprop(funct, name, { unused: opts.unused || false });

      if (funct["(global)"]) {
        global[name] = funct;
        if (_.has(implied, name)) {
          if (state.option.latedef) {
            if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) ||
                !_.contains([funct[name], type], "unction")) {
              warning("W003", state.tokens.next, name);
            }
          }

          delete implied[name];
        }
      } else {
        scope[name] = funct;
      }
    }
  }
1092987
protected function addDefaultListField()
    {
        if (!in_array(Api::API_LIST_NAME_FIELD, array_values($this->extraColumns))) {
            /** @var TableMap $tableMap */
            $tableMap = $this->getTableMap();
            /** @var ColumnMap $column */
            $column = null;
            if ($tableMap->hasColumn('NAME')) {
                $column = $tableMap->getColumn('NAME');
            } elseif ($tableMap->hasColumn('TITLE')) {
                $column = $tableMap->getColumn('TITLE');
            } elseif ($tableMap->hasColumn('LABEL')) {
                $column = $tableMap->getColumn('LABEL');
            }
            if (null !== $column) {
                $this->extraColumns[$column->getFullyQualifiedName()] = Api::API_LIST_NAME_FIELD;
            } else {
                $this->addClassListName($tableMap);
            }
        }
    }
1104506
def default_value(self, default_value):
        
        # For custom value
        if default_value not in self.default_values:
            if len(self.default_labels) == len(self.default_values):
                self.default_values[-1] = default_value
            else:
                self.default_values.append(default_value)

        self._default_value = default_value
266101
public function setLabel()
    {
        if($this->settings->getValue(InputSettings::LABEL_PARAM)) {
            $this->element->setLabel($this->settings->getValue(InputSettings::LABEL_PARAM));
        } else {
            $this->element->setLabel(preg_replace('/.*\\\/', '', get_class($this)));
        }
    }
1312596
private void addTopLeftLabel() {
        topLeftLabel = new JLabel();
        topLeftLabel.setOpaque(true);
        topLeftLabel.setVisible(false);
        centerPanel.add(topLeftLabel, CC.xywh(
            constantTopLeftLabelCell.x, constantTopLeftLabelCell.y, 1, 3));
    }
1088376
public void addSequenceLabel(@NonNull T label) {
        this.labels.add(label);
        if (this.label == null)
            this.label = label;
    }
975298
protected function setupLabel()
    {
        if ($this->getOption('label') !== null) {
            return;
        }

        if ($template = $this->parent->getTranslationTemplate()) {
            $label = str_replace(
                ['{name}', '{type}'],
                [$this->getRealName(), 'label'],
                $template
            );
        } elseif ($langName = $this->parent->getLanguageName()) {
            $label = sprintf('%s.%s', $langName, $this->getRealName());
        } else {
            $label = $this->getRealName();
        }

        $this->setOption('label', $this->formHelper->formatLabel($label));
    }
2026
def add_label_to_table(self, row, col, txt):
        """"""
        label = QLabel(txt)
        label.setMargin(5)
        label.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
        self.table.setCellWidget(row, col, label)
340334
public void setLabel(java.lang.String label) {
        getStateHelper().put(PropertyKeys.label, label);
    }
491208
def setLabel(self, value, label):
        
        if label:
            self._labels[value] = label
        else:
            self._labels.pop(value, None)
699453
public void add(Collection<Label> labels)
    {
        for(Label label : labels)
            this.labels.put(label.getKey(), label);
    }
1267763
protected function addDefaultLabel() {
        if ($this->isDefaultEanLabelEnabled()) {
            $this->processChecksum();
            $label = $this->getLabel();
            $font = $this->font;

            $this->labelLeft = new CINLabel(substr($label, 0, 4), $font, CINLabel::POSITION_BOTTOM, CINLabel::ALIGN_LEFT);
            $labelLeftDimension = $this->labelLeft->getDimension();
            $this->labelLeft->setOffset(($this->scale * 30 - $labelLeftDimension[0]) / 2 + $this->scale * 2);

            $this->labelRight = new CINLabel(substr($label, 4, 3) . $this->keys[$this->checksumValue], $font, CINLabel::POSITION_BOTTOM, CINLabel::ALIGN_LEFT);
            $labelRightDimension = $this->labelRight->getDimension();
            $this->labelRight->setOffset(($this->scale * 30 - $labelRightDimension[0]) / 2 + $this->scale * 34);

            $this->addLabel($this->labelLeft);
            $this->addLabel($this->labelRight);
        }
    }
233937
private void addLabelHoverHandler(Label label) {

        removeLabelHoverHandler();
        LabelHoverHandler hoverHandler = new LabelHoverHandler();
        m_labelOutRegistration = label.addMouseOutHandler(hoverHandler);
        m_labelOverRegistration = label.addMouseOverHandler(hoverHandler);
    }