Package com.projity.pm.graphic.spreadsheet.selection

Examples of com.projity.pm.graphic.spreadsheet.selection.SpreadSheetSelectionModel


   
    if (spreadSheetColumnModel!=null){
      //System.out.println("creating new ColModel");
      setColumnModel(spreadSheetColumnModel);
 
      selection = new SpreadSheetSelectionModel(this);
      selection.setRowSelection(new SpreadSheetListSelectionModel(selection, true));
      selection.setColumnSelection(new SpreadSheetListSelectionModel(selection, false));
      setSelectionModel(selection.getRowSelection());
      createDefaultColumnsFromModel(spreadSheetModel.getFieldArray()); //Consume memory
      getColumnModel().setSelectionModel(selection.getColumnSelection());
View Full Code Here


                columnsPopup.show(sp,e.getX(),e.getY());
              }
            }
          }
        }else{
          SpreadSheetSelectionModel selection=spreadSheet.getSelection();
          selection.getColumnSelection().setSelectionInterval(0,spreadSheet.getColumnCount()-1);
          selection.getRowSelection().setSelectionInterval(0,spreadSheet.getRowCount()-1);
          spreadSheet.getRowHeader().getSelectionModel().setSelectionInterval(0,spreadSheet.getRowCount()-1);
          if (Environment.isMac()) setSelected(true);
        }
      }
    });
View Full Code Here

      DefaultTableColumnModel spreadSheetColumnModel) {
    TableModel oldModel=getModel();
      setModel(spreadSheetModel);
      setColumnModel(spreadSheetColumnModel);
     
      selection = new SpreadSheetSelectionModel(this);
    selection.setRowSelection(new SpreadSheetListSelectionModel(selection,
        true));
    selection.setColumnSelection(new SpreadSheetListSelectionModel(
        selection, false));
    setSelectionModel(selection.getRowSelection());
View Full Code Here

  public SpreadSheetNodeSelectionListener(){
  }
  public void valueChanged(ListSelectionEvent lse){
    if (lse.getValueIsAdjusting()) return; //it's not a final event
    SpreadSheetListSelectionModel listSelectionModel = (SpreadSheetListSelectionModel)lse.getSource();
    SpreadSheetSelectionModel selectionModel=listSelectionModel.getSelectionModel();
    CommonSpreadSheet spreadSheet=(CommonSpreadSheet)selectionModel.getTable();
    CommonSpreadSheetModel model=(CommonSpreadSheetModel)spreadSheet.getModel();
   
    int[] rows=spreadSheet.getSelectedRows();
    List nodes=new ArrayList(rows.length);
    Node currentNode = null;
View Full Code Here

  }
  public void mouseClicked(MouseEvent e){
    int col = table.columnAtPoint(e.getPoint());
    if  (SwingUtilities.isLeftMouseButton(e)) {
 
      SpreadSheetSelectionModel selection=table.getSelection();
      table.getRowHeader().clearSelection();
      selection.getColumnSelection().setSelectionInterval(col,col);
      selection.getRowSelection().setSelectionInterval(0,table.getRowCount()-1);
    } else if (SwingUtilities.isRightMouseButton(e)) {
      if (table instanceof CommonSpreadSheet && ((CommonSpreadSheet)table).getSpreadSheetCategory() != null){
        CommonSpreadSheet sp=(CommonSpreadSheet)table;
        if (sp.isHasColumnHeaderPopup()) {
          SpreadSheetColumnMenu columnsPopup = new SpreadSheetColumnMenu(sp,col+1);
View Full Code Here

TOP

Related Classes of com.projity.pm.graphic.spreadsheet.selection.SpreadSheetSelectionModel

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.