@Override public void mousePressed(MouseEvent e) {
      if (mySelectedContainer == null) return;
      IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(GridCaptionPanel.this, true));
      Point pnt = SwingUtilities.convertPoint(GridCaptionPanel.this, e.getPoint(),
                                              mySelectedContainer.getDelegee());
      if (canResizeCells()) {
        myResizeLine = mySelectedContainer.getGridLayoutManager().getGridLineNear(mySelectedContainer, myIsRow, pnt, 4);
      }
      if (!checkShowPopupMenu(e)) {
        int cell = getCellAt(e.getPoint());
        if (cell == -1) return;
        if ((e.getModifiers() & MouseEvent.CTRL_MASK) != 0) {
          mySelectionModel.addSelectionInterval(cell, cell);
        }
        else if ((e.getModifiers() & MouseEvent.SHIFT_MASK) != 0) {
          mySelectionModel.addSelectionInterval(mySelectionModel.getAnchorSelectionIndex(), cell);
        }
      }
    }
@Override public void mousePressed(MouseEvent e)