public void setLabelsColor(Color c) { if (c != null) { labelsColor = c; for (Edge edge : edges) { TextProperties textProps = edge.getTextProperties(); textProps.setR(c.getRed() / 255f); textProps.setG(c.getGreen() / 255f); textProps.setB(c.getBlue() / 255f); textProps.setAlpha(c.getAlpha() / 255f); } } }
public void setLabelsColor(Color c) { if (c != null) { labelsColor = c; for (Node node : nodes) { TextProperties textProps = node.getTextProperties(); textProps.setR(c.getRed() / 255f); textProps.setG(c.getGreen() / 255f); textProps.setB(c.getBlue() / 255f); textProps.setAlpha(c.getAlpha() / 255f); } } }
@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); } } });