Get a single selected label. If multiple options are selected, then the first one is returned.

@return A single selected label.
356341
public String getSelectedLabel() {
        List<WebElement> options = getElement().findElements(By.tagName("option"));
        for (WebElement option : options) {
            if (option.isSelected()) {
                return option.getText();
            }
        }
        return null;
    }
707988
public String getSelectedId() {

        Widget tab = getWidget(m_tabPanel.getSelectedIndex());
        String tabId = null;
        for (Entry<String, E> tabEntry : m_tabsById.entrySet()) {
            if (tabEntry.getValue().equals(tab)) {
                tabId = tabEntry.getKey();
                break;
            }
        }
        return tabId;
    }
635462
public Optional<String> getLabel(final Object targetObj) {
        ArgUtils.notNull(targetObj, "targetObj");
        
        return labelGetter.map(getter -> getter.get(targetObj)).orElse(Optional.empty());
    }
1281799
public static int getFirstRow(RowSelection selection) {
		return (selection == null || selection.getFirstRow() == null) ? 0 : selection.getFirstRow();
	}
884384
private Label getOrCreateLabel(final String name) {

		Label label = labelCache.get(name);
		if (label == null) {

			label = new LabelImpl(name);
			labelCache.put(name, label);
		}

		return label;
	}
14608
public Label buildLabel() {
        final Label label = createLabel();
        label.setImmediate(false);
        label.setWidth("-1px");
        label.setHeight("-1px");
        if (StringUtils.hasText(caption)) {
            label.setCaption(caption);
        }

        return label;
    }
194341
@Nullable
  @CheckForNull
  public String getLabel() {
    String label = getString(LABEL);
    return label != null ? label : getName();
  }
1040291
public String getLabelKey()
    {
        final StringBuilder keyStr = new StringBuilder();
        return keyStr.append(getStatusGroup().getName()).append("/Key.Status.").append(key).toString();
    }
464002
private JLabel getFoundCountValueLabel() {
		if (foundCountValueLabel == null) {
			foundCountValueLabel = new JLabel();
			foundCountValueLabel.setText(ZERO_REQUESTS_LABEL_TEXT);
		}
		return foundCountValueLabel;
	}
510290
public LabelAlphabet DefaultLabelAlphabet()	{
		IAlphabet alphabet = null;
		if (!maps.containsKey(DefalutLabelName))	{
			maps.put(DefalutLabelName, new LabelAlphabet());
			alphabet = maps.get(DefalutLabelName);
		}else	{
			alphabet = maps.get(DefalutLabelName);
			if (!(alphabet instanceof LabelAlphabet))	{
				throw new ClassCastException();
			}
		}
		return (LabelAlphabet) alphabet;
	}
1190297
public Option getSelectedItem() {
        for (Entry<OptionElement, Option> entry : itemMap.entrySet()) {
            Option opt = entry.getValue();
            if (opt.isSelected())
                return opt;
        }
        return null;
    }
968525
private JLabel getAddedCountNameLabel() {
		if (addedCountNameLabel == null) {
			addedCountNameLabel = new JLabel();
			addedCountNameLabel.setText(Constant.messages.getString("spider.toolbar.added.label"));
		}
		return addedCountNameLabel;
	}
1255900
public Label getNamedContinueLabel(String name) {
        Label label = getLabel(name);
        Label endLabel = null;
        if (name!=null) endLabel = (Label) namedLoopContinueLabel.get(name);
        if (endLabel!=null) label = endLabel;
        return label;
    }
1094311
def get_label(self, name):
        """"""
        label_tag = self._find_label(name)
        return _Label(label_tag.get('id'), label_tag.get('color'), label_tag.text)
945514
public function getLabel()
    {
        if ($this->label === null) {
            $this->label = ucwords(str_replace(array('-', '_', '.'), ' ', $this->id));
        }
        return $this->label;
    }
869278
@Override
	public String getLabel() {
		String l = label;
		if(l != null) return l;
		String p = path;
		if(p != null) {
			String filename = p.substring(p.lastIndexOf('/') + 1);
			if(filename.endsWith(DOT_EXTENSION)) filename = filename.substring(0, filename.length() - DOT_EXTENSION.length());
			if(filename.isEmpty()) throw new IllegalArgumentException("Invalid filename for diagram: " + p);
			return filename;
		}
		throw new IllegalStateException("Cannot get label, neither label nor path set");
	}
549541
protected function getLabel(): string
    {
        if ($this->label != null) {
            return $this->label;
        }

        if (isset($this->model->attributeLabels()[$this->name])) {
            return $this->model->attributeLabels()[$this->name];
        }

        return ucfirst($this->name);
    }