Adds the given label to the monitor with the given id.
@param monitorId The id of the monitor to update
@param label The label to add
@return The label that was added
979429
public Optional<Label> createLabel(String monitorId, Label label)
    {
        HTTP.POST(String.format("/v1/monitors/%s/labels", monitorId), label.getKey());
        return Optional.of(label);
    }
127156
public Axis removeLabel(String label) {
        if (labels == null) {
            throw new IllegalStateException();
        }

        labels.remove(label);
        setSlice();
        initGridLabels();
        return this;
    }
237576
public static InsnList addLabel(LabelNode labelNode) {
        Validate.notNull(labelNode);

        InsnList ret = new InsnList();
        ret.add(labelNode);

        return ret;
    }
699539
public int addSection (String label, ListModel model)
    {
        add(new JLabel(label));
        add(new JList(model));
        return getSectionCount()-1;
    }
770182
public LabelCache labels(String monitorId)
    {
        LabelCache cache = labels.get(monitorId);
        if(cache == null)
            labels.put(monitorId, cache = new LabelCache(monitorId));
        return cache;
    }
44125
public int add(T label,float score) {
		int j = 0;

		for(; j < labels.size(); j++)
			if(scores.get(j) < score){
				labels.add(j, label);
				scores.add(j,score);
				break;
			}

		if(j == labels.size() && labels.size() < k){
			labels.add(j, label);
			scores.add(j,score);
		}

		if(labels.size() > k){
			labels.removeLast();
			scores.removeLast();
		}
		return j;
	}
87892
public void setLabels(java.util.Collection<Label> labels) {
        if (labels == null) {
            this.labels = null;
            return;
        }

        this.labels = new java.util.ArrayList<Label>(labels);
    }
1222496
public static Label newLabel(final String id, final String forId,
		final ResourceBundleKey resourceBundleKey, final Component component)
	{
		return ComponentFactory.newLabel(id, forId,
			ResourceModelFactory.newResourceModel(resourceBundleKey, component));
	}
677848
public void addLabel(Label label)
    {
        // Add the label to any applications it is associated with
        List<Long> applicationIds = label.getLinks().getApplications();
        for(long applicationId : applicationIds)
        {
            Application application = applications.get(applicationId);
            if(application != null)
                labels(applicationId).add(label);
            else
                logger.severe(String.format("Unable to find application for label '%s': %d", label.getKey(), applicationId));
        }
    }
302297
public static <T> Label newLabel(final String id, final String forId, final IModel<T> model)
	{
		final Label label = new Label(id, model);
		label.add(new AttributeAppender("for", Model.of(forId), " "));
		label.setOutputMarkupId(true);
		return label;
	}
179132
public Input addButton(String tag,
                           String label)
    {
        if (buttons==null)
            buttonsAtBottom();
        Input e = new Input(Input.Submit,tag,label);

        if (extendRow)
            addField(null,e);
        else
            buttons.add(e);
        return e;
    }
122626
public void setLabel(String label) {
		this.label = label;
		// if (GRAPHICS == null) return;
		bounds = METRICS.getStringBounds(getLabel(), GRAPHICS);
		boolean upsideDown = end.x < start.x;
		float dx = (float) bounds.getWidth() / 2.0f;
		float dy = (curvy < 0.0f) ^ upsideDown ? METRICS.getAscent() : -METRICS
				.getDescent();
		bounds.setRect(bounds.getX() - dx, bounds.getY() + dy, bounds
				.getWidth(), bounds.getHeight());
		//System.out.println("Setting label" + label);
	}
570815
public void insertItem (T item, int index, String label)
    {
        insertItem(label == null ? toLabel(item) : label, index);
        _items.add(index, item);
    }
482392
public AtomicCounter newCounter(final String label, final int typeId)
    {
        return new AtomicCounter(valuesBuffer, allocate(label, typeId), this);
    }
373343
public void selectByLabel(String label) {
        getDispatcher().beforeSelect(this, label);
        
        new Select(getElement()).selectByVisibleText(label);
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIActions(UIActions.SELECTED, label);
        }
        
        getDispatcher().afterSelect(this, label);
    }
161232
def label_with_id(label_id, options = {})
      if options && options[:index] then
        label(:id => label_id.to_s, :index => options[:index]).text
      else
        label(:id, label_id.to_s).text
      end
    end
954121
public WField addField(final WLabel label, final WComponent field) {
		WField wField = new WField(label, field);
		add(wField);

		return wField;
	}