g.fillRect(xend - 2, ypos - 2, 4, 4);
}
- int ystart = (int) (((SequenceNode) node.left()).ycount * chunk)
- + offy;
- int yend = (int) (((SequenceNode) node.right()).ycount * chunk)
+ int ystart = (int) (node.left() == null ? 0 : (((SequenceNode) node
+ .left()).ycount * chunk))
+ offy;
+ int yend = (int) (node.right() == null ? 0 : (((SequenceNode) node
+ .right()).ycount * chunk)) + offy;
Rectangle pos = new Rectangle(xend - 2, ypos - 2, 5, 5);
nodeHash.put(node, pos);
g.fillRect(xend - 2, ypos - 2, 4, 4);
}
- int ystart = (int) (((SequenceNode) node.left()).ycount * chunk)
- + offy;
- int yend = (int) (((SequenceNode) node.right()).ycount * chunk)
+ int ystart = (node.left() == null ? 0 : (int) (((SequenceNode) node
+ .left()).ycount * chunk)) + offy;
+ int yend = (node.right() == null ? 0 : (int) (((SequenceNode) node
+ .right()).ycount * chunk))
+ offy;
Rectangle pos = new Rectangle(xend - 2, ypos - 2, 5, 5);