Creates a label followed by small text.

 Set the :small_text option to include small text.
427447
def label_with_small(f, method, text=nil, options = {}, &block)
      if text.is_a?(Hash)
        options = text
        text = nil
      end
      small_text = options.delete(:small_text)
      text = text || options.delete(:text) || method.to_s.humanize.capitalize
      lbl = f.label(method, text, options, &block) #do
      #  contents = text
      #  contents += "<small>#{h small_text}</small>" if small_text
      #  contents += yield if block_given?
      #  contents.html_safe
      #end
      lbl += "&nbsp;<small>(#{h small_text})</small>".html_safe if small_text
      lbl.html_safe
    end
126310
def concatenate(self, other):
        

        if self.is_absolute() and len(other) > 0:
            raise AbsoluteConcatenation
        labels = list(self.labels)
        labels.extend(list(other.labels))
        return Name(labels)
291458
def set_label(self):
		
		if not self.field.label or self.attrs.get("_no_label"):
			return

		self.values["label"] = format_html(
			LABEL_TEMPLATE, self.field.html_name, mark_safe(self.field.label)
		)
189957
def ylabelsize(self, size, index=1):
        
        self.layout['yaxis' + str(index)]['titlefont']['size'] = size
        return self
1095428
def labels(self, text=None, coordinates=None, colorlist=None, sizes=None, fonts=None, opacity=1.0):
        ''''''
        if coordinates is None:
            coordinates=self.coordinates
        l=len(coordinates)
        if text is None:
            if len(self.topology.get('atom_types'))==l:
                text=[self.topology['atom_types'][i]+str(i+1) for i in range(l)]
            else:
                text=[str(i+1) for i in range(l)]

        text_representation = self.add_representation('text', {'coordinates':   coordinates,
                                                               'text':        text,
                                                               'colors':      colorlist,
                                                               'sizes':       sizes,
                                                               'fonts':       fonts,
                                                               'opacity':     opacity})
        def update(self=self, text_representation=text_representation):
            self.update_representation(text_representation, {'coordinates': coordinates})

        self.update_callbacks.append(update)
1334641
def setText(self, text):
        
        self._text = text
        
        # update the label
        btn = self.widget()
        if btn:
            btn.setText(text)
801115
def add_label(self, doc, label, update_index=True):
        
        label = copy.copy(label)
        assert(label in self.labels.values())
        doc.add_label(label)
        if update_index:
            self.upd_doc(doc)
            self.commit()
1022816
protected Label createLabel(Composite parent, String text)
	{
		return SWTFactory.createLabel(parent, text, 1);
	}
1061612
def add_text(self, coords, text, color=(0, 0, 0)):
        
        source = vtk.vtkVectorText()
        source.SetText(text)
        mapper = vtk.vtkPolyDataMapper()
        mapper.SetInputConnection(source.GetOutputPort())
        follower = vtk.vtkFollower()
        follower.SetMapper(mapper)
        follower.GetProperty().SetColor(color)
        follower.SetPosition(coords)
        follower.SetScale(0.5)
        self.ren.AddActor(follower)
        follower.SetCamera(self.ren.GetActiveCamera())
266946
def labeled(label, value, justification = 12)
      if value
        title = "- #{label}:"
        if value.is_a?(Enumerable)
          lines = [wrap_string(title, indentation_level)]
          lines += value.map do |v|
            wrap_string("- #{v}", indentation_level + 2)
          end
          puts lines.join("\n")
        else
          string = title.ljust(justification) + "#{value}"
          puts wrap_string(string, indentation_level)
        end
      end
    end
498489
def label(self,x,y,label,offset=[0,0]):
        """"""
        (xc,yc)=self.p2c([x,y])
        return self.create_text(xc-offset[0],yc-offset[1],text=label)
1330019
def label_for(k, label: nil)
      tag(:label, for: k.to_s.dasherize){ label || k.to_s.titleize } unless label == false
    end
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)
1005404
def add_label(self, name, addr):
        

        # set the label
        self._symbolization_needed = True

        self.symbol_manager.new_label(addr, name=name, force=True)
1216830
def harmonizeLabelsTextWidth(labels, width=None):
    
    if width is None:
        width = labelsMaxTextWidth(labels)

    for label in labels:
        #label.setFixedWidth(width)
        label.setMinimumWidth(width)
1172043
def yticktext(self, labels, index=1):
        
        self.layout['yaxis' + str(index)]['ticktext'] = labels
        return self
1146480
def createLabel(self, name):
        
        if self.findLabel(name):
            raise exception.LabelException('Label exists')
        node = _node.Label()
        node.name = name
        self._labels[node.id] = node # pylint: disable=protected-access
        return node