public void setLabelColor(Color c) { if (c != null) { TextProperties textProps = edge.getTextProperties(); textProps.setColor(c); } } }
public void setLabelColor(Color c) { if (c != null) { TextProperties textProps = node.getTextProperties(); textProps.setColor(c); } } }
@Override public void transform(Element element, Partition partition, Object value) { Color color = partition.getColor(value); if (color == null) { color = Color.BLACK; } element.getTextProperties().setColor(color); }
@Override public void transform(Element element, Ranking ranking, Interpolator interpolator, Number value) { Color color = linearGradient.getValue(ranking.normalize(value, interpolator)); element.getTextProperties().setColor(color); }
@Override public void transform(Element element) { element.getTextProperties().setColor(color); element.getTextProperties().setAlpha(1f); }
@Override public void actionPerformed(ActionEvent evt) { GraphController gc = Lookup.getDefault().lookup(GraphController.class); GraphModel gm = gc.getGraphModel(); Graph graph = gm.getGraphVisible(); for (Node n : graph.getNodes().toArray()) { n.getTextProperties().setColor(Color.BLACK); n.getTextProperties().setAlpha(0f); } for (Edge e : graph.getEdges().toArray()) { e.getTextProperties().setColor(Color.BLACK); e.getTextProperties().setAlpha(0f); } } });
private void copyTextProperties(TextProperties text, TextProperties textCopy) { textCopy.setColor(text.getColor()); textCopy.setSize(text.getSize()); textCopy.setVisible(text.isVisible()); }
private void copyTextProperties(TextProperties text, TextProperties textCopy) { textCopy.setColor(text.getColor()); textCopy.setSize(text.getSize()); textCopy.setVisible(text.isVisible()); }