Creates the default labels to be used with this CPT.

@since 0.10
492902
private function set_default_labels() {
		$this->labels = array(
			'name' => $this->interpolate( '%s', $this->plural ),
			'singular_name' => $this->interpolate( '%s', $this->singular ),
			'add_new' => $this->interpolate( 'Add New' ),
			'all_items' => $this->interpolate( 'All %s', $this-> plural ),
			'new_item' => $this->interpolate( 'New %s', $this->singular ),
			'edit_item' => $this->interpolate( 'Edit %s', $this->singular ),
			'add_new_item' => $this->interpolate( 'Add New %s', $this->singular ),
			'view_item' => $this->interpolate( 'View %S', $this->singular ),
			'menu_name' => $this->interpolate( '%s', $this->plural ),
			'search_items' => $this->interpolate( 'Search %s', $this->plural ),
			'not_found' => $this->interpolate( 'No %s found.', $this->plural ),
			'not_found_in_trash' => $this->interpolate( 'No %s found in trash.', $this->plural ),
		);
	}
421037
private function setLabels()
    {
        $this->labels = [
            'name'               => ucwords($this->plural),
            'singular_name'      => ucwords($this->singular),
            'menu_name'          => ucwords($this->plural),
            'name_admin_bar'     => ucwords($this->singular),
            'add_new'            => 'Add New',
            'add_new_item'       => 'Add New ' . ucwords($this->singular),
            'new_item'           => 'New ' . $this->singular,
            'edit_item'          => 'Edit ' . $this->singular . ' details',
            'view_item'          => 'View ' . $this->singular,
            'all_items'          => 'All ' . $this->plural,
            'search_items'       => 'Search ' . $this->plural,
            'parent_item_colon'  => 'Parent ' . $this->plural . ':',
            'not_found'          => 'No ' . $this->plural . ' found.',
            'not_found_in_trash' => 'No ' . $this->plural . ' found in Trash.'
        ];
    }
1270145
public function useNameAsDefaultLabel($append = ':')
    {
        if (!isset($this['label'])) {
            $this['label'] = ucfirst(strtolower(str_replace(array('-','_'), ' ', $this['name']))).$append;
        }
    }
1268322
protected function setupDefaultClasses()
    {
        $defaultClasses = self::config()->get('default_classes');
        if ($defaultClasses) {
            foreach ($defaultClasses as $class) {
                $this->addExtraClass($class);
            }
        }
    }
978641
private void initLabels() {

        m_addressLabel.setText(Messages.get().key(Messages.GUI_LOCATION_ADDRESS_0));
        m_longitudeLabel.setText(Messages.get().key(Messages.GUI_LOCATION_LONGITUDE_0));
        m_latitudeLabel.setText(Messages.get().key(Messages.GUI_LOCATION_LATITUDE_0));
        m_sizeLabel.setText(Messages.get().key(Messages.GUI_LOCATION_SIZE_0));
        m_zoomLabel.setText(Messages.get().key(Messages.GUI_LOCATION_ZOOM_0));
        m_typeLabel.setText(Messages.get().key(Messages.GUI_LOCATION_TYPE_0));
        m_modeLabel.setText(Messages.get().key(Messages.GUI_LOCATION_MODE_0));

        m_okButton.setText(Messages.get().key(Messages.GUI_OK_0));
        m_okButton.setUseMinWidth(true);
        m_okButton.setButtonStyle(ButtonStyle.TEXT, ButtonColor.BLUE);
        m_cancelButton.setText(Messages.get().key(Messages.GUI_CANCEL_0));
        m_cancelButton.setUseMinWidth(true);
        m_cancelButton.setButtonStyle(ButtonStyle.TEXT, ButtonColor.BLUE);
    }
981313
private void drawLabels() {
		// Abort if not attached
		if (!isAttached()) {
			return;
		}

		// Draw the labels
		int lineWidth = lineElement.getOffsetWidth();
		if (numLabels > 0) {
			// Create the labels or make them visible
			for (int i = 0; i <= numLabels; i++) {
				Element label = null;
				if (i < labelElements.size()) {
					label = labelElements.get(i);
				} else { // Create the new label
					label = DOM.createDiv();
					DOM.setStyleAttribute(label, "position", "absolute");
					DOM.setStyleAttribute(label, "display", "none");
					if (enabled) {
						DOM.setElementProperty(label, "className", "ks-SliderBar-label");
					} else {
						DOM.setElementProperty(label, "className", "ks-SliderBar-label-disabled");
					}
					DOM.appendChild(getElement(), label);
					labelElements.add(label);
				}

				// Set the label text
				double value = minValue + (getTotalRange() * i / numLabels);
				DOM.setStyleAttribute(label, "visibility", "hidden");
				DOM.setStyleAttribute(label, "display", "");
				DOM.setElementProperty(label, "innerHTML", formatLabel(value));

				// Move to the left so the label width is not clipped by the
				// shell
				DOM.setStyleAttribute(label, "left", "0px");

				// Position the label and make it visible
				int labelWidth = label.getOffsetWidth();
				int labelLeftOffset = lineLeftOffset + (lineWidth * i / numLabels) - (labelWidth / 2);
//				labelLeftOffset = Math.min(labelLeftOffset, lineLeftOffset + lineWidth - labelWidth);
//				labelLeftOffset = Math.max(labelLeftOffset, lineLeftOffset);
				DOM.setStyleAttribute(label, "left", labelLeftOffset + "px");
				DOM.setStyleAttribute(label, "visibility", "visible");
			}

			// Hide unused labels
			for (int i = (numLabels + 1); i < labelElements.size(); i++) {
				DOM.setStyleAttribute(labelElements.get(i), "display", "none");
			}
		} else { // Hide all labels
			for (Element elem : labelElements) {
				DOM.setStyleAttribute(elem, "display", "none");
			}
		}
	}
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;
	}
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));
    }
595897
function autoAlignLabel() {
			// Auto-align label, depending on it's position
			if (!settings.hasOwnProperty("label") || (settings.hasOwnProperty("label") && !settings.label.hasOwnProperty("align"))) {
				switch(options.label.position) {
				case "left":
					options.label.align = "right";
					break;
				case "right":
					options.label.align = "left";
					break;
				default:
					options.label.align = "center";
				}

				if (options.label.rotate === "left") {
					options.label.align = "right";
				} else if (options.label.rotate === "right") {
					options.label.align = "left";
				}
			}

			if (!settings.hasOwnProperty("label") || (settings.hasOwnProperty("label") && !settings.label.hasOwnProperty("offset"))) {
				if (options.label.position === "left" || options.label.position === "right") {
					options.label.offset = {
						x: 10,
						y: 15
					};
				}
			}
		}
727455
public void setLabels(FileChooserLabels labels) {
		this.labels = labels;
		
		// Verify if the buttons for add a file or select a folder has been modified.
		if(labels != null) {
			LinearLayout root = this.chooser.getRootLayout();
			
			if(labels.labelAddButton != null) {
				Button addButton = (Button) root.findViewById(R.id.buttonAdd);
				addButton.setText(labels.labelAddButton);
			}
			
			if(labels.labelSelectButton != null) {
				Button okButton = (Button) root.findViewById(R.id.buttonOk);
				okButton.setText(labels.labelSelectButton);
			}			
		}
	}
483232
def accept_default_labels(self, other):
        

        self.units_label = other.units_label
        self.name_label = other.name_label
        self.notes_label = other.notes_label
        self.desc_label = other.desc_label
        self.plot_label = other.plot_label
        self.axis_label = other.axis_label
        self.scale_label = other.scale_label
        self.min_label = other.min_label
        self.max_label = other.max_label
        self.fill_label = other.fill_label
        return
790323
private void setupLabel() {
		// To retain compatibility with the WText API, create a WText for this component,
		// which gets added to the label body.
		WText textBody = new WText() {
			@Override
			public boolean isEncodeText() {
				return WHeading.this.isEncodeText();
			}

			@Override
			public String getText() {
				return WHeading.this.getText();
			}
		};

		if (label.getBody() == null) {
			label.setBody(textBody);
		} else {
			WComponent oldBody = label.getBody();

			WContainer newBody = new WContainer();
			label.setBody(newBody);

			newBody.add(textBody);
			newBody.add(oldBody);
		}
	}
374751
private Label createLabel(String label) {
        Pane pane = new Pane();
        root.addChild(pane);
        Label lbl = new Label();
        lbl.setName(label);
        pane.addChild(lbl);
        adjustPanes();
        return lbl;
    }
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;
    }
1118162
def initialize_labels(self, labels: Set[str]) -> Tuple[dict, dict]:
        """"""
        logger.debug("Creating mappings for labels")

        label_to_index = {label: index for index, label in enumerate(
                                 ["pad"] + sorted(list(labels)))}
        index_to_label = {index: phn for index, phn in enumerate(
                                 ["pad"] + sorted(list(labels)))}

        return label_to_index, index_to_label
216356
public final Statement labelStart(final Label label) {
    return new Statement() {
      @Override
      protected void doGen(CodeBuilder adapter) {
        adapter.mark(label);
        Statement.this.gen(adapter);
      }
    };
  }
544555
public void setLabelNames(List<String> labels) {
        if (labels == null) {
            this.labels = null;
            return;
        }
        this.labels = new ArrayList<>(labels);
    }