public static void highlightNode(final Node node, final boolean state) {
    final NodeRealizer r = ((Graph2D) node.getGraph()).getRealizer(node);

    if (r == null) {
      return;
    }

    if (state) {
      if (r.getLineType() == LineType.LINE_2) {
        r.setLineType(LineType.LINE_5);
      }
    } else {
      if (r.getLineType() == LineType.LINE_5) {
        r.setLineType(LineType.LINE_2);
      }
    }
  }
Highlights the border of a node.

@param node The node to highlight.
@param state True, to highlight the node. False, to unhighlight it.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/helpers/CNodeHighlighter.java