Dimension () { Dimension size = mySizeContainer.getContentSize(); if (isOneLineMode()) return new Dimension(size.width, getLineHeight()); if (mySettings.isAdditionalPageAtBottom()) { int lineHeight = getLineHeight(); return new Dimension(size.width, size.height + Math.max(getScrollingModel().getVisibleArea().height - 2 * lineHeight, lineHeight)); } return getContentSize(); }