public static Rectangle rectangleFromOPPNode(OPPNode node) {
   Rectangle r = new Rectangle();
   r.setX(node.getX());
   r.setY(node.getY());
   r.setWidth(node.getWidth());
   r.setHeight(node.getHeight());
   return r;
 }
 public static int right(OPPNode node) {
   return node.getX() + node.getWidth();
 }
 public static int left(OPPNode node) {
   return node.getX();
 }
 public static int top(OPPNode node) {
   return node.getY();
 }
 public static int bottom(OPPNode node) {
   return node.getY() + node.getHeight();
 }
 public static boolean isNodeAboveNode(OPPNode node1, Rectangle node2) {
   return node1.getY() + node1.getHeight() + 10 < node2.y;
 }
 public static Point getCenter(OPPNode node) {
   int x = node.getX() + node.getWidth() / 2;
   int y = node.getY() + node.getHeight() / 2;
   return new Point(x, y);
 }