Add a graph to Metrics

@param title The title of the Graph
@param value The value of the entry
960914
public void addMetricsGraph(String title, String value) {
        if (metrics != null) {
            Metrics.Graph graph = metrics.createGraph(title);
            graph.addPlotter(new Metrics.Plotter(value) {
                @Override
                public int getValue() {
                    return 1;
                }
            });
        }
    }
340665
public ProgressMonitor createProgressMonitor(String title) {
    ProgressState state = new ProgressState(title);
    states.add(state);
    return state;
  }
382813
def add_annotation_value(graph, annotation, value):
    
    if annotation not in graph.defined_annotation_keywords:
        raise ValueError('annotation not defined: {}'.format(annotation))

    for u, v, k in graph.edges(keys=True):
        if ANNOTATIONS not in graph[u][v][k]:
            continue

        if annotation not in graph[u][v][k][ANNOTATIONS]:
            graph[u][v][k][ANNOTATIONS][annotation] = {}

        graph[u][v][k][ANNOTATIONS][annotation][value] = True
1105811
public void add(
      double value
  )
  {
    readWriteLock.writeLock().lock();

    try {
      if (value < lowerLimit) {
        outlierHandler.handleOutlierAdd(false);
        return;
      } else if (value >= upperLimit) {
        outlierHandler.handleOutlierAdd(true);
        return;
      }

      count += 1;
      if (value > max) {
        max = value;
      }
      if (value < min) {
        min = value;
      }

      double valueRelativeToRange = value - lowerLimit;
      int targetBucket = (int) (valueRelativeToRange / bucketSize);

      if (targetBucket >= histogram.length) {
        targetBucket = histogram.length - 1;
      }

      histogram[targetBucket] += 1;
    }
    finally {
      readWriteLock.writeLock().unlock();
    }
  }
586139
private void addInlineDefinitionTitle(MarkupDocBuilder markupDocBuilder, String title, String anchor) {
        markupDocBuilder.anchor(anchor);
        markupDocBuilder.newLine();
        markupDocBuilder.boldTextLine(title);
    }
1010633
@Override
	public void setProperty(final String name, final Object value) {

		final Properties properties = getProperties();
		boolean hasChanges          = false;

		if (value == null) {

			if (properties.containsKey(name)) {

				properties.remove(name);
				hasChanges = true;
			}

		} else {

			properties.setProperty(name, value.toString());
			hasChanges = true;
		}

		if (hasChanges) {

			final File propertiesFile   = new File(databasePath + "/graph.properties");

			try (final Writer writer = new FileWriter(propertiesFile)) {

				properties.store(writer, "Created by Structr at " + new Date());

			} catch (IOException ioex) {

				logger.warn("Unable to write properties file", ioex);
			}
		}
	}
1093255
private static void addMarkerLine(String label, Double value, Double offset, Axis axis) {
    if (value != null) {
      MarkerLine markerLine = MarkerLineImpl.create(axis, NumberDataElementImpl.create(value + (offset != null ? offset : 0d)));
      markerLine.getLineAttributes().setStyle(LineStyle.DASHED_LITERAL);
      markerLine.getLabel().getCaption().setValue(label);
      markerLine.setLabelAnchor(Anchor.NORTH_EAST_LITERAL);
    }
  }
1139117
def __set_title(self, value):
        
        # OpenOffice on Debian "squeeze" ignore value of target.XAxis.String
        # unless target.HasXAxisTitle is set to True first. (Despite the
        # fact that target.HasXAxisTitle is reported to be False until
        # target.XAxis.String is set to non empty value.)
        self._target.setPropertyValue(self._has_axis_title_property, True)
        target = self._get_title_target()
        target.setPropertyValue('String', text_type(value))
196910
public void setExtension(org.kie.dmn.model.api.dmndi.DiagramElement.Extension value) {
        this.extension = value;
    }
608185
public void setTitle(final String title) {
        if (title == null && this.title == null) {
            return;
        } else if (title == null) {
            removeChild(this.title);
            this.title = null;
        } else if (this.title == null) {
            this.title = new KeyValueNode<String>(CommonConstants.CS_TITLE_TITLE, title);
            appendChild(this.title, false);
        } else {
            this.title.setValue(title);
        }
    }
246817
public void addHeader(String name, String value) {
		if(logger.isDebugEnabled()) {
			logger.debug("addHeader - name=" + name + ", value=" + value);
		}

		checkCommitted();
		addHeaderInternal(name, value, false);
	}
462874
private void showTitle(@Nullable final CharSequence title) {
        ActionBar actionBar = getSupportActionBar();

        if (actionBar != null) {
            if (isSplitScreen()) {
                if (toolbarLarge != null) {
                    toolbarLarge.setTitle(title);
                }

                actionBar.setTitle(null);
            } else {
                actionBar.setTitle(title);
            }
        }
    }
1094521
public void addText(String label,
                        String value)
    {
        Composite c = new Composite();
        c.add(value);
        addField(label,c);
    }
649068
def title(self, value: typing.Union[None, str]):
        
        if not self._project:
            raise RuntimeError('Failed to assign title to an unloaded project')
        self._project.title = value
502140
public void addTitle(String title) {
		XmpArray array = new XmpArray(XmpArray.ALTERNATIVE);
		array.add(title);
		setProperty(TITLE, array);
	}
596639
public void write(WeightedGraph<? extends WeightedEdge> g, 
                      File gexfFile, Indexer<String> vertexLabels) 
            throws IOException {

        DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
        DocumentBuilder docBuilder = null;
        try {
            docBuilder = dbfac.newDocumentBuilder();
        } catch (ParserConfigurationException pce) {
            throw new IOError(new IOException(pce));
        }
        Document doc = docBuilder.newDocument();

        Element root = doc.createElement("gexf");
        root.setAttribute("xmlns","http://www.gexf.net/1.2draft");
        root.setAttribute("xmlns:viz", "http://www.gexf.net/1.2draft/viz");
        root.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
        root.setAttribute("version","1.2");
        root.setAttribute("xsi:schemaLocation","http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd");
        doc.appendChild(root);

        Element graph = doc.createElement("graph");
        graph.setAttribute("defaultedgetype","undirected");
        root.appendChild(graph);

        Element nodes = doc.createElement("nodes");
        graph.appendChild(nodes);
        Element edges = doc.createElement("edges");
        graph.appendChild(edges);

        IntIterator vIter = g.vertices().iterator();
        while (vIter.hasNext()) {
            int vertex = vIter.next();
            Element node = doc.createElement("node");
            String vLabel = (vertexLabels == null)
                ? String.valueOf(vertex)
                : vertexLabels.lookup(vertex);
            if (vLabel == null)
                vLabel = String.valueOf(vertex);
            node.setAttribute("id", vLabel);
            node.setAttribute("label", vLabel);
            nodes.appendChild(node);
        }

        int edgeId = 0;
        for (WeightedEdge e : g.edges()) {
            Element edge = doc.createElement("edge");
            edges.appendChild(edge);
            edge.setAttribute("id", "" + (edgeId++));

            String sourceLabel = (vertexLabels == null)
                ? String.valueOf(e.from())
                : vertexLabels.lookup(e.from());
            if (sourceLabel == null)
                sourceLabel = String.valueOf(e.from());

            String targetLabel = (vertexLabels == null)
                ? String.valueOf(e.to())
                : vertexLabels.lookup(e.to());
            if (targetLabel == null)
                targetLabel = String.valueOf(e.to());

            edge.setAttribute("source", sourceLabel);
            edge.setAttribute("target", targetLabel);
            edge.setAttribute("weight", String.valueOf(e.weight()));
        }

        // Set up a transformer
        try {
            TransformerFactory transfac = TransformerFactory.newInstance();
            Transformer trans = transfac.newTransformer();
            trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
            trans.setOutputProperty(OutputKeys.INDENT, "yes");
            trans.setOutputProperty(
                "{http://xml.apache.org/xslt}indent-amount", "2");
        
            // Create string from xml tree
            BufferedOutputStream bos = 
                new BufferedOutputStream(new FileOutputStream(gexfFile));
            StreamResult result = new StreamResult(bos);
            DOMSource source = new DOMSource(doc);
            trans.transform(source, result);
            bos.close();         
        } catch (TransformerException te) {
            throw new IOError(new IOException(te));
        }
    }
101730
public void addHeader(HeaderTypes name, String value) {
        headerEntries.add(new HeaderEntry(name.toString(), value));
    }