@Override public void mouseClicked(MouseEvent e){
  int col;
  boolean popup;
  col=m_TableData.columnAtPoint(e.getPoint());
  popup=((e.getButton() == MouseEvent.BUTTON3) && (e.getClickCount() == 1)) || ((e.getButton() == MouseEvent.BUTTON1) && (e.getClickCount() == 1) && e.isAltDown()&& !e.isControlDown()&& !e.isShiftDown());
  popup=popup && (getInstances() != null);
  if (e.getSource() == m_TableData.getTableHeader()) {
    m_CurrentCol=col;
    if (popup) {
      e.consume();
      setMenu();
      initPopupMenus();
      m_PopupHeader.show(e.getComponent(),e.getX(),e.getY());
    }
  }
 else   if (e.getSource() == m_TableData) {
    if (popup) {
      e.consume();
      setMenu();
      initPopupMenus();
      m_PopupRows.show(e.getComponent(),e.getX(),e.getY());
    }
  }
  if ((e.getButton() == MouseEvent.BUTTON1) && (e.getClickCount() == 1) && (!e.isAltDown())&& (col > -1)) {
    m_TableData.setSelectedColumn(col);
  }
}

@ Override public void mouseClicked ( MouseEvent e ) { int col ; boolean popup ; col = m_TableData . columnAtPoint ( e . getPoint ( ) ) ; popup = ( ( e . getButton ( ) == MouseEvent . BUTTON3 ) && ( e . getClickCount ( ) == 1 ) ) || ( ( e . getButton ( ) == MouseEvent . BUTTON1 ) && ( e . getClickCount ( ) == 1 ) && e . isAltDown ( ) && ! e . isControlDown ( ) && ! e . isShiftDown ( ) ) ; popup = popup && ( getInstances ( ) != null ) ; if ( e . getSource ( ) == m_TableData . getTableHeader ( ) ) { m_CurrentCol = col ; if ( popup ) { e . consume ( ) ; setMenu ( ) ; initPopupMenus ( ) ; m_PopupHeader . show ( e . getComponent ( ) , e . getX ( ) , e . getY ( ) ) ; } } else if ( e . getSource ( ) == m_TableData ) { if ( popup ) { e . consume ( ) ; setMenu ( ) ; initPopupMenus ( ) ; m_PopupRows . show ( e . getComponent ( ) , e . getX ( ) , e . getY ( ) ) ; } } if ( ( e . getButton ( ) == MouseEvent . BUTTON1 ) && ( e . getClickCount ( ) == 1 ) && ( ! e . isAltDown ( ) ) && ( col > - 1 ) ) { m_TableData . setSelectedColumn ( col ) ; } }
invoked when a mouse button has been pressed and released on a component
