Package com.projity.pm.graphic.spreadsheet

Examples of com.projity.pm.graphic.spreadsheet.SpreadSheetPopupMenu


   
    if (table instanceof SpreadSheet){
      final SpreadSheet spreadSheet=(SpreadSheet)table;
      addMouseListener(new MouseAdapter() {
      public void mousePressed(MouseEvent e) {
        SpreadSheetPopupMenu popup=getPopup();
        if (SwingUtilities.isLeftMouseButton(e)){
          if (e.getClickCount()==2){
            ((SpreadSheet)table).doDoubleClick(0,0);
//            Component comp=SpreadSheetRowHeader.this;
//            while(!((comp=comp.getParent()) instanceof MainFrame));
//            MainFrame mainFrame=(MainFrame)comp;
//            mainFrame.doInformationDialog(false);
//
          }
        }else if (popup!=null&&SwingUtilities.isRightMouseButton(e)){ //e.isPopupTrigger() can be used too
          Point p = e.getPoint();
          int row = rowAtPoint(p);
          int col = columnAtPoint(p);
          table.selection.getRowSelection().addSelectionInterval(row, row);
         
          popup.setRow(row);
          popup.setCol(0);
          popup.show(SpreadSheetRowHeader.this,e.getX(),e.getY());
        }
      }
    });
    }
View Full Code Here

TOP

Related Classes of com.projity.pm.graphic.spreadsheet.SpreadSheetPopupMenu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.