Package com.projity.pm.graphic.spreadsheet

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


  public Node addNodeForImpl(Object impl) {
    return addNodeForImpl(impl,NodeModel.NORMAL);
  }
  public Node addNodeForImpl(Object impl,int eventType) {
    SpreadSheet spreadSheet = (SpreadSheet) getTopSpreadSheet();
    if (impl == null) {
      spreadSheet.executeAction(MenuActionConstants.ACTION_NEW);
      return null;
    } else {
      return spreadSheet.addNodeForImpl(impl,eventType);
    }
  }
View Full Code Here


 
  private SpreadSheet availabilitySpreadsheet;
  JScrollPane availabilityPane;
 
  protected JScrollPane createAvailabilitySpreadsheet() {
    availabilitySpreadsheet = new SpreadSheet() {
         protected void doPostExceptionTreatment() { // this is a bit of a hack.
           updateAvailabilitySpreadsheet();
           requestFocus();
         }
View Full Code Here

    }
 
  private SpreadSheet costTableSpreadsheets[] = new SpreadSheet[Settings.NUM_COST_RATES];
 
  protected SpreadSheet createCostTableSpreadsheet(CostRateTable costRateTable) {
       SpreadSheet ss = new SpreadSheet() {
         protected void doPostExceptionTreatment() {
           updateCostTableSpreadsheets();
           requestFocus();
         }

       };
       //ss.setActions(new String[]{SpreadSheet.DELETE});

    ss.setSpreadSheetCategory("costRates"); //$NON-NLS-1$
    ss.setCanSelectFieldArray(false);
//      ss.setHasRowPopup(false);

      return ss;

    }
View Full Code Here

    BaseView view=frame.getActiveTopView();
    SVGRenderer renderer;
    NodeModelCache cache;
    if (view instanceof GanttView){
      renderer=new GanttSVGRenderer();
      SpreadSheet sp=frame.getActiveSpreadSheet();
      SpreadSheetFieldArray fieldArray=sp.getFieldArrayWithWidths(null);
      List<Integer> colWidth=null;
//      if (sp!=null){
//        fieldArray=(SpreadSheetFieldArray)sp.getFieldArray();
//        colWidth=getColWidth(sp, fieldArray);
//      }
      cache=NodeModelCacheFactory.getInstance().createFilteredCache((ReferenceNodeModelCache)frame.getReferenceCache(true),"OfflineGantt",null);
      ((GanttSVGRenderer)renderer).init(frame.getProject(),cache,fieldArray,colWidth,frame.getScale(),true);
      renderer.getParams().setSupportLeftAndRightParts(true);
    }else if (view instanceof ResourceView){
      renderer=new GanttSVGRenderer();
      SpreadSheet sp=frame.getActiveSpreadSheet();
      SpreadSheetFieldArray fieldArray=sp.getFieldArrayWithWidths(null);
      List<Integer> colWidth=null;
//      if (sp!=null){
//        fieldArray=(SpreadSheetFieldArray)sp.getFieldArray();
//        colWidth=getColWidth(sp, fieldArray);
//      }
      cache=NodeModelCacheFactory.getInstance().createFilteredCache((ReferenceNodeModelCache)frame.getReferenceCache(false),"OfflineResources",null);
      ((GanttSVGRenderer)renderer).init(frame.getProject(),cache,fieldArray,colWidth,frame.getScale(),false);
    }else if (view instanceof ProjectView){
      renderer=new GanttSVGRenderer();
      SpreadSheet sp=frame.getActiveSpreadSheet();
      SpreadSheetFieldArray fieldArray=sp.getFieldArrayWithWidths(null);
      List<Integer> colWidth=null;
//      if (sp!=null){
//        fieldArray=(SpreadSheetFieldArray)sp.getFieldArray();
//        colWidth=getColWidth(sp, fieldArray);
//      }
View Full Code Here

      if (c instanceof JTableHeader) { // if clicked on row header, see if there is help for the field
        JTableHeader th = (JTableHeader)c;
        loc = c.getLocationOnScreen();
        offsetPoint = new Point(pt.x- loc.x, pt.y-loc.y)
        int col =  th.columnAtPoint(offsetPoint);
        SpreadSheet ss = (SpreadSheet)th.getTable();
        Field f = ((SpreadSheetModel)ss.getModel()).getFieldInColumn(col+1);
        if (f.getHelp()!=null) {
          BrowserControl.displayURL(Settings.HELP_HOME+f.getHelp());
          return true;
        }
      }
View Full Code Here

        }
        });
        cancelEditorButton = new JButton(new AbstractAction(null,IconManager.getIcon("dialog.cancel")){ //$NON-NLS-1$
        private static final long serialVersionUID = 1L;
       public void actionPerformed(ActionEvent e) {
             SpreadSheet sp=spreadSheetPane.getSpreadSheet();
             if (sp.getCellEditor() != null)
               sp.getCellEditor().cancelCellEditing();
          sp.clearSelection();
        }
        });
        setEditorButtonsVisible(false);
       
        documentFrame.getProject().addObjectListener(this);
View Full Code Here

        cancelEditorButton.setEnabled(visible);
  }
 
 
  void assign() {
      SpreadSheet sp=spreadSheetPane.getSpreadSheet();
    if (sp.isEditing()) sp.getCellEditor().stopCellEditing();
    assign(getSelectedResources(),1.0D);
    spreadSheetPane.updateTable();
  }
View Full Code Here

  Set getActionSet(){
    Set actions=null;
    DocumentFrame df=getCurrentFrame();
    if (df!=null){
      SpreadSheet sp=df.getActiveSpreadSheet();
      actions=new HashSet();
      if (sp!=null){
        String[] a=sp.getActionList();
        if (a!=null){
          for (int i=0;i<a.length;i++) actions.add(a[i]);
        }
      }
    }
View Full Code Here

  public SpreadSheetRowHeader(CommonSpreadSheet table) {
    super();
    setGridColor(Colors.GRAY);
    this.table=table;
    if (table instanceof SpreadSheet){
      final SpreadSheet spreadSheet=(SpreadSheet)table;
     
      getActionMap().put("cut",new AbstractAction(){
        public void actionPerformed(java.awt.event.ActionEvent e) {
          spreadSheet.prepareAction(MenuActionConstants.ACTION_CUT).actionPerformed(new ActionEvent(spreadSheet,e.getID(),e.getActionCommand()));
        }
      });
      getActionMap().put("copy",new AbstractAction(){
        public void actionPerformed(java.awt.event.ActionEvent e) {
          spreadSheet.prepareAction(MenuActionConstants.ACTION_COPY).actionPerformed(new ActionEvent(spreadSheet,e.getID(),e.getActionCommand()));
        }
      });
      getActionMap().put("paste",new AbstractAction(){
        public void actionPerformed(java.awt.event.ActionEvent e) {
          spreadSheet.prepareAction(MenuActionConstants.ACTION_PASTE).actionPerformed(new ActionEvent(spreadSheet,e.getID(),e.getActionCommand()));
        }
      });
     
    }
    this.setUI(new BasicTableUI());
View Full Code Here

      setColumnModel(spreadSheetColumnModel);
     
    setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
   
    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){
View Full Code Here

TOP

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

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.