label = new LabelFigure(string, font, 1.0,
SwingConstants.SOUTH_WEST);
// Shift the label right so it doesn't
// collide with ports.
label.translateTo(x + 5, y);
} else if (direction == SwingConstants.WEST) {
// The 1.0 argument is the padding.
label = new LabelFigure(string, font, 1.0,
SwingConstants.SOUTH_EAST);