public EdgeColorPlugin() {
}
@Override
public boolean apply(EdgeRenderingProperty p) {
NodeRenderingProperty node1 = p.node1;
NodeRenderingProperty node2 = p.node2;
if (node1.isSelected() && node2.isSelected()) {
// both ends of the edge is selected.
p.targetStrokeColor = Color.DARK_GRAY;
} else if (node1.isSelected()) {
// edges to the child of the selected node in blue
p.targetStrokeColor = Color.RED;
} else if (node2.isSelected()) {
// edges to the parent of the selected node in red
p.targetStrokeColor = Color.BLUE;
} else if (p.overriddenStrokeColor != null) {
p.targetStrokeColor = p.overriddenStrokeColor;
// TODO(yohann): Reimplement this with help from plugins