private Rectangle getRegisterBounds(final int registerNumber) {

    final RegisterInformation register = registerModel.getRegisterInformation(registerNumber);

    final int x = 10;
    final int y = 7 + (registerNumber * font.getSize());
    final int width = 5 + (charWidth * (longestRegisterName + (register.getRegisterSize() * 2)));
    final int height = font.getSize() - 1;

    return new Rectangle(x, y, width, height);
  }
Calculates the pixel bounds of a register.

@param registerNumber The number of the register.
@return The pixel bounds of the register on the screen.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/JRegisterView/JRegisterView.java