HeightOfComponents (int newHistoryHeight, int newInputHeight) { var history = myFirst; int delta = newHistoryHeight - ((newHistoryHeight / history.getLineHeight()) * history.getLineHeight()); return new HeightOfComponents(newHistoryHeight - delta, newInputHeight + delta); }