private int getAvailableWidth(int column, int graphWidth) {
      int textAndLabelsWidth = myGraphTable.getColumnModel().getColumn(column).getWidth() - graphWidth;
      int freeSpace = textAndLabelsWidth - super.getPreferredSize().width;
      int allowedSpace;
      if (myReferencePainter.isCompact()) {
        allowedSpace = Math.min(freeSpace, textAndLabelsWidth / 3);
      }
      else {
        allowedSpace = Math.max(freeSpace, Math.max(textAndLabelsWidth / 2, textAndLabelsWidth - JBUIScale.scale(DISPLAYED_MESSAGE_PART)));
      }
      return Math.max(0, allowedSpace);
    }
private int getAvailableWidth(int column, int graphWidth)